| --- |
| # ---------------------------------------------------------------------------- |
| # |
| # *** 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: "App Engine" |
| description: |- |
| A domain serving an App Engine application. |
| --- |
| |
| # google_app_engine_domain_mapping |
| |
| A domain serving an App Engine application. |
| |
| |
| To get more information about DomainMapping, see: |
| |
| * [API documentation](https://cloud.google.com/appengine/docs/admin-api/reference/rest/v1/apps.domainMappings) |
| * How-to Guides |
| * [Official Documentation](https://cloud.google.com/appengine/docs/standard/python/mapping-custom-domains) |
| |
| <div class = "oics-button" style="float: right; margin: 0 0 -15px"> |
| <a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md&cloudshell_working_dir=app_engine_domain_mapping_basic&open_in_editor=main.tf" target="_blank"> |
| <img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;"> |
| </a> |
| </div> |
| ## Example Usage - App Engine Domain Mapping Basic |
| |
| |
| ```hcl |
| resource "google_app_engine_domain_mapping" "domain_mapping" { |
| domain_name = "verified-domain.com" |
| |
| ssl_settings { |
| ssl_management_type = "AUTOMATIC" |
| } |
| } |
| ``` |
| |
| ## Argument Reference |
| |
| The following arguments are supported: |
| |
| |
| * `domain_name` - |
| (Required) |
| Relative name of the domain serving the application. Example: example.com. |
| |
| |
| - - - |
| |
| |
| * `ssl_settings` - |
| (Optional) |
| SSL configuration for this domain. If unconfigured, this domain will not serve with SSL. |
| Structure is [documented below](#nested_ssl_settings). |
| |
| * `override_strategy` - |
| (Optional) |
| Whether the domain creation should override any existing mappings for this domain. |
| By default, overrides are rejected. |
| Default value is `STRICT`. |
| Possible values are: `STRICT`, `OVERRIDE`. |
| |
| * `project` - (Optional) The ID of the project in which the resource belongs. |
| If it is not provided, the provider project is used. |
| |
| |
| <a name="nested_ssl_settings"></a>The `ssl_settings` block supports: |
| |
| * `certificate_id` - |
| (Optional) |
| ID of the AuthorizedCertificate resource configuring SSL for the application. Clearing this field will |
| remove SSL support. |
| By default, a managed certificate is automatically created for every domain mapping. To omit SSL support |
| or to configure SSL manually, specify `SslManagementType.MANUAL` on a `CREATE` or `UPDATE` request. You must be |
| authorized to administer the `AuthorizedCertificate` resource to manually map it to a DomainMapping resource. |
| Example: 12345. |
| |
| * `ssl_management_type` - |
| (Required) |
| SSL management type for this domain. If `AUTOMATIC`, a managed certificate is automatically provisioned. |
| If `MANUAL`, `certificateId` must be manually specified in order to configure SSL for this domain. |
| Possible values are: `AUTOMATIC`, `MANUAL`. |
| |
| * `pending_managed_certificate_id` - |
| (Output) |
| ID of the managed `AuthorizedCertificate` resource currently being provisioned, if applicable. Until the new |
| managed certificate has been successfully provisioned, the previous SSL state will be preserved. Once the |
| provisioning process completes, the `certificateId` field will reflect the new managed certificate and this |
| field will be left empty. To remove SSL support while there is still a pending managed certificate, clear the |
| `certificateId` field with an update request. |
| |
| ## Attributes Reference |
| |
| In addition to the arguments listed above, the following computed attributes are exported: |
| |
| * `id` - an identifier for the resource with format `apps/{{project}}/domainMappings/{{domain_name}}` |
| |
| * `name` - |
| Full path to the DomainMapping resource in the API. Example: apps/myapp/domainMapping/example.com. |
| |
| * `resource_records` - |
| The resource records required to configure this domain mapping. These records must be added to the domain's DNS |
| configuration in order to serve the application via this domain mapping. |
| Structure is [documented below](#nested_resource_records). |
| |
| |
| <a name="nested_resource_records"></a>The `resource_records` block contains: |
| |
| * `name` - |
| (Optional) |
| Relative name of the object affected by this record. Only applicable for CNAME records. Example: 'www'. |
| |
| * `rrdata` - |
| (Optional) |
| Data for this record. Values vary by record type, as defined in RFC 1035 (section 5) and RFC 1034 (section 3.6.1). |
| |
| * `type` - |
| (Optional) |
| Resource record type. Example: `AAAA`. |
| Possible values are: `A`, `AAAA`, `CNAME`. |
| |
| ## 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 |
| |
| |
| DomainMapping can be imported using any of these accepted formats: |
| |
| * `apps/{{project}}/domainMappings/{{domain_name}}` |
| * `{{project}}/{{domain_name}}` |
| * `{{domain_name}}` |
| |
| |
| In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import DomainMapping using one of the formats above. For example: |
| |
| ```tf |
| import { |
| id = "apps/{{project}}/domainMappings/{{domain_name}}" |
| to = google_app_engine_domain_mapping.default |
| } |
| ``` |
| |
| When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), DomainMapping can be imported using one of the formats above. For example: |
| |
| ``` |
| $ terraform import google_app_engine_domain_mapping.default apps/{{project}}/domainMappings/{{domain_name}} |
| $ terraform import google_app_engine_domain_mapping.default {{project}}/{{domain_name}} |
| $ terraform import google_app_engine_domain_mapping.default {{domain_name}} |
| ``` |
| |
| ## User Project Overrides |
| |
| This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override). |