google_recaptcha_enterprise_key

The RecaptchaEnterprise Key resource

Example Usage - android_key

A basic test of recaptcha enterprise key that can be used by Android apps

resource "google_recaptcha_enterprise_key" "primary" {
  display_name = "display-name-one"

  android_settings {
    allow_all_package_names = true
    allowed_package_names   = []
  }

  project = "my-project-name"

  testing_options {
    testing_score = 0.8
  }

  labels = {
    label-one = "value-one"
  }
}

Example Usage - ios_key

A basic test of recaptcha enterprise key that can be used by iOS apps

resource "google_recaptcha_enterprise_key" "primary" {
  display_name = "display-name-one"

  ios_settings {
    allow_all_bundle_ids = true
    allowed_bundle_ids   = []
  }

  project = "my-project-name"

  testing_options {
    testing_score = 1
  }

  labels = {
    label-one = "value-one"
  }
}

Example Usage - minimal_key

A minimal test of recaptcha enterprise key

resource "google_recaptcha_enterprise_key" "primary" {
  display_name = "display-name-one"
  project      = "my-project-name"

  web_settings {
    integration_type  = "SCORE"
    allow_all_domains = true
  }

  labels = {}
}

Example Usage - waf_key

A basic test of recaptcha enterprise key that includes WAF settings

resource "google_recaptcha_enterprise_key" "primary" {
  display_name = "display-name-one"
  project      = "my-project-name"

  testing_options {
    testing_challenge = "NOCAPTCHA"
    testing_score     = 0.5
  }

  waf_settings {
    waf_feature = "CHALLENGE_PAGE"
    waf_service = "CA"
  }

  web_settings {
    integration_type              = "INVISIBLE"
    allow_all_domains             = true
    allowed_domains               = []
    challenge_security_preference = "USABILITY"
  }

  labels = {
    label-one = "value-one"
  }
}

Example Usage - web_key

A basic test of recaptcha enterprise key that can be used by websites

resource "google_recaptcha_enterprise_key" "primary" {
  display_name = "display-name-one"
  project      = "my-project-name"

  testing_options {
    testing_challenge = "NOCAPTCHA"
    testing_score     = 0.5
  }

  web_settings {
    integration_type              = "CHECKBOX"
    allow_all_domains             = true
    allowed_domains               = []
    challenge_security_preference = "USABILITY"
  }

  labels = {
    label-one = "value-one"
  }
}

Example Usage - web_score_key

A basic test of recaptcha enterprise key with score integration type that can be used by websites

resource "google_recaptcha_enterprise_key" "primary" {
  display_name = "display-name-one"
  project      = "my-project-name"

  testing_options {
    testing_score = 0.5
  }

  web_settings {
    integration_type  = "SCORE"
    allow_all_domains = true
    allow_amp_traffic = false
    allowed_domains   = []
  }

  labels = {
    label-one = "value-one"
  }
}

Argument Reference

The following arguments are supported:


Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effective_labels for all of the labels present on the resource.

The android_settings block supports:

The ios_settings block supports:

The testing_options block supports:

The waf_settings block supports:

The web_settings block supports:

Attributes Reference

In addition to the arguments listed above, the following computed attributes are exported:

Timeouts

This resource provides the following Timeouts configuration options:

Import

Key can be imported using any of these accepted formats:

In Terraform v1.5.0 and later, use an import block to import Key using one of the formats above. For example:

import {
  id = "projects/{{project}}/keys/{{name}}"
  to = google_recaptcha_enterprise_key.default
}

When using the terraform import command, Key can be imported using one of the formats above. For example:

$ terraform import google_recaptcha_enterprise_key.default projects/{{project}}/keys/{{name}}
$ terraform import google_recaptcha_enterprise_key.default {{project}}/{{name}}
$ terraform import google_recaptcha_enterprise_key.default {{name}}