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

Limitations with Labels, only able to create when resource is created, no updates. #2109

Closed
kevinbarker1960 opened this issue Dec 11, 2020 · 2 comments

Comments

@kevinbarker1960
Copy link

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Terraform v0.12.29

  • provider.ibm v1.16.1

Affected Resource(s)

Please list the resources as a list, for example:

  • ibm_container_vpc_cluster
  • ibm_container_vpc_worker_pool

If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.

Terraform Configuration Files

resource "ibm_container_vpc_worker_pool" "egress" {
...	
  	labels           = var.iks_cluster_egress_worker_pool_labels
... 	
}
 resource "ibm_container_vpc_cluster" "cluster" {
 ...
  	worker_labels =var.iks_cluster_default_worker_pool_labels
...
}
variable "iks_cluster_egress_worker_pool_labels" {
  default = {
    "workertype"   = "egress"
    "istio-egress" = "true"
  }
}
variable "iks_cluster_default_worker_pool_labels" {
    default = {}
}

Expected Behavior

What should have happened?
After the ibm_container_vpc_worker_pool and ibm_container_vpc_cluster were created, we changed the value of the labels.

  "iks_cluster_egress_worker_pool_labels": {
    "egress-label-name2": "egress-label-value2",
    "egress-label-name1": "egress-label-value1"
  },
  "iks_cluster_default_worker_pool_labels": {
    "junit-label-name1": "junit-default-value1",
    "junit-label-name2": "junit-default-value2"
  }

Then ran plan, and ran apply. So the new labels should have shown up.

Actual Behavior

What actually happened?
If the resources have not been created yet, whatever the labels are set to will be created.
Once the resources have been created, and we are just modifying the labels (add, delete, modify), the labels are not updated.
The plan did not indicate anything needed to be updated.
The apply ran and did not update the labels.

Steps to Reproduce

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

  1. terraform plan
  2. terraform apply
  3. Verify the default labels showed up as defined
  4. Supply new values for the labels in variables.json (did not update the defaults)
  5. terraform plan
  6. terraform apply
  7. Verify labels did not change from those seen in step 3
    8.terraform destroy
  8. terraform plan
  9. terraform apply
  10. Verify the labels defined in step 4 have now been created

Note, when working the "tags" for ibm_container_vpc_cluster, any change variables is noticed and the cluster is updated.

Important Factoids

Working with IBM Cloud VPC Gen 2 Clusters

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? No.

@wderezin
Copy link
Contributor

The PR for this feature was merged yesterday, PR #2077

@wderezin
Copy link
Contributor

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

3 participants