UNPKG

@pulumi/gcp

Version:

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

320 lines (319 loc) • 11.5 kB
import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * 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}} * ``` */ export declare 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: string, id: pulumi.Input<pulumi.ID>, state?: ConfigState, opts?: pulumi.CustomResourceOptions): 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: any): obj is Config; /** * List of domains authorized for OAuth redirects. */ readonly authorizedDomains: pulumi.Output<string[]>; /** * Whether anonymous users will be auto-deleted after a period of 30 days */ readonly autodeleteAnonymousUsers: pulumi.Output<boolean | undefined>; /** * Configuration related to blocking functions. * Structure is documented below. */ readonly blockingFunctions: pulumi.Output<outputs.identityplatform.ConfigBlockingFunctions | undefined>; /** * Options related to how clients making requests on behalf of a project should be configured. * Structure is documented below. */ readonly client: pulumi.Output<outputs.identityplatform.ConfigClient>; /** * Options related to how clients making requests on behalf of a project should be configured. * Structure is documented below. */ readonly mfa: pulumi.Output<outputs.identityplatform.ConfigMfa>; /** * Configuration related to monitoring project activity. * Structure is documented below. */ readonly monitoring: pulumi.Output<outputs.identityplatform.ConfigMonitoring>; /** * Configuration related to multi-tenant functionality. * Structure is documented below. */ readonly multiTenant: pulumi.Output<outputs.identityplatform.ConfigMultiTenant | undefined>; /** * The name of the Config resource */ readonly name: pulumi.Output<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ readonly project: pulumi.Output<string>; /** * Configuration related to quotas. * Structure is documented below. */ readonly quota: pulumi.Output<outputs.identityplatform.ConfigQuota | undefined>; /** * Configuration related to local sign in methods. * Structure is documented below. */ readonly signIn: pulumi.Output<outputs.identityplatform.ConfigSignIn>; /** * Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. * Structure is documented below. */ readonly smsRegionConfig: pulumi.Output<outputs.identityplatform.ConfigSmsRegionConfig>; /** * Create a Config resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args?: ConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Config resources. */ export interface ConfigState { /** * List of domains authorized for OAuth redirects. */ authorizedDomains?: pulumi.Input<pulumi.Input<string>[]>; /** * Whether anonymous users will be auto-deleted after a period of 30 days */ autodeleteAnonymousUsers?: pulumi.Input<boolean>; /** * Configuration related to blocking functions. * Structure is documented below. */ blockingFunctions?: pulumi.Input<inputs.identityplatform.ConfigBlockingFunctions>; /** * Options related to how clients making requests on behalf of a project should be configured. * Structure is documented below. */ client?: pulumi.Input<inputs.identityplatform.ConfigClient>; /** * Options related to how clients making requests on behalf of a project should be configured. * Structure is documented below. */ mfa?: pulumi.Input<inputs.identityplatform.ConfigMfa>; /** * Configuration related to monitoring project activity. * Structure is documented below. */ monitoring?: pulumi.Input<inputs.identityplatform.ConfigMonitoring>; /** * Configuration related to multi-tenant functionality. * Structure is documented below. */ multiTenant?: pulumi.Input<inputs.identityplatform.ConfigMultiTenant>; /** * The name of the Config resource */ name?: pulumi.Input<string>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * Configuration related to quotas. * Structure is documented below. */ quota?: pulumi.Input<inputs.identityplatform.ConfigQuota>; /** * Configuration related to local sign in methods. * Structure is documented below. */ signIn?: pulumi.Input<inputs.identityplatform.ConfigSignIn>; /** * Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. * Structure is documented below. */ smsRegionConfig?: pulumi.Input<inputs.identityplatform.ConfigSmsRegionConfig>; } /** * The set of arguments for constructing a Config resource. */ export interface ConfigArgs { /** * List of domains authorized for OAuth redirects. */ authorizedDomains?: pulumi.Input<pulumi.Input<string>[]>; /** * Whether anonymous users will be auto-deleted after a period of 30 days */ autodeleteAnonymousUsers?: pulumi.Input<boolean>; /** * Configuration related to blocking functions. * Structure is documented below. */ blockingFunctions?: pulumi.Input<inputs.identityplatform.ConfigBlockingFunctions>; /** * Options related to how clients making requests on behalf of a project should be configured. * Structure is documented below. */ client?: pulumi.Input<inputs.identityplatform.ConfigClient>; /** * Options related to how clients making requests on behalf of a project should be configured. * Structure is documented below. */ mfa?: pulumi.Input<inputs.identityplatform.ConfigMfa>; /** * Configuration related to monitoring project activity. * Structure is documented below. */ monitoring?: pulumi.Input<inputs.identityplatform.ConfigMonitoring>; /** * Configuration related to multi-tenant functionality. * Structure is documented below. */ multiTenant?: pulumi.Input<inputs.identityplatform.ConfigMultiTenant>; /** * The ID of the project in which the resource belongs. * If it is not provided, the provider project is used. */ project?: pulumi.Input<string>; /** * Configuration related to quotas. * Structure is documented below. */ quota?: pulumi.Input<inputs.identityplatform.ConfigQuota>; /** * Configuration related to local sign in methods. * Structure is documented below. */ signIn?: pulumi.Input<inputs.identityplatform.ConfigSignIn>; /** * Configures the regions where users are allowed to send verification SMS for the project or tenant. This is based on the calling code of the destination phone number. * Structure is documented below. */ smsRegionConfig?: pulumi.Input<inputs.identityplatform.ConfigSmsRegionConfig>; }