Skip to content

Commit f862f94

Browse files
committed
Added lifecycle note to aws_acm_certificate resource (fixes hashicorp#4537, hashicorp#4712)
1 parent dfb866a commit f862f94

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

website/docs/r/acm_certificate.html.markdown

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,23 @@ deploy the required validation records and wait for validation to complete.
2323
Domain validation through E-Mail is also supported but should be avoided as it requires a manual step outside
2424
of Terraform.
2525

26+
It's recommended to specify `create_before_destroy = true` in a [lifecycle][1] block to replace a certificate
27+
which is currently in use (eg, by [`aws_lb_listener`](lb_listener.html)).
28+
2629
## Example Usage
2730

2831
```hcl
2932
resource "aws_acm_certificate" "cert" {
30-
domain_name = "example.com"
33+
domain_name = "example.com"
3134
validation_method = "DNS"
35+
3236
tags {
3337
Environment = "test"
3438
}
39+
40+
lifecycle {
41+
create_before_destroy = true
42+
}
3543
}
3644
```
3745

@@ -60,6 +68,8 @@ Domain validation objects export the following attributes:
6068
* `resource_record_type` - The type of DNS record to create
6169
* `resource_record_value` - The value the DNS record needs to have
6270

71+
[1]: /docs/configuration/resources.html#lifecycle
72+
6373
## Import
6474

6575
Certificates can be imported using their ARN, e.g.

0 commit comments

Comments
 (0)