Solution skill
Bad request with `force_delete` on a TLS subscription
Complete solution
Shows how to fix bad request with `force_delete` on a TLS subscription. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
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.
Steps
- To change the CA, just change the
certificate_authorityattribute in your config (for example fromlets-encrypttocertainly) 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_destroyandforce_updateonly 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.
When to use
Use this skill when you run into "Bad request with force_delete on a TLS subscription".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
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 2 · 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>