Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems modifying stale_if_error #812

Open
rickardkarlsson opened this issue Feb 26, 2024 · 1 comment
Open

Problems modifying stale_if_error #812

rickardkarlsson opened this issue Feb 26, 2024 · 1 comment

Comments

@rickardkarlsson
Copy link

Terraform Version

Terraform v1.7.4
on darwin_arm64
+ provider registry.terraform.io/datadog/datadog v3.36.1
+ provider registry.terraform.io/fastly/fastly v5.6.0
+ provider registry.terraform.io/hashicorp/google v4.84.0
+ provider registry.terraform.io/hashicorp/google-beta v4.84.0
+ provider registry.terraform.io/hashicorp/random v3.6.0

Affected Fastly Terraform Resource(s)

Please list the affected resources, for example:

  • fastly_service_vcl

Terraform Configuration Files

resource "fastly_service_vcl" "this" {
  name = "test.examples.com"
  domain {
    name = "test.examples.com"
  }
  activate       = true
  stale_if_error = true
}

Expected Behavior

When first creating vcl service with:
stale_if_error = true
and change it to(and run apply):
stale_if_error = false
I would like the change to be applied to my fastly service

Actual Behavior

After changing it to stale_if_error = false and run terraform apply it outputs:

  ~ resource "fastly_service_vcl" "this" {
      ~ active_version     = 2 -> (known after apply)
      ~ cloned_version     = 2 -> (known after apply)
        id                 = "xxxxxx"
        name               = "test.examples.com"
      ~ stale_if_error     = true -> false
}

Plan: 0 to add, 1 to change, 0 to destroy.

But change is not applied to the service itself. I have to manually change it in the GUI to apply it

Debug Output (optional)

I can see the following in debug output

2024-02-26T15:17:58.697+0100 [WARN]  Provider "provider[\"registry.terraform.io/fastly/fastly\"]" produced an unexpected new value for fastly_service_vcl.this, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .stale_if_error: was cty.False, but now cty.True

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply with stale_if_error = true
  2. Change stale_if_error = false
  3. terraform apply
@Integralist
Copy link
Collaborator

Thanks @rickardkarlsson for opening this issue. I've opened an internal ticket to track this and we'll update this GitHub issue when we have any feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants