subcategory | description |
---|---|
App Engine |
A domain serving an App Engine application. |
A domain serving an App Engine application.
To get more information about DomainMapping, see:
- API documentation
- How-to Guides
resource "google_app_engine_domain_mapping" "domain_mapping" {
domain_name = "verified-domain.com"
ssl_settings {
ssl_management_type = "AUTOMATIC"
}
}
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. -
override_strategy
- (Optional) Whether the domain creation should override any existing mappings for this domain. By default, overrides are rejected. Default value isSTRICT
. 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.
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, specifySslManagementType.MANUAL
on aCREATE
orUPDATE
request. You must be authorized to administer theAuthorizedCertificate
resource to manually map it to a DomainMapping resource. Example: 12345. -
ssl_management_type
- (Required) SSL management type for this domain. IfAUTOMATIC
, a managed certificate is automatically provisioned. IfMANUAL
,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 managedAuthorizedCertificate
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, thecertificateId
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 thecertificateId
field with an update request.
In addition to the arguments listed above, the following computed attributes are exported:
-
id
- an identifier for the resource with formatapps/{{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.
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
.
This resource provides the following Timeouts configuration options:
create
- Default is 20 minutes.update
- Default is 20 minutes.delete
- Default is 20 minutes.
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 to import DomainMapping using one of the formats above. For example:
import {
id = "apps/{{project}}/domainMappings/{{domain_name}}"
to = google_app_engine_domain_mapping.default
}
When using the terraform import
command, 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}}
This resource supports User Project Overrides.