UNPKG

@pulumi/gcp

Version:

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

180 lines (179 loc) 7.67 kB
import * as pulumi from "@pulumi/pulumi"; /** * An app's reCAPTCHA V3 configuration object. * * To get more information about RecaptchaV3Config, see: * * * [API documentation](https://firebase.google.com/docs/reference/appcheck/rest/v1/projects.apps.recaptchaV3Config) * * How-to Guides * * [Official Documentation](https://firebase.google.com/docs/app-check) * * ## Example Usage * * ### Firebase App Check Recaptcha V3 Config Basic * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as gcp from "@pulumi/gcp"; * import * as time from "@pulumiverse/time"; * * const _default = new gcp.firebase.WebApp("default", { * project: "my-project-name", * displayName: "Web App for reCAPTCHA V3", * }); * // It takes a while for App Check to recognize the new app * // If your app already exists, you don't have to wait 30 seconds. * const wait30s = new time.index.Sleep("wait_30s", {createDuration: "30s"}, { * dependsOn: [_default], * }); * const defaultAppCheckRecaptchaV3Config = new gcp.firebase.AppCheckRecaptchaV3Config("default", { * project: "my-project-name", * appId: _default.appId, * siteSecret: "6Lf9YnQpAAAAAC3-MHmdAllTbPwTZxpUw5d34YzX", * tokenTtl: "7200s", * }, { * dependsOn: [wait30s], * }); * ``` * * ## Import * * RecaptchaV3Config can be imported using any of these accepted formats: * * * `projects/{{project}}/apps/{{app_id}}/recaptchaV3Config` * * * `{{project}}/{{app_id}}` * * * `{{app_id}}` * * When using the `pulumi import` command, RecaptchaV3Config can be imported using one of the formats above. For example: * * ```sh * $ pulumi import gcp:firebase/appCheckRecaptchaV3Config:AppCheckRecaptchaV3Config default projects/{{project}}/apps/{{app_id}}/recaptchaV3Config * ``` * * ```sh * $ pulumi import gcp:firebase/appCheckRecaptchaV3Config:AppCheckRecaptchaV3Config default {{project}}/{{app_id}} * ``` * * ```sh * $ pulumi import gcp:firebase/appCheckRecaptchaV3Config:AppCheckRecaptchaV3Config default {{app_id}} * ``` */ export declare class AppCheckRecaptchaV3Config extends pulumi.CustomResource { /** * Get an existing AppCheckRecaptchaV3Config 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?: AppCheckRecaptchaV3ConfigState, opts?: pulumi.CustomResourceOptions): AppCheckRecaptchaV3Config; /** * Returns true if the given object is an instance of AppCheckRecaptchaV3Config. 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 AppCheckRecaptchaV3Config; /** * The ID of an * [Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id). */ readonly appId: pulumi.Output<string>; /** * The relative resource name of the reCAPTCHA V3 configuration object */ 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>; /** * The site secret used to identify your service for reCAPTCHA v3 verification. * For security reasons, this field will never be populated in any response. * **Note**: This property is sensitive and will not be displayed in the plan. */ readonly siteSecret: pulumi.Output<string>; /** * Whether the siteSecret was previously set. Since we will never return the siteSecret field, this field is the only way to find out whether it was previously set. */ readonly siteSecretSet: pulumi.Output<boolean>; /** * Specifies the duration for which App Check tokens exchanged from reCAPTCHA V3 artifacts will be valid. * If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". */ readonly tokenTtl: pulumi.Output<string>; /** * Create a AppCheckRecaptchaV3Config 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: AppCheckRecaptchaV3ConfigArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering AppCheckRecaptchaV3Config resources. */ export interface AppCheckRecaptchaV3ConfigState { /** * The ID of an * [Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id). */ appId?: pulumi.Input<string>; /** * The relative resource name of the reCAPTCHA V3 configuration object */ 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>; /** * The site secret used to identify your service for reCAPTCHA v3 verification. * For security reasons, this field will never be populated in any response. * **Note**: This property is sensitive and will not be displayed in the plan. */ siteSecret?: pulumi.Input<string>; /** * Whether the siteSecret was previously set. Since we will never return the siteSecret field, this field is the only way to find out whether it was previously set. */ siteSecretSet?: pulumi.Input<boolean>; /** * Specifies the duration for which App Check tokens exchanged from reCAPTCHA V3 artifacts will be valid. * If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". */ tokenTtl?: pulumi.Input<string>; } /** * The set of arguments for constructing a AppCheckRecaptchaV3Config resource. */ export interface AppCheckRecaptchaV3ConfigArgs { /** * The ID of an * [Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id). */ appId: 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>; /** * The site secret used to identify your service for reCAPTCHA v3 verification. * For security reasons, this field will never be populated in any response. * **Note**: This property is sensitive and will not be displayed in the plan. */ siteSecret: pulumi.Input<string>; /** * Specifies the duration for which App Check tokens exchanged from reCAPTCHA V3 artifacts will be valid. * If unset, a default value of 1 hour is assumed. Must be between 30 minutes and 7 days, inclusive. * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s". */ tokenTtl?: pulumi.Input<string>; }