1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. firebase
  5. AppCheckDebugToken
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi

gcp.firebase.AppCheckDebugToken

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by 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:

    Example Usage

    Firebase App Check Debug Token Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    import * as time from "@pulumi/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"});
    const defaultAppCheckDebugToken = new gcp.firebase.AppCheckDebugToken("default", {
        project: "my-project-name",
        appId: _default.appId,
        displayName: "Debug Token",
        token: "00000000-AAAA-BBBB-CCCC-000000000000",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    import pulumi_time as time
    
    default = gcp.firebase.WebApp("default",
        project="my-project-name",
        display_name="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.
    wait30s = time.index.Sleep("wait_30s", create_duration=30s)
    default_app_check_debug_token = gcp.firebase.AppCheckDebugToken("default",
        project="my-project-name",
        app_id=default.app_id,
        display_name="Debug Token",
        token="00000000-AAAA-BBBB-CCCC-000000000000")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/firebase"
    	"github.com/pulumi/pulumi-time/sdk/go/time"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := firebase.NewWebApp(ctx, "default", &firebase.WebAppArgs{
    			Project:     pulumi.String("my-project-name"),
    			DisplayName: pulumi.String("Web App for debug token"),
    		})
    		if err != nil {
    			return err
    		}
    		// 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.
    		_, err = time.NewSleep(ctx, "wait_30s", &time.SleepArgs{
    			CreateDuration: "30s",
    		})
    		if err != nil {
    			return err
    		}
    		_, err = firebase.NewAppCheckDebugToken(ctx, "default", &firebase.AppCheckDebugTokenArgs{
    			Project:     pulumi.String("my-project-name"),
    			AppId:       _default.AppId,
    			DisplayName: pulumi.String("Debug Token"),
    			Token:       pulumi.String("00000000-AAAA-BBBB-CCCC-000000000000"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    using Time = Pulumi.Time;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Gcp.Firebase.WebApp("default", new()
        {
            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.
        var wait30s = new Time.Index.Sleep("wait_30s", new()
        {
            CreateDuration = "30s",
        });
    
        var defaultAppCheckDebugToken = new Gcp.Firebase.AppCheckDebugToken("default", new()
        {
            Project = "my-project-name",
            AppId = @default.AppId,
            DisplayName = "Debug Token",
            Token = "00000000-AAAA-BBBB-CCCC-000000000000",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.firebase.WebApp;
    import com.pulumi.gcp.firebase.WebAppArgs;
    import com.pulumi.time.sleep;
    import com.pulumi.time.SleepArgs;
    import com.pulumi.gcp.firebase.AppCheckDebugToken;
    import com.pulumi.gcp.firebase.AppCheckDebugTokenArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var default_ = new WebApp("default", WebAppArgs.builder()        
                .project("my-project-name")
                .displayName("Web App for debug token")
                .build());
    
            // 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.
            var wait30s = new Sleep("wait30s", SleepArgs.builder()        
                .createDuration("30s")
                .build());
    
            var defaultAppCheckDebugToken = new AppCheckDebugToken("defaultAppCheckDebugToken", AppCheckDebugTokenArgs.builder()        
                .project("my-project-name")
                .appId(default_.appId())
                .displayName("Debug Token")
                .token("00000000-AAAA-BBBB-CCCC-000000000000")
                .build());
    
        }
    }
    
    resources:
      default:
        type: gcp:firebase:WebApp
        properties:
          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.
      wait30s:
        type: time:sleep
        name: wait_30s
        properties:
          createDuration: 30s
      defaultAppCheckDebugToken:
        type: gcp:firebase:AppCheckDebugToken
        name: default
        properties:
          project: my-project-name
          appId: ${default.appId}
          displayName: Debug Token
          token: 00000000-AAAA-BBBB-CCCC-000000000000
    

    Create AppCheckDebugToken Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new AppCheckDebugToken(name: string, args: AppCheckDebugTokenArgs, opts?: CustomResourceOptions);
    @overload
    def AppCheckDebugToken(resource_name: str,
                           args: AppCheckDebugTokenArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def AppCheckDebugToken(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           app_id: Optional[str] = None,
                           display_name: Optional[str] = None,
                           token: Optional[str] = None,
                           project: Optional[str] = None)
    func NewAppCheckDebugToken(ctx *Context, name string, args AppCheckDebugTokenArgs, opts ...ResourceOption) (*AppCheckDebugToken, error)
    public AppCheckDebugToken(string name, AppCheckDebugTokenArgs args, CustomResourceOptions? opts = null)
    public AppCheckDebugToken(String name, AppCheckDebugTokenArgs args)
    public AppCheckDebugToken(String name, AppCheckDebugTokenArgs args, CustomResourceOptions options)
    
    type: gcp:firebase:AppCheckDebugToken
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args AppCheckDebugTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args AppCheckDebugTokenArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args AppCheckDebugTokenArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AppCheckDebugTokenArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AppCheckDebugTokenArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var appCheckDebugTokenResource = new Gcp.Firebase.AppCheckDebugToken("appCheckDebugTokenResource", new()
    {
        AppId = "string",
        DisplayName = "string",
        Token = "string",
        Project = "string",
    });
    
    example, err := firebase.NewAppCheckDebugToken(ctx, "appCheckDebugTokenResource", &firebase.AppCheckDebugTokenArgs{
    	AppId:       pulumi.String("string"),
    	DisplayName: pulumi.String("string"),
    	Token:       pulumi.String("string"),
    	Project:     pulumi.String("string"),
    })
    
    var appCheckDebugTokenResource = new AppCheckDebugToken("appCheckDebugTokenResource", AppCheckDebugTokenArgs.builder()        
        .appId("string")
        .displayName("string")
        .token("string")
        .project("string")
        .build());
    
    app_check_debug_token_resource = gcp.firebase.AppCheckDebugToken("appCheckDebugTokenResource",
        app_id="string",
        display_name="string",
        token="string",
        project="string")
    
    const appCheckDebugTokenResource = new gcp.firebase.AppCheckDebugToken("appCheckDebugTokenResource", {
        appId: "string",
        displayName: "string",
        token: "string",
        project: "string",
    });
    
    type: gcp:firebase:AppCheckDebugToken
    properties:
        appId: string
        displayName: string
        project: string
        token: string
    

    AppCheckDebugToken Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The AppCheckDebugToken resource accepts the following input properties:

    AppId string
    The ID of a Web App, Apple App, or Android App


    DisplayName string
    A human readable display name used to identify this debug token.
    Token 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.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    AppId string
    The ID of a Web App, Apple App, or Android App


    DisplayName string
    A human readable display name used to identify this debug token.
    Token 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.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    appId String
    The ID of a Web App, Apple App, or Android App


    displayName String
    A human readable display name used to identify this debug token.
    token 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.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    appId string
    The ID of a Web App, Apple App, or Android App


    displayName string
    A human readable display name used to identify this debug token.
    token 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.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    app_id str
    The ID of a Web App, Apple App, or Android App


    display_name str
    A human readable display name used to identify this debug token.
    token str
    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.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    appId String
    The ID of a Web App, Apple App, or Android App


    displayName String
    A human readable display name used to identify this debug token.
    token 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.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AppCheckDebugToken resource produces the following output properties:

    DebugTokenId string
    The last segment of the resource name of the debug token.
    Id string
    The provider-assigned unique ID for this managed resource.
    DebugTokenId string
    The last segment of the resource name of the debug token.
    Id string
    The provider-assigned unique ID for this managed resource.
    debugTokenId String
    The last segment of the resource name of the debug token.
    id String
    The provider-assigned unique ID for this managed resource.
    debugTokenId string
    The last segment of the resource name of the debug token.
    id string
    The provider-assigned unique ID for this managed resource.
    debug_token_id str
    The last segment of the resource name of the debug token.
    id str
    The provider-assigned unique ID for this managed resource.
    debugTokenId String
    The last segment of the resource name of the debug token.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing AppCheckDebugToken Resource

    Get an existing AppCheckDebugToken resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: AppCheckDebugTokenState, opts?: CustomResourceOptions): AppCheckDebugToken
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            app_id: Optional[str] = None,
            debug_token_id: Optional[str] = None,
            display_name: Optional[str] = None,
            project: Optional[str] = None,
            token: Optional[str] = None) -> AppCheckDebugToken
    func GetAppCheckDebugToken(ctx *Context, name string, id IDInput, state *AppCheckDebugTokenState, opts ...ResourceOption) (*AppCheckDebugToken, error)
    public static AppCheckDebugToken Get(string name, Input<string> id, AppCheckDebugTokenState? state, CustomResourceOptions? opts = null)
    public static AppCheckDebugToken get(String name, Output<String> id, AppCheckDebugTokenState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    AppId string
    The ID of a Web App, Apple App, or Android App


    DebugTokenId string
    The last segment of the resource name of the debug token.
    DisplayName string
    A human readable display name used to identify this debug token.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Token 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.
    AppId string
    The ID of a Web App, Apple App, or Android App


    DebugTokenId string
    The last segment of the resource name of the debug token.
    DisplayName string
    A human readable display name used to identify this debug token.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Token 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.
    appId String
    The ID of a Web App, Apple App, or Android App


    debugTokenId String
    The last segment of the resource name of the debug token.
    displayName String
    A human readable display name used to identify this debug token.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    token 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.
    appId string
    The ID of a Web App, Apple App, or Android App


    debugTokenId string
    The last segment of the resource name of the debug token.
    displayName string
    A human readable display name used to identify this debug token.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    token 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.
    app_id str
    The ID of a Web App, Apple App, or Android App


    debug_token_id str
    The last segment of the resource name of the debug token.
    display_name str
    A human readable display name used to identify this debug token.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    token str
    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.
    appId String
    The ID of a Web App, Apple App, or Android App


    debugTokenId String
    The last segment of the resource name of the debug token.
    displayName String
    A human readable display name used to identify this debug token.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    token 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.

    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:

    $ pulumi import gcp:firebase/appCheckDebugToken:AppCheckDebugToken default projects/{{project}}/apps/{{app_id}}/debugTokens/{{debug_token_id}}
    
    $ pulumi import gcp:firebase/appCheckDebugToken:AppCheckDebugToken default {{project}}/{{app_id}}/{{debug_token_id}}
    
    $ pulumi import gcp:firebase/appCheckDebugToken:AppCheckDebugToken default {{app_id}}/{{debug_token_id}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Google Cloud Classic v7.20.0 published on Wednesday, Apr 24, 2024 by Pulumi