Skip to content

tanzu-mission-control_helm_feature Terraform Apply Update Failure #493

Open
@stevewallone

Description

@stevewallone

Code of Conduct

  • I have read and agree to the Code of Conduct.
  • 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"
  }
}

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

  • Run terraform apply to create the resource.
  • Run terraform apply again.

Environment Details

No response

Screenshots

No response

References

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions