Skip to content

Commit d056fac

Browse files
authored
docs: add lifecycle note for certificate (#1553)
Fix #1550. A lifecycle instruction is necessary to replace a certificate that is attached to a load balancer. See #1546.
1 parent 6eb6148 commit d056fac

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/resources/lb_certificate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ resource "scaleway_lb_certificate" "cert01" {
2525
"sub2.example.com"
2626
]
2727
}
28+
# Make sure the new certificate is created before the old one can be replaced
29+
lifecycle {
30+
create_before_destroy = true
31+
}
2832
}
2933
```
3034

@@ -87,3 +91,4 @@ In addition to all arguments above, the following attributes are exported:
8791
* In case there are any issues with the certificate, you will receive a `400` error from the `apply` operation.
8892
Use `export TF_LOG=DEBUG` to view exact problem returned by the api.
8993
* Wildcards are not supported with Let's Encrypt yet.
94+
* Use `lifecycle` instruction with `create_before_destroy = true` to permit correct certificate replacement and prevent a `400` error from the `apply` operation.

0 commit comments

Comments
 (0)