@pulumi/gcp
Version:
A Pulumi package for creating and managing Google Cloud Platform resources.
187 lines (186 loc) • 8.22 kB
TypeScript
import * as pulumi from "@pulumi/pulumi";
/**
* A debug token is a secret used during the development or integration testing of
* an app. It essentially allows the development or integration testing to bypass
* app attestation while still allowing App Check to enforce protection on supported
* production Firebase services.
*
* To get more information about DebugToken, see:
*
* * [API documentation](https://firebase.google.com/docs/reference/appcheck/rest/v1/projects.apps.debugTokens)
* * How-to Guides
* * [Official Documentation](https://firebase.google.com/docs/app-check)
*
* ## Example Usage
*
* ### Firebase App Check Debug Token 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 debug token",
* });
* // 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 defaultAppCheckDebugToken = new gcp.firebase.AppCheckDebugToken("default", {
* project: "my-project-name",
* appId: _default.appId,
* displayName: "Debug Token",
* token: "00000000-AAAA-BBBB-CCCC-000000000000",
* }, {
* dependsOn: [wait30s],
* });
* ```
*
* ## Import
*
* DebugToken can be imported using any of these accepted formats:
*
* * `projects/{{project}}/apps/{{app_id}}/debugTokens/{{debug_token_id}}`
*
* * `{{project}}/{{app_id}}/{{debug_token_id}}`
*
* * `{{app_id}}/{{debug_token_id}}`
*
* When using the `pulumi import` command, DebugToken can be imported using one of the formats above. For example:
*
* ```sh
* $ pulumi import gcp:firebase/appCheckDebugToken:AppCheckDebugToken default projects/{{project}}/apps/{{app_id}}/debugTokens/{{debug_token_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/appCheckDebugToken:AppCheckDebugToken default {{project}}/{{app_id}}/{{debug_token_id}}
* ```
*
* ```sh
* $ pulumi import gcp:firebase/appCheckDebugToken:AppCheckDebugToken default {{app_id}}/{{debug_token_id}}
* ```
*/
export declare class AppCheckDebugToken extends pulumi.CustomResource {
/**
* Get an existing AppCheckDebugToken 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?: AppCheckDebugTokenState, opts?: pulumi.CustomResourceOptions): AppCheckDebugToken;
/**
* Returns true if the given object is an instance of AppCheckDebugToken. 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 AppCheckDebugToken;
/**
* The ID of a
* [Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id),
* [Apple App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.iosApps#IosApp.FIELDS.app_id),
* or [Android App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.androidApps#AndroidApp.FIELDS.app_id)
*/
readonly appId: pulumi.Output<string>;
/**
* The last segment of the resource name of the debug token.
*/
readonly debugTokenId: pulumi.Output<string>;
/**
* A human readable display name used to identify this debug token.
*/
readonly displayName: 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 secret token itself. Must be provided during creation, and must be a UUID4,
* case insensitive. You may use a method of your choice such as random/random_uuid
* to generate the token.
* This field is immutable once set, and cannot be updated. You can, however, delete
* this debug token to revoke it.
* 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 token: pulumi.Output<string>;
/**
* Create a AppCheckDebugToken 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: AppCheckDebugTokenArgs, opts?: pulumi.CustomResourceOptions);
}
/**
* Input properties used for looking up and filtering AppCheckDebugToken resources.
*/
export interface AppCheckDebugTokenState {
/**
* The ID of a
* [Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id),
* [Apple App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.iosApps#IosApp.FIELDS.app_id),
* or [Android App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.androidApps#AndroidApp.FIELDS.app_id)
*/
appId?: pulumi.Input<string>;
/**
* The last segment of the resource name of the debug token.
*/
debugTokenId?: pulumi.Input<string>;
/**
* A human readable display name used to identify this debug token.
*/
displayName?: 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 secret token itself. Must be provided during creation, and must be a UUID4,
* case insensitive. You may use a method of your choice such as random/random_uuid
* to generate the token.
* This field is immutable once set, and cannot be updated. You can, however, delete
* this debug token to revoke it.
* 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.
*/
token?: pulumi.Input<string>;
}
/**
* The set of arguments for constructing a AppCheckDebugToken resource.
*/
export interface AppCheckDebugTokenArgs {
/**
* The ID of a
* [Web App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.webApps#WebApp.FIELDS.app_id),
* [Apple App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.iosApps#IosApp.FIELDS.app_id),
* or [Android App](https://firebase.google.com/docs/reference/firebase-management/rest/v1beta1/projects.androidApps#AndroidApp.FIELDS.app_id)
*/
appId: pulumi.Input<string>;
/**
* A human readable display name used to identify this debug token.
*/
displayName: 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 secret token itself. Must be provided during creation, and must be a UUID4,
* case insensitive. You may use a method of your choice such as random/random_uuid
* to generate the token.
* This field is immutable once set, and cannot be updated. You can, however, delete
* this debug token to revoke it.
* 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.
*/
token: pulumi.Input<string>;
}