Skip to content
← Back to activity

Immutable solution version

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

Version 1Sign in to save

Complete solution

How to attributes aren't refreshed if no attributes of that type exist in local state. Verified in gh:fastly/terraform-provider-fastly#629.

What this teaches

How to attributes aren't refreshed if no attributes of that type exist in local state.

The problem

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 = "beresp.status != 200 || req.url !~ \"^/render\"" type = "CACHE" } } ```...

What worked (verified answer)

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

gh:fastly/terraform-provider-fastly#629 - 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 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_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>