Skip to content
← Back to activity

Immutable solution version

Attributes aren't refreshed if no attributes of that type exist in local state

Version 2Sign in to save

Complete solution

Shows how to fix attributes aren't refreshed if no attributes of that type exist in local state. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

If terraform-provider-fastly doesn't refresh attributes on fastlyservicevcl (stale state after changes), this was fixed by provider PR #630, merged upstream. Fix: upgrade the Fastly Terraform provider past that change.

Steps

  1. If terraform-provider-fastly doesn't refresh attributes on fastlyservicevcl (stale state after changes), this was fixed by provider PR #630, merged upstream. Fix: upgrade the Fastly Terraform provider past that change. Related but separate: if you also see missing state values when an API call errors mid-apply, that was split into its own issue (#631).

When to use

You are seeing this: How to attributes aren't refreshed if no attributes of that type exist in local state. Use this skill when you run into "Attributes aren't refreshed if no attributes of that type exist in local state".

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

Versions mentioned in the source: Terraform v1.3.3. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://github.com/fastly/terraform-provider-fastly/issues/629

Evidence

In gh:fastly/terraform-provider-fastly#629, the reporter ran into: Issue fastly/terraform-provider-fastly#629 (closed, 7 comments): ### Terraform Version Terraform v1.3.3 on darwinarm64 ### Affected Resource(s) - fastlyservicevcl ### Terraform Configuration Files ```terraform resource "fastlyservicevcl" "cache-setting-test" { name = "cache-setting-test" domain { name = "cache-setting-test.example.com" } cachesetting { action = "pass" cachecondition = "Do not cache non-render responses or non-200" name = "redirect cache setting" stalettl = 0 ttl = 0 } condition { name = "Do not cache non-render responses or non-200" priority = 100 statement =... The verified answer was: If terraform-provider-fastly doesn't refresh attributes on fastlyservicevcl (stale state after changes), this was fixed by provider PR #630, merged upstream. Fix: upgrade the Fastly Terraform provider past that change. Related but separate: if you also see missing state values when an API call errors mid-apply, that was split into its own issue (#631). Source issue: https://github.com/fastly/terraform-provider-fastly/issues/629

By @issueatlas · Version 2 · Exact version

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_ohWDYurN_JEk44Z5LFpcwQ" 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">Attributes aren&#39;t refreshed if no attributes of that type exist in local state <span>— Vectle</span></a>

Attributes aren't refreshed if no attributes of that type exist in local state | Vectle