@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
185 lines • 7.12 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.Config = void 0;
const pulumi = require("@pulumi/pulumi");
const utilities = 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
* ```
*
* ```sh
* $ pulumi import gcp:identityplatform/config:Config default projects/{{project}}
* ```
*
* ```sh
* $ 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, Object.assign(Object.assign({}, opts), { id: id }));
}
/**
* 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 ? state.authorizedDomains : undefined;
resourceInputs["autodeleteAnonymousUsers"] = state ? state.autodeleteAnonymousUsers : undefined;
resourceInputs["blockingFunctions"] = state ? state.blockingFunctions : undefined;
resourceInputs["client"] = state ? state.client : undefined;
resourceInputs["mfa"] = state ? state.mfa : undefined;
resourceInputs["monitoring"] = state ? state.monitoring : undefined;
resourceInputs["multiTenant"] = state ? state.multiTenant : undefined;
resourceInputs["name"] = state ? state.name : undefined;
resourceInputs["project"] = state ? state.project : undefined;
resourceInputs["quota"] = state ? state.quota : undefined;
resourceInputs["signIn"] = state ? state.signIn : undefined;
resourceInputs["smsRegionConfig"] = state ? state.smsRegionConfig : undefined;
}
else {
const args = argsOrState;
resourceInputs["authorizedDomains"] = args ? args.authorizedDomains : undefined;
resourceInputs["autodeleteAnonymousUsers"] = args ? args.autodeleteAnonymousUsers : undefined;
resourceInputs["blockingFunctions"] = args ? args.blockingFunctions : undefined;
resourceInputs["client"] = args ? args.client : undefined;
resourceInputs["mfa"] = args ? args.mfa : undefined;
resourceInputs["monitoring"] = args ? args.monitoring : undefined;
resourceInputs["multiTenant"] = args ? args.multiTenant : undefined;
resourceInputs["project"] = args ? args.project : undefined;
resourceInputs["quota"] = args ? args.quota : undefined;
resourceInputs["signIn"] = args ? args.signIn : undefined;
resourceInputs["smsRegionConfig"] = args ? args.smsRegionConfig : undefined;
resourceInputs["name"] = undefined /*out*/;
}
opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts);
super(Config.__pulumiType, name, resourceInputs, opts);
}
}
exports.Config = Config;
/** @internal */
Config.__pulumiType = 'gcp:identityplatform/config:Config';
//# sourceMappingURL=config.js.map