An app's reCAPTCHA Enterprise configuration object.
To get more information about RecaptchaEnterpriseConfig, see:
# Enables the reCAPTCHA Enterprise API
resource "google_project_service" "recaptcha_enterprise" {
provider = google-beta
project = "my-project-name"
service = "recaptchaenterprise.googleapis.com"
# Don't disable the service if the resource block is removed by accident.
disable_on_destroy = false
}
resource "google_firebase_web_app" "default" {
provider = google-beta
project = "my-project-name"
display_name = "Web App for reCAPTCHA Enterprise"
}
# 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_recaptcha_enterprise_config" "default" {
provider = google-beta
project = "my-project-name"
app_id = google_firebase_web_app.default.app_id
site_key = "6LdpMXIpAAAAANkwWQPgEdjEhal7ugkH9RK9ytuw"
token_ttl = "7200s"
depends_on = [time_sleep.wait_30s]
}
The following arguments are supported:
site_key
-
(Required)
The score-based site key created in reCAPTCHA Enterprise used to invoke reCAPTCHA and generate the reCAPTCHA tokens for your application.
Important: This is not the siteSecret (as it is in reCAPTCHA v3), but rather your score-based reCAPTCHA Enterprise site key.
app_id
-
(Required)
The ID of an
Web App.
token_ttl
-
(Optional)
Specifies the duration for which App Check tokens exchanged from reCAPTCHA Enterprise 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".
project
- (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
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}}/recaptchaEnterpriseConfig
name
-
The relative resource name of the reCAPTCHA Enterprise configuration object
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.RecaptchaEnterpriseConfig can be imported using any of these accepted formats:
projects/{{project}}/apps/{{app_id}}/recaptchaEnterpriseConfig
{{project}}/{{app_id}}
{{app_id}}
In Terraform v1.5.0 and later, use an import
block to import RecaptchaEnterpriseConfig using one of the formats above. For example:
import {
id = "projects/{{project}}/apps/{{app_id}}/recaptchaEnterpriseConfig"
to = google_firebase_app_check_recaptcha_enterprise_config.default
}
When using the terraform import
command, RecaptchaEnterpriseConfig can be imported using one of the formats above. For example:
$ terraform import google_firebase_app_check_recaptcha_enterprise_config.default projects/{{project}}/apps/{{app_id}}/recaptchaEnterpriseConfig
$ terraform import google_firebase_app_check_recaptcha_enterprise_config.default {{project}}/{{app_id}}
$ terraform import google_firebase_app_check_recaptcha_enterprise_config.default {{app_id}}
This resource supports User Project Overrides.