-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
(I opened this in a different thread and got closed before I had a chance to respond... apologies I was too slow)
- Attempting upgrade from v20.37.2 to v21.10.1
- AWS provider: 6.15
I am trying to upgrade to v21, but it looks like the way node groups are deployed now does not allow any more to target them individually: With version 20 I am able to run a terraform apply -target=module.eks.module.eks_managed_node_group["0"] so I can deploy just one AZ at a time. With version 21, I get an error that suggests I need to target the rest of the node groups as well because of object dependencies. This is a deal breaker for us, some of our workloads require to be available in at least 2 AZs, but if we do a change that requires rolling all the nodes (i.e. a new AMI), then all node groups get updated at the same time.
Is there an alternative way to deploy node groups individually in version 21?
To add more info:
terraform plan ... -target=module.eks.module.eks_managed_node_group["0"]
...
...
Resources instances in your current state have moved to new addresses in the latest configuration. Terraform must include those resource instances while planning in order to ensure a correct result, but your -target=... options do not fully cover all those resource instances.
To create a valid plan, either remove your -target=... options altogether or add the following additional target options:
-target="module.eks.module.eks_managed_node_group[\"1\"].data.aws_caller_identity.current"
-target="module.eks.module.eks_managed_node_group[\"1\"].data.aws_partition.current"
-target="module.eks.module.eks_managed_node_group[\"2\"].data.aws_caller_identity.current"
-target="module.eks.module.eks_managed_node_group[\"2\"].data.aws_partition.current"
...
- When I run a full plan I get no errors
- I am not quite sure why those are required and/or whether I can run a separate targeted apply before doing the node groups.
Any idea what's happening / how to fix it?
Many thanks.
David