@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
116 lines • 4.78 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.OauthIdpConfig = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = require("../utilities");
/**
* OIDC IdP configuration for a Identity Toolkit project.
*
* 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 Oauth Idp Config Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const oauthIdpConfig = new gcp.identityplatform.OauthIdpConfig("oauth_idp_config", {
* name: "oidc.oauth-idp-config",
* displayName: "Display Name",
* clientId: "client-id",
* issuer: "issuer",
* enabled: true,
* clientSecret: "secret",
* });
* ```
*
* ## Import
*
* OauthIdpConfig can be imported using any of these accepted formats:
*
* * `projects/{{project}}/oauthIdpConfigs/{{name}}`
*
* * `{{project}}/{{name}}`
*
* * `{{name}}`
*
* When using the `pulumi import` command, OauthIdpConfig can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:identityplatform/oauthIdpConfig:OauthIdpConfig default projects/{{project}}/oauthIdpConfigs/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:identityplatform/oauthIdpConfig:OauthIdpConfig default {{project}}/{{name}}
* ```
*
* ```sh
* $ pulumi import gcp:identityplatform/oauthIdpConfig:OauthIdpConfig default {{name}}
* ```
*/
class OauthIdpConfig extends pulumi.CustomResource {
/**
* Get an existing OauthIdpConfig 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 OauthIdpConfig(name, state, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* Returns true if the given object is an instance of OauthIdpConfig. 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'] === OauthIdpConfig.__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;
}
else {
const args = argsOrState;
if ((!args || args.clientId === undefined) && !opts.urn) {
throw new Error("Missing required property 'clientId'");
}
if ((!args || args.issuer === undefined) && !opts.urn) {
throw new Error("Missing required property 'issuer'");
}
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;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(OauthIdpConfig.__pulumiType, name, resourceInputs, opts);
}
}
exports.OauthIdpConfig = OauthIdpConfig;
/** @internal */
OauthIdpConfig.__pulumiType = 'gcp:identityplatform/oauthIdpConfig:OauthIdpConfig';
//# sourceMappingURL=oauthIdpConfig.js.map