Commit f87966c
fix: re-register hostname and cert binding after container app updates
When Terraform modifies azurerm_container_app (e.g. adding ADMIN_GITHUB_LOGINS),
the Azure provider sends the full ingress config without custom hostnames, wiping
any previously-registered hostname. The null_resource.hostname_registration was
not re-triggered because its triggers (hostname + app_id) are stable across
modifications — only creation changes the ID.
Add `replace_triggered_by = [azurerm_container_app.this]` to both
null_resource.hostname_registration and null_resource.cert_binding so they
re-run on every container app update, ensuring:
1. The custom hostname is re-registered (required before cert can be issued)
2. The SniEnabled cert binding is re-applied (required for HTTPS to work)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 9911e4c commit f87966c
1 file changed
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
| |||
242 | 248 | | |
243 | 249 | | |
244 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
245 | 257 | | |
246 | 258 | | |
247 | 259 | | |
| |||
0 commit comments