UNPKG

@pulumi/gcp

Version:

A Pulumi package for creating and managing Google Cloud Platform resources.

129 lines 6.2 kB
"use strict"; // *** WARNING: this file was generated by pulumi-language-nodejs. *** // *** Do not edit by hand unless you're certain you know what you are doing! *** Object.defineProperty(exports, "__esModule", { value: true }); exports.WorkloadIdentityPoolNamespace = void 0; const pulumi = require("@pulumi/pulumi"); const utilities = require("../utilities"); /** * ## Example Usage * * ### Iam Workload Identity Pool Namespace Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const pool = new gcp.iam.WorkloadIdentityPool("pool", { * workloadIdentityPoolId: "example-pool", * mode: "TRUST_DOMAIN", * }); * const example = new gcp.iam.WorkloadIdentityPoolNamespace("example", { * workloadIdentityPoolId: pool.workloadIdentityPoolId, * workloadIdentityPoolNamespaceId: "example-namespace", * }); * ``` * ### Iam Workload Identity Pool Namespace Full * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * * const pool = new gcp.iam.WorkloadIdentityPool("pool", { * workloadIdentityPoolId: "example-pool", * mode: "TRUST_DOMAIN", * }); * const example = new gcp.iam.WorkloadIdentityPoolNamespace("example", { * workloadIdentityPoolId: pool.workloadIdentityPoolId, * workloadIdentityPoolNamespaceId: "example-namespace", * description: "Example Namespace in a Workload Identity Pool", * disabled: true, * }); * ``` * * ## Import * * WorkloadIdentityPoolNamespace can be imported using any of these accepted formats: * * * `projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}/namespaces/{{workload_identity_pool_namespace_id}}` * * * `{{project}}/{{workload_identity_pool_id}}/{{workload_identity_pool_namespace_id}}` * * * `{{workload_identity_pool_id}}/{{workload_identity_pool_namespace_id}}` * * When using the `pulumi import` command, WorkloadIdentityPoolNamespace can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:iam/workloadIdentityPoolNamespace:WorkloadIdentityPoolNamespace default projects/{{project}}/locations/global/workloadIdentityPools/{{workload_identity_pool_id}}/namespaces/{{workload_identity_pool_namespace_id}} * ``` * * ```sh * $ pulumi import gcp:iam/workloadIdentityPoolNamespace:WorkloadIdentityPoolNamespace default {{project}}/{{workload_identity_pool_id}}/{{workload_identity_pool_namespace_id}} * ``` * * ```sh * $ pulumi import gcp:iam/workloadIdentityPoolNamespace:WorkloadIdentityPoolNamespace default {{workload_identity_pool_id}}/{{workload_identity_pool_namespace_id}} * ``` */ class WorkloadIdentityPoolNamespace extends pulumi.CustomResource { /** * Get an existing WorkloadIdentityPoolNamespace 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 WorkloadIdentityPoolNamespace(name, state, Object.assign(Object.assign({}, opts), { id: id })); } /** * Returns true if the given object is an instance of WorkloadIdentityPoolNamespace. 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'] === WorkloadIdentityPoolNamespace.__pulumiType; } constructor(name, argsOrState, opts) { let resourceInputs = {}; opts = opts || {}; if (opts.id) { const state = argsOrState; resourceInputs["description"] = state ? state.description : undefined; resourceInputs["disabled"] = state ? state.disabled : undefined; resourceInputs["name"] = state ? state.name : undefined; resourceInputs["ownerServices"] = state ? state.ownerServices : undefined; resourceInputs["project"] = state ? state.project : undefined; resourceInputs["state"] = state ? state.state : undefined; resourceInputs["workloadIdentityPoolId"] = state ? state.workloadIdentityPoolId : undefined; resourceInputs["workloadIdentityPoolNamespaceId"] = state ? state.workloadIdentityPoolNamespaceId : undefined; } else { const args = argsOrState; if ((!args || args.workloadIdentityPoolId === undefined) && !opts.urn) { throw new Error("Missing required property 'workloadIdentityPoolId'"); } if ((!args || args.workloadIdentityPoolNamespaceId === undefined) && !opts.urn) { throw new Error("Missing required property 'workloadIdentityPoolNamespaceId'"); } resourceInputs["description"] = args ? args.description : undefined; resourceInputs["disabled"] = args ? args.disabled : undefined; resourceInputs["project"] = args ? args.project : undefined; resourceInputs["workloadIdentityPoolId"] = args ? args.workloadIdentityPoolId : undefined; resourceInputs["workloadIdentityPoolNamespaceId"] = args ? args.workloadIdentityPoolNamespaceId : undefined; resourceInputs["name"] = undefined /*out*/; resourceInputs["ownerServices"] = undefined /*out*/; resourceInputs["state"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); super(WorkloadIdentityPoolNamespace.__pulumiType, name, resourceInputs, opts); } } exports.WorkloadIdentityPoolNamespace = WorkloadIdentityPoolNamespace; /** @internal */ WorkloadIdentityPoolNamespace.__pulumiType = 'gcp:iam/workloadIdentityPoolNamespace:WorkloadIdentityPoolNamespace'; //# sourceMappingURL=workloadIdentityPoolNamespace.js.map