You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
Do not leave "+1" or other comments that do not add relevant information or questions.
If you are interested in working on this issue or have submitted a pull request, please leave a comment.
Terraform
1.10.4
Terraform Provider
1.4.7
Description
The tanzu-mission-control_helm_feature resource is created as part of a larger terraform module structure. Executing terraform apply after the creation of tanzu-mission-control_helm_feature causes a terraform failure. Based on a debug message, I believe the failure is due to a change in the .status["phase"] value. The stored state has Enabling, but the reported state is Enabled.
Terraform will perform the following actions:
# module.cluster_module.tanzu-mission-control_helm_feature.cluster_helm_feature will be updated in-place
~ resource "tanzu-mission-control_helm_feature" "cluster_helm_feature" {
id = "c:01JHRK0WPJ8GGEPS1X28VXQBQ6"
# (1 unchanged attribute hidden)
~ meta {
+ description = "Enable Helm feature for the cluster"
# (4 unchanged attributes hidden)
}
# (1 unchanged block hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
module.cluster_module.tanzu-mission-control_helm_feature.cluster_helm_feature: Modifying... [id=c:01JHRK0WPJ8GGEPS1X28VXQBQ6]
╷
│ Error: doesn't support update
│
│ with module.cluster_module.tanzu-mission-control_helm_feature.cluster_helm_feature,
│ on .terraform/modules/cluster_module/tmc.tf line 179, in resource "tanzu-mission-control_helm_feature" "cluster_helm_feature":
│ 179: resource "tanzu-mission-control_helm_feature" "cluster_helm_feature" {
│
╵
DEBUG MESSAGE
2025-01-17T16:46:10.161-0700 [WARN] Provider "registry.terraform.io/vmware/tanzu-mission-control" produced an unexpected new value for module.cluster_module.tanzu-mission-control_helm_feature.cluster_helm_feature during refresh.
- .status["phase"]: was cty.StringVal("Enabling"), but now cty.StringVal("Enabled")
- .meta[0].resource_version: was cty.StringVal("11"), but now cty.StringVal("13")
Affected Resources or Data Sources
resource/tanzu-mission-control_helm_feature
Terraform Configuration
resource "tanzu-mission-control_helm_feature" "cluster_helm_feature" {
depends_on = [tanzu-mission-control_tanzu_kubernetes_cluster.tkgm_cluster]
scope {
cluster {
name = var.cluster
provisioner_name = var.provisioner
management_cluster_name = var.management_cluster
}
}
meta {
description = "Enable Helm feature for the cluster"
}
}
Figured out a work around by ignoring changes to the attributes. Just ignoring the phase for status was sufficient, but meta had more changes, so I just ignored the entire list. Maybe this could just be a documentation change?
# Tanzu Mission Control cluster scope helm feature.
resource "tanzu-mission-control_helm_feature" "cluster_helm_feature" {
depends_on = [tanzu-mission-control_tanzu_kubernetes_cluster.tkgm_cluster]
scope {
cluster {
name = var.cluster
provisioner_name = var.provisioner
management_cluster_name = var.management_cluster
}
}
meta {
description = "Enable Helm feature for the cluster"
}
# Ignore changes to the status.phase and meta fields. This was causing an error after
# the helm feature was created. It does not support an update, and these attributes
# were getting different values. Status changed from "Enabling" to "Enabled" and meta
# had several changes. These changes are not relevant to the feature itself being enable.
lifecycle {
ignore_changes = [
status["phase"],
meta,
]
}
}
Code of Conduct
Terraform
1.10.4
Terraform Provider
1.4.7
Description
The tanzu-mission-control_helm_feature resource is created as part of a larger terraform module structure. Executing
terraform apply
after the creation of tanzu-mission-control_helm_feature causes a terraform failure. Based on a debug message, I believe the failure is due to a change in the .status["phase"] value. The stored state hasEnabling
, but the reported state isEnabled
.DEBUG MESSAGE
Affected Resources or Data Sources
resource/tanzu-mission-control_helm_feature
Terraform Configuration
Debug Output
https://gist.github.com/stevewallone/b3ce635b7585cbd4fde5c71223fdb5ee
Panic Output
No response
Expected Behavior
The
terraform apply
should see the resource as unchanged.Actual Behavior
terraform apply
detects a change to the resource.Steps to Reproduce
terraform apply
to create the resource.terraform apply
again.Environment Details
No response
Screenshots
No response
References
No response
The text was updated successfully, but these errors were encountered: