@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
200 lines • 7.66 kB
JavaScript
;
// *** WARNING: this file was generated by pulumi-language-nodejs. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Config = void 0;
const pulumi = __importStar(require("@pulumi/pulumi"));
const utilities = __importStar(require("../utilities"));
/**
* Identity Platform configuration for a Cloud project. Identity Platform is an
* end-to-end authentication system for third-party users to access apps
* and services.
*
* This entity is created only once during intialization and cannot be deleted,
* individual Identity Providers may be disabled instead. This resource may only
* be created in billing-enabled projects.
*
* To get more information about Config, see:
*
* * [API documentation](https://cloud.google.com/identity-platform/docs/reference/rest/v2/Config)
* * How-to Guides
* * [Official Documentation](https://cloud.google.com/identity-platform/docs)
*
* ## Example Usage
*
* ### Identity Platform Config Basic
*
* ```typescript
* import * as pulumi from "@pulumi/pulumi";
* import * as gcp from "@pulumi/gcp";
*
* const _default = new gcp.organizations.Project("default", {
* projectId: "my-project",
* name: "my-project",
* orgId: "123456789",
* billingAccount: "000000-0000000-0000000-000000",
* deletionPolicy: "DELETE",
* labels: {
* firebase: "enabled",
* },
* });
* const identitytoolkit = new gcp.projects.Service("identitytoolkit", {
* project: _default.projectId,
* service: "identitytoolkit.googleapis.com",
* });
* const defaultConfig = new gcp.identityplatform.Config("default", {
* project: _default.projectId,
* autodeleteAnonymousUsers: true,
* signIn: {
* allowDuplicateEmails: true,
* anonymous: {
* enabled: true,
* },
* email: {
* enabled: true,
* passwordRequired: false,
* },
* phoneNumber: {
* enabled: true,
* testPhoneNumbers: {
* "+11231231234": "000000",
* },
* },
* },
* smsRegionConfig: {
* allowlistOnly: {
* allowedRegions: [
* "US",
* "CA",
* ],
* },
* },
* blockingFunctions: {
* triggers: [{
* eventType: "beforeSignIn",
* functionUri: "https://us-east1-my-project.cloudfunctions.net/before-sign-in",
* }],
* forwardInboundCredentials: {
* refreshToken: true,
* accessToken: true,
* idToken: true,
* },
* },
* quota: {
* signUpQuotaConfig: {
* quota: 1000,
* startTime: "2014-10-02T15:01:23Z",
* quotaDuration: "7200s",
* },
* },
* authorizedDomains: [
* "localhost",
* "my-project.firebaseapp.com",
* "my-project.web.app",
* ],
* });
* ```
*
* ## Import
*
* Config can be imported using any of these accepted formats:
*
* * `projects/{{project}}/config`
* * `projects/{{project}}`
* * `{{project}}`
*
* When using the `pulumi import` command, Config can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:identityplatform/config:Config default projects/{{project}}/config
* $ pulumi import gcp:identityplatform/config:Config default projects/{{project}}
* $ pulumi import gcp:identityplatform/config:Config default {{project}}
* ```
*/
class Config extends pulumi.CustomResource {
/**
* Get an existing Config 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 Config(name, state, { ...opts, id: id });
}
/** @internal */
static __pulumiType = 'gcp:identityplatform/config:Config';
/**
* Returns true if the given object is an instance of Config. 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'] === Config.__pulumiType;
}
constructor(name, argsOrState, opts) {
let resourceInputs = {};
opts = opts || {};
if (opts.id) {
const state = argsOrState;
resourceInputs["authorizedDomains"] = state?.authorizedDomains;
resourceInputs["autodeleteAnonymousUsers"] = state?.autodeleteAnonymousUsers;
resourceInputs["blockingFunctions"] = state?.blockingFunctions;
resourceInputs["client"] = state?.client;
resourceInputs["mfa"] = state?.mfa;
resourceInputs["monitoring"] = state?.monitoring;
resourceInputs["multiTenant"] = state?.multiTenant;
resourceInputs["name"] = state?.name;
resourceInputs["project"] = state?.project;
resourceInputs["quota"] = state?.quota;
resourceInputs["signIn"] = state?.signIn;
resourceInputs["smsRegionConfig"] = state?.smsRegionConfig;
}
else {
const args = argsOrState;
resourceInputs["authorizedDomains"] = args?.authorizedDomains;
resourceInputs["autodeleteAnonymousUsers"] = args?.autodeleteAnonymousUsers;
resourceInputs["blockingFunctions"] = args?.blockingFunctions;
resourceInputs["client"] = args?.client;
resourceInputs["mfa"] = args?.mfa;
resourceInputs["monitoring"] = args?.monitoring;
resourceInputs["multiTenant"] = args?.multiTenant;
resourceInputs["project"] = args?.project;
resourceInputs["quota"] = args?.quota;
resourceInputs["signIn"] = args?.signIn;
resourceInputs["smsRegionConfig"] = args?.smsRegionConfig;
resourceInputs["name"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Config.__pulumiType, name, resourceInputs, opts);
}
}
exports.Config = Config;
//# sourceMappingURL=config.js.map