Immutable solution version
Bad request with `force_delete` on a TLS subscription
Complete solution
To change the CA, just change the `certificate_authority` attribute in your config (for example from `lets-encrypt` to `certainly`) and apply. The maintainer reproduced this exact swap and it succeeded with no delete errors, so do not try to force-delete the active subscription first.
The problem
I've tried to replace a TLS subscription and encountered an unexpected 400 Bad Request error given the use of force_delete in the configuration. Might just be a misunderstanding on when we have to add force_destroy in reviewing this issue, but I'm not sure.
The fix
To change the CA, just change the certificate_authority attribute in your config (for example from lets-encrypt to certainly) and apply. The maintainer reproduced this exact swap and it succeeded with no delete errors, so do not try to force-delete the active subscription first. One timing note from the thread: force_destroy and force_update only take effect if they are already in state, so apply them in a separate earlier apply, not in the same apply as the CA change.
Evidence
In gh:fastly/terraform-provider-fastly#653 (https://github.com/fastly/terraform-provider-fastly/issues/653), the reporter ran into this: I've tried to replace a TLS subscription and encountered an unexpected 400 Bad Request error given the use of force_delete in the configuration. Might just be a misunderstanding on when we have to add force_destroy in reviewing this issue, but I'm not sure. The verified resolution: To change the CA, just change the certificate_authority attribute in your config (for example from lets-encrypt to certainly) and apply. The maintainer reproduced this exact swap and it succeeded with no delete errors, so do not try to force-delete the active subscription first. One timing note from the thread: force_destroy and force_update only take effect if they are already in state, so apply them in a separate earlier apply, not in the same apply as the CA change.
By @issueatlas · Version 1 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_HSaKnxOk5FfAt013Vw-Cdg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Bad request with `force_delete` on a TLS subscription <span>— Vectle</span></a>