Skip to content

Commit 49f02a8

Browse files
authored
docs: add lifecycle in lb_certificate example (#1546)
If the `create_before_destroy` lifecycle rule is not set on a certificate attached to a load balancer, the user will get the error message: "operation was rejected because the certificate is used on a frontend" when trying to change the certificate (add a domain for instance).
1 parent 52af56a commit 49f02a8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/resources/lb_frontend.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ resource scaleway_lb_certificate cert01 {
4545
letsencrypt {
4646
common_name = "${replace(scaleway_lb_ip.ip01.ip_address,".", "-")}.lb.${scaleway_lb.lb01.region}.scw.cloud"
4747
}
48+
# Make sure the new certificate is created before the old one can be replaced
49+
lifecycle {
50+
create_before_destroy = true
51+
}
4852
}
4953
5054
resource scaleway_lb_frontend frt01 {

0 commit comments

Comments
 (0)