-
Notifications
You must be signed in to change notification settings - Fork 44
Description
Description
After terraform apply, the provider returns an invalid result object for stackit_ske_cluster.extensions.dns.zones. Terraform reports that this attribute remains unknown even though all values must be known post-apply. Terraform saves other known values but flags this as a provider bug.
Error excerpt:
Error: Provider returned invalid result object after apply
After the apply operation, the provider still indicated an unknown value for stackit_ske_cluster.example.extensions.dns.zones. All values must be known after apply, so this is
always a bug in the provider and should be reported in the provider's own repository. Terraform will still save the other known object values in the state.
Steps to reproduce
terraform {
required_version = ">= 1.6.0"
required_providers {
stackit = {
source = "stackitcloud/stackit"
version = ">= 0.73.0"
}
}
}
provider "stackit" {
# authentication config if needed
}
variable "project_id" {
type = string
}
locals {
example_ske_cluster_name = "tf-example-ske-cluster"
}
resource "stackit_ske_cluster" "example" {
project_id = var.project_id
name = local.example_ske_cluster_name
kubernetes_version_min = "1.33.6"
node_pools = [
{
name = "np-example"
machine_type = "g1a.2d"
os_version = "4230.2.3"
minimum = "2"
maximum = "3"
availability_zones = ["eu01-2"]
}
]
maintenance = {
enable_kubernetes_version_updates = true
enable_machine_image_version_updates = true
start = "01:00:00Z"
end = "02:00:00Z"
}
extensions = {
dns = {
enabled = false
}
observability = {
enabled = false
}
acl = {
enabled = true
allowed_cidrs = [
"0.0.0.0/0"
]
}
}
}
resource "stackit_ske_kubeconfig" "example" {
project_id = var.project_id
cluster_name = stackit_ske_cluster.example.name
refresh = true
expiration = 7200 # 2 hours
refresh_before = 3600 # 1 hour
}
- Run terraform init
- Run terraform plan
- Run terraform apply
- Observe the error reported after apply.
Actual behavior
Terraform reports:
│ Error: Provider returned invalid result object after apply
│
│ After the apply operation, the provider still indicated an unknown value for stackit_ske_cluster.example.extensions.dns.zones. All values must be known after apply, so this is
│ always a bug in the provider and should be reported in the provider's own repository. Terraform will still save the other known object values in the state.
╵
The cluster and other attributes appear to be created/saved, but the provider leaves extensions.dns.zones as an unknown value in the returned object/state even when extensions.dns.enabled = false.
Expected behavior
All attributes of stackit_ske_cluster, including extensions.dns.zones, should be known and finalized after apply. If dns.enabled = false, the provider should either:
Omit zones (if optional) or
Return a deterministic, known value (e.g., []), rather than an unknown placeholder.
Environment
OS: Windows (amd64)
Terraform version: v1.14.1
Providers:
registry.terraform.io/stackitcloud/stackit v0.73.0
Additional information
The issue occurs even when DNS extension is disabled (dns.enabled = false), which suggests the provider still tries to read or set extensions.dns.zones as unknown.
The behavior persists across repeated applies.
If needed, I can attach the Terraform state snippet for the affected resource and provider debug logs (TF_LOG=DEBUG).