blob: 789215dfa4f7d5bbd1f8db66753745477b768c7f [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** 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: "Certificate manager"
description: |-
CertificateMapEntry is a list of certificate configurations,
that have been issued for a particular hostname
---
# google\_certificate\_manager\_certificate\_map\_entry
CertificateMapEntry is a list of certificate configurations,
that have been issued for a particular hostname
<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_working_dir=certificate_manager_certificate_map_entry_full&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" 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 - Certificate Manager Certificate Map Entry Full
```hcl
resource "google_certificate_manager_certificate_map" "certificate_map" {
name = "cert-map-entry"
description = "My acceptance test certificate map"
labels = {
"terraform" : true,
"acc-test" : true,
}
}
resource "google_certificate_manager_certificate_map_entry" "default" {
name = "cert-map-entry"
description = "My acceptance test certificate map entry"
map = google_certificate_manager_certificate_map.certificate_map.name
labels = {
"terraform" : true,
"acc-test" : true,
}
certificates = [google_certificate_manager_certificate.certificate.id]
matcher = "PRIMARY"
}
resource "google_certificate_manager_certificate" "certificate" {
name = "cert-map-entry"
description = "The default cert"
scope = "DEFAULT"
managed {
domains = [
google_certificate_manager_dns_authorization.instance.domain,
google_certificate_manager_dns_authorization.instance2.domain,
]
dns_authorizations = [
google_certificate_manager_dns_authorization.instance.id,
google_certificate_manager_dns_authorization.instance2.id,
]
}
}
resource "google_certificate_manager_dns_authorization" "instance" {
name = "dns-auth"
description = "The default dnss"
domain = "subdomain.hashicorptest.com"
}
resource "google_certificate_manager_dns_authorization" "instance2" {
name = "dns-auth2"
description = "The default dnss"
domain = "subdomain2.hashicorptest.com"
}
```
## Argument Reference
The following arguments are supported:
* `certificates` -
(Required)
A set of Certificates defines for the given hostname.
There can be defined up to fifteen certificates in each Certificate Map Entry.
Each certificate must match pattern projects/*/locations/*/certificates/*.
* `name` -
(Required)
A user-defined name of the Certificate Map Entry. Certificate Map Entry
names must be unique globally and match pattern
'projects/*/locations/*/certificateMaps/*/certificateMapEntries/*'
* `map` -
(Required)
A map entry that is inputted into the cetrificate map
- - -
* `description` -
(Optional)
A human-readable description of the resource.
* `labels` -
(Optional)
Set of labels associated with a Certificate Map Entry.
An object containing a list of "key": value pairs.
Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.
**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.
* `hostname` -
(Optional)
A Hostname (FQDN, e.g. example.com) or a wildcard hostname expression (*.example.com)
for a set of hostnames with common suffix. Used as Server Name Indication (SNI) for
selecting a proper certificate.
* `matcher` -
(Optional)
A predefined matcher for particular cases, other than SNI selection
* `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}}/locations/global/certificateMaps/{{map}}/certificateMapEntries/{{name}}`
* `create_time` -
Creation timestamp of a Certificate Map Entry. Timestamp in RFC3339 UTC "Zulu" format,
with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
* `update_time` -
Update timestamp of a Certificate Map Entry. Timestamp in RFC3339 UTC "Zulu" format,
with nanosecond resolution and up to nine fractional digits.
Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z".
* `state` -
A serving state of this Certificate Map Entry.
* `terraform_labels` -
The combination of labels configured directly on the resource
and default labels configured on the provider.
* `effective_labels` -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
## 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
CertificateMapEntry can be imported using any of these accepted formats:
* `projects/{{project}}/locations/global/certificateMaps/{{map}}/certificateMapEntries/{{name}}`
* `{{project}}/{{map}}/{{name}}`
* `{{map}}/{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import CertificateMapEntry using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/global/certificateMaps/{{map}}/certificateMapEntries/{{name}}"
to = google_certificate_manager_certificate_map_entry.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), CertificateMapEntry can be imported using one of the formats above. For example:
```
$ terraform import google_certificate_manager_certificate_map_entry.default projects/{{project}}/locations/global/certificateMaps/{{map}}/certificateMapEntries/{{name}}
$ terraform import google_certificate_manager_certificate_map_entry.default {{project}}/{{map}}/{{name}}
$ terraform import google_certificate_manager_certificate_map_entry.default {{map}}/{{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).