-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Cannot change subnets of cluster #1752
Comments
this is what is intended by the Terraform AWS provider - please see https://github.com/hashicorp/terraform-provider-aws/blob/6d88292341cd2bee5209da539870bf63eb68c26f/internal/service/eks/cluster.go#L219 |
I understand that changing subnets requires replacing the cluster (which is far from ideal, but that's another discussion). What I don't understand is why it fails to do so. From what I understand of Terraform, when a resource needs to be replaced, the default behavior is to destroy the existing one before creating the new one, unless |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Description
Terraform apply fails when attempting to change the subnets of the cluster. Eg. initially create the cluster with 2 subnets, and then attempt to add a third subnet. The plan considers this requires replacing the cluster, but then apply fails because the new cluster is created before the existing one is deleted (the error is
Cluster already exists with name: terraform-issue-1707-eks
).Versions
Terraform:
Terraform v1.1.3
on linux_amd64
Provider(s):
v18.0.1
Reproduction
autoscaling_azs
) from 2 to 3Expected behavior
It should be possible to add subnets of the cluster
Actual behavior
When adding a subnet, apply fails
Terminal Output Screenshot(s)
Additional context
Follow up to issue #1707
The text was updated successfully, but these errors were encountered: