@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
126 lines • 5.6 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.TenantOauthIdpConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* OIDC IdP configuration for a Identity Toolkit project within a tenant.
*
* You must enable the
* [Google Identity Platform](https://console.cloud.google.com/marketplace/details/google-cloud-platform/customer-identity) in
* the marketplace prior to using this resource.
*
* ## Example Usage
*
* ### Identity Platform Tenant Oauth Idp Config Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const tenant = new gcp.identityplatform.Tenant("tenant", {displayName: "tenant"});
* const tenantOauthIdpConfig = new gcp.identityplatform.TenantOauthIdpConfig("tenant_oauth_idp_config", {
* name: "oidc.oauth-idp-config",
* tenant: tenant.name,
* displayName: "Display Name",
* clientId: "client-id",
* issuer: "issuer",
* enabled: true,
* clientSecret: "secret",
* });
* ```
*
* ## Import
*
* TenantOauthIdpConfig can be imported using any of these accepted formats:
*
* * `projects/{{project}}/tenants/{{tenant}}/oauthIdpConfigs/{{name}}`
*
* * `{{project}}/{{tenant}}/{{name}}`
*
* * `{{tenant}}/{{name}}`
*
* When using the `pulumi import` command, TenantOauthIdpConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:identityplatform/tenantOauthIdpConfig:TenantOauthIdpConfig default projects/{{project}}/tenants/{{tenant}}/oauthIdpConfigs/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:identityplatform/tenantOauthIdpConfig:TenantOauthIdpConfig default {{project}}/{{tenant}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:identityplatform/tenantOauthIdpConfig:TenantOauthIdpConfig default {{tenant}}/{{name}}
* ```
*/
class TenantOauthIdpConfig extends pulumi.CustomResource {
/**
* Get an existing TenantOauthIdpConfig 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 TenantOauthIdpConfig(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of TenantOauthIdpConfig. 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'] === TenantOauthIdpConfig.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["clientId"] = state ? state.clientId : undefined;
resourceInputs["clientSecret"] = state ? state.clientSecret : undefined;
resourceInputs["displayName"] = state ? state.displayName : undefined;
resourceInputs["enabled"] = state ? state.enabled : undefined;
resourceInputs["issuer"] = state ? state.issuer : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["tenant"] = state ? state.tenant : undefined;
}
else {
const args = argsOrState;
if ((!args || args.clientId === undefined) && !opts.urn) {
throw new Error("Missing required property 'clientId'");
}
if ((!args || args.displayName === undefined) && !opts.urn) {
throw new Error("Missing required property 'displayName'");
}
if ((!args || args.issuer === undefined) && !opts.urn) {
throw new Error("Missing required property 'issuer'");
}
if ((!args || args.tenant === undefined) && !opts.urn) {
throw new Error("Missing required property 'tenant'");
}
resourceInputs["clientId"] = args ? args.clientId : undefined;
resourceInputs["clientSecret"] = args ? args.clientSecret : undefined;
resourceInputs["displayName"] = args ? args.displayName : undefined;
resourceInputs["enabled"] = args ? args.enabled : undefined;
resourceInputs["issuer"] = args ? args.issuer : undefined;
resourceInputs["name"] = args ? args.name : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["tenant"] = args ? args.tenant : undefined;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(TenantOauthIdpConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.TenantOauthIdpConfig = TenantOauthIdpConfig;
/** @internal */
TenantOauthIdpConfig.__pulumiType = 'gcp:identityplatform/tenantOauthIdpConfig:TenantOauthIdpConfig';
//# sourceMappingURL=tenantOauthIdpConfig.js.map