Open ocofaigh opened 1 month ago
@z0za Can you look into the issue
hey @ocofaigh - it is expected. there has been a change in the behaviour of the cluster resource and now the workerpool related fields only affect the cluster creation. https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/container_vpc_cluster#operating_system
@attilatabori has written a blog post describing the change: https://community.ibm.com/community/user/blogs/attila-lszl-tbori/2024/01/22/upcoming-changes-to-ibm-cloud-terraform-provider
after the cluster and default workerpool have been created, the user needs to create a workerpool resource with import_on_create
is set to true
to be able to manage the default workerpool.
https://github.com/IBM-Cloud/terraform-provider-ibm/blob/master/ibm/service/kubernetes/resource_ibm_container_worker_pool.go#L195
unfortunately the import_on_create
flag is missing from the documentation, so we will need to fix it.
[edit] created a PR for this: https://github.com/IBM-Cloud/terraform-provider-ibm/pull/5506
Changing the value of
operating_system
on existing cluster that was created usingibm_container_vpc_cluster
does not trigger a destroy and create of the cluster. This is not consistent with the terraform common practices - it should attempt to destroy and recreate. It is up to the user of the provider to decide on the behavior, rather than the provider itself. https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes change field exists for this reason.Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
Cluster should destroy and create if the value of
operating_system
is changedActual Behavior
No changes identified
Steps to Reproduce
terraform apply
withoperating_system
value set toREDHAT_8_64
terraform apply
withoperating_system
value now set toRHCOS
Important Factoids
References
0000