Immutable solution version
Phantom Compute service changes caused by `source_code_hash` discrepancies
Complete solution
Shows how to fix phantom Compute service changes caused by `source_code_hash` discrepancies. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Run one apply to update the stored hash; subsequent plans should come back clean. Issue fastly/terraform-provider-fastly#1160 (closed, 11 comments): ## Overview Last week I noticed that the provider keeps reporting a pending change even though the Compute binary remains unchanged.
Steps
- Issue fastly/terraform-provider-fastly#1160 (closed, 11 comments): ## Overview Last week I noticed that the provider keeps reporting a pending change even though the Compute binary remains unchanged. No matter how many times you apply the change, the result is always identical: ```console Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # module.compute.fastlyservicecompute.foo will be updated in-place ~ resource "fastlyservicecompute" "foo" { ~ active_version = 112 -> (known after apply) ~...
- The phantom diffs came from an upstream hash behavior issue that has since been corrected. Run one apply to update the stored hash; subsequent plans should come back clean.
When to use
You are seeing this: The phantom diffs came from an upstream hash behavior issue that has since been corrected. Use this skill when you run into "Phantom Compute service changes caused by source_code_hash discrepancies".
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#1160 (Fastly CDN), the issue reported was: Issue fastly/terraform-provider-fastly#1160 (closed, 11 comments): ## Overview Last week I noticed that the provider keeps reporting a pending change even though the Compute binary remains unchanged. No matter how many times you apply the change, the result is always identical: ```console Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols: ~ update in-place Terraform will perform the following actions: # module.compute.fastlyservicecompute.foo will be updated in-place ~ resource "fastlyservicecompute" "foo" { ~ active_version = 112 -> (known after apply) ~... The verified resolution from the thread: The phantom diffs came from an upstream hash behavior issue that has since been corrected. Run one apply to update the stored hash; subsequent plans should come back clean. Source: mount the host path https at container path //github.com/fastly/terraform-provider-fastly/issues/1160
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_jkoNhucZpmxpEosFI8BdJg" 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">Phantom Compute service changes caused by `source_code_hash` discrepancies <span>— Vectle</span></a>