@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
171 lines • 7.32 kB
JavaScript
;
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
Object.defineProperty(exports, "__esModule", { value: true });
exports.BackendAuthenticationConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* ## Example Usage
*
* ### Network Security Backend Authentication Config Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.networksecurity.BackendAuthenticationConfig("default", {
* name: "my-backend-authentication-config",
* labels: {
* foo: "bar",
* },
* description: "my description",
* wellKnownRoots: "PUBLIC_ROOTS",
* });
* ```
* ### Network Security Backend Authentication Config Full
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
* import * as std from "@pulumi/std";
*
* const certificate = new gcp.certificatemanager.Certificate("certificate", {
* name: "my-certificate",
* labels: {
* foo: "bar",
* },
* location: "global",
* selfManaged: {
* pemCertificate: std.file({
* input: "test-fixtures/cert.pem",
* }).then(invoke => invoke.result),
* pemPrivateKey: std.file({
* input: "test-fixtures/key.pem",
* }).then(invoke => invoke.result),
* },
* scope: "CLIENT_AUTH",
* });
* const trustConfig = new gcp.certificatemanager.TrustConfig("trust_config", {
* name: "my-trust-config",
* description: "sample description for the trust config",
* location: "global",
* trustStores: [{
* trustAnchors: [{
* pemCertificate: std.file({
* input: "test-fixtures/cert.pem",
* }).then(invoke => invoke.result),
* }],
* intermediateCas: [{
* pemCertificate: std.file({
* input: "test-fixtures/cert.pem",
* }).then(invoke => invoke.result),
* }],
* }],
* labels: {
* foo: "bar",
* },
* });
* const _default = new gcp.networksecurity.BackendAuthenticationConfig("default", {
* name: "my-backend-authentication-config",
* labels: {
* bar: "foo",
* },
* location: "global",
* description: "my description",
* wellKnownRoots: "PUBLIC_ROOTS",
* clientCertificate: certificate.id,
* trustConfig: trustConfig.id,
* });
* ```
*
* ## Import
*
* BackendAuthenticationConfig can be imported using any of these accepted formats:
*
* * `projects/{{project}}/locations/{{location}}/backendAuthenticationConfigs/{{name}}`
*
* * `{{project}}/{{location}}/{{name}}`
*
* * `{{location}}/{{name}}`
*
* When using the `pulumi import` command, BackendAuthenticationConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:networksecurity/backendAuthenticationConfig:BackendAuthenticationConfig default projects/{{project}}/locations/{{location}}/backendAuthenticationConfigs/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:networksecurity/backendAuthenticationConfig:BackendAuthenticationConfig default {{project}}/{{location}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:networksecurity/backendAuthenticationConfig:BackendAuthenticationConfig default {{location}}/{{name}}
* ```
*/
class BackendAuthenticationConfig extends pulumi.CustomResource {
/**
* Get an existing BackendAuthenticationConfig resource's state with the given name, ID, and optional extra
* properties used to qualify the lookup.
*
* @param name The _unique_ name of the resulting resource.
* @param id The _unique_ provider ID of the resource to lookup.
* @param state Any extra arguments used during the lookup.
* @param opts Optional settings to control the behavior of the CustomResource.
*/
static get(name, id, state, opts) {
return new BackendAuthenticationConfig(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of BackendAuthenticationConfig. This is designed to work even
* when multiple copies of the Pulumi SDK have been loaded into the same process.
*/
static isInstance(obj) {
if (obj === undefined || obj === null) {
return false;
}
return obj['__pulumiType'] === BackendAuthenticationConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["clientCertificate"] = state ? state.clientCertificate : undefined;
resourceInputs["createTime"] = state ? state.createTime : undefined;
resourceInputs["description"] = state ? state.description : undefined;
resourceInputs["effectiveLabels"] = state ? state.effectiveLabels : undefined;
resourceInputs["labels"] = state ? state.labels : undefined;
resourceInputs["location"] = state ? state.location : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["pulumiLabels"] = state ? state.pulumiLabels : undefined;
resourceInputs["trustConfig"] = state ? state.trustConfig : undefined;
resourceInputs["updateTime"] = state ? state.updateTime : undefined;
resourceInputs["wellKnownRoots"] = state ? state.wellKnownRoots : undefined;
}
else {
const args = argsOrState;
resourceInputs["clientCertificate"] = args ? args.clientCertificate : undefined;
resourceInputs["description"] = args ? args.description : undefined;
resourceInputs["labels"] = args ? args.labels : undefined;
resourceInputs["location"] = args ? args.location : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["trustConfig"] = args ? args.trustConfig : undefined;
resourceInputs["wellKnownRoots"] = args ? args.wellKnownRoots : undefined;
resourceInputs["createTime"] = undefined /*out*/;
resourceInputs["effectiveLabels"] = undefined /*out*/;
resourceInputs["pulumiLabels"] = undefined /*out*/;
resourceInputs["updateTime"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
const secretOpts = { additionalSecretOutputs: ["effectiveLabels", "pulumiLabels"] };
opts = pulumi.mergeOptions(opts, secretOpts);
super(BackendAuthenticationConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.BackendAuthenticationConfig = BackendAuthenticationConfig;
/** @internal */
BackendAuthenticationConfig.__pulumiType = 'gcp:networksecurity/backendAuthenticationConfig:BackendAuthenticationConfig';
//# sourceMappingURL=backendAuthenticationConfig.js.map