| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** AUTO GENERATED CODE *** Type: MMv1 *** |
| # |
| # ---------------------------------------------------------------------------- |
| # |
| # This file is automatically generated by Magic Modules and manual |
| # changes will be clobbered when the file is regenerated. |
| # |
| # Please read more about how to change this file in |
| # .github/CONTRIBUTING.md. |
| # |
| # ---------------------------------------------------------------------------- |
| subcategory: "Firebase App Check" |
| description: |- |
| A debug token is a secret used during the development or integration testing of |
| an app. |
| --- |
| |
| # google\_firebase\_app\_check\_debug\_token |
| |
| 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) |
| |
| ~> **Warning:** All arguments including the following potentially sensitive |
| values will be stored in the raw state as plain text: `token`. |
| [Read more about sensitive data in state](https://www.terraform.io/language/state/sensitive-data). |
| |
| ## Example Usage - Firebase App Check Debug Token Basic |
| |
| |
| ```hcl |
| resource "google_firebase_web_app" "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. |
| resource "time_sleep" "wait_30s" { |
| depends_on = [google_firebase_web_app.default] |
| create_duration = "30s" |
| } |
| |
| resource "google_firebase_app_check_debug_token" "default" { |
| project = "my-project-name" |
| app_id = google_firebase_web_app.default.app_id |
| display_name = "Debug Token" |
| token = "00000000-AAAA-BBBB-CCCC-000000000000" |
| |
| depends_on = [time_sleep.wait_30s] |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `display_name` - |
| (Required) |
| A human readable display name used to identify this debug token. |
| |
| * `token` - |
| (Required) |
| 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` - |
| (Required) |
| 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) |
| |
| |
| - - - |
| |
| |
| * `project` - (Optional) The ID of the project in which the resource belongs. |
| If it is not provided, the provider project is used. |
| |
| |
| ## Attributes Reference |
| |
| In addition to the arguments listed above, the following computed attributes are exported: |
| |
| * `id` - an identifier for the resource with format `projects/{{project}}/apps/{{app_id}}/debugTokens/{{debug_token_id}}` |
| |
| * `debug_token_id` - |
| The last segment of the resource name of the debug token. |
| |
| |
| ## Timeouts |
| |
| This resource provides the following |
| [Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options: |
| |
| - `create` - Default is 20 minutes. |
| - `update` - Default is 20 minutes. |
| - `delete` - Default is 20 minutes. |
| |
| ## 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}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import DebugToken using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "projects/{{project}}/apps/{{app_id}}/debugTokens/{{debug_token_id}}" |
| to = google_firebase_app_check_debug_token.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), DebugToken can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_firebase_app_check_debug_token.default projects/{{project}}/apps/{{app_id}}/debugTokens/{{debug_token_id}} |
| $ terraform import google_firebase_app_check_debug_token.default {{project}}/{{app_id}}/{{debug_token_id}} |
| $ terraform import google_firebase_app_check_debug_token.default {{app_id}}/{{debug_token_id}} |
| ``` |
| |
| ## User Project Overrides |
| |
| This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |