terraform-provider-stackit icon indicating copy to clipboard operation
terraform-provider-stackit copied to clipboard

Activating DNS extension in SKE results in "Provider produced inconsistent result after apply" error

Open gabschne opened this issue 11 months ago • 2 comments

Hi,

I just activated the DNS extension in my SKE cluster without specifiying the optional zones filter:

resource "stackit_ske_cluster" "ske_cluster" {
  project_id             = local.stackit_project_id
  kubernetes_version_min = "1.31.4"
  [...]
  extensions = {
    dns = {
      enabled = true
    }
  }
[...]
}

However, applying it failed with the following error:

│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to stackit_ske_cluster.ske_cluster, provider
│ "provider[\"registry.opentofu.org/stackitcloud/stackit\"]" produced an
│ unexpected new value: .extensions.dns.zones: was null, but now
│ cty.ListValEmpty(cty.String).
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵

The issue is the zones property, as the plan doesn't indicate it as an expected (known after apply) value because it was null:

+ extensions = {
     + dns = {
       + enabled = true
     }
  }

Therefore adding a zones property workarounds the bug.

gabschne avatar Feb 11 '25 17:02 gabschne

Hello @gabschne, thanks for detailed report. This seems to be an issue in the terraform provider, we will address this as soon as possible

bahkauv70 avatar Feb 18 '25 07:02 bahkauv70

FWIW: can't reproduce with the latest release.

franklouwers avatar Aug 18 '25 15:08 franklouwers