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

Failure when plan changes during apply-all #1419

Closed
sgasquet opened this issue Nov 5, 2020 · 4 comments
Closed

Failure when plan changes during apply-all #1419

sgasquet opened this issue Nov 5, 2020 · 4 comments
Assignees

Comments

@sgasquet
Copy link

sgasquet commented Nov 5, 2020

Hi there,

We currently use terragrunt to deploy all the stack of our infrastructure on AWS.
Starting from nothing, and building Networks, Security, EKS cluster, Data etc.

Context:

AWS EKS provider : https://github.com/terraform-aws-modules/terraform-aws-eks?ref=v12.2.0
Terragrunt : v0.22.1
Terraform : v0.12.24

The issue we are facing is during the EKS step, as the plan changes during the apply-all, Terragrunt fails and needs a second execution of the apply-all to finish.

With more details, the error of the provider is :

Error: Provider produced inconsistent final plan
When expanding the plan for
module.eks-1.module.eks.aws_autoscaling_group.workers_launch_template[1] to
include new values learned so far during apply, provider
"registry.terraform.io/-/aws" produced an invalid new value for .tags: length
changed from 7 to 8.
This is a bug in the provider, which should be reported in the provider's own
issue tracker.

The thing is, during the apply, EKS adds a tag which is :

              + "key"                 = "kubernetes.io/cluster/CLUSTER-eks-1-xxxx"
              + "propagate_at_launch" = "true"
              + "value"               = "owned"

Of course that tag was not present in the very first plan before the apply, as the value is computed at creation of the EKS cluster.
That causes the failure of the apply.

Is there any thing to do with terragrunt to "update" the plan during apply and successfully deploy in one time ?
Or is it only related to the aws eks provider ?

Thanks for your help !

Sylvain.

@yorinasub17
Copy link
Contributor

This is actually a terraform bug (and specifically, an issue with the provider, as indicated in the error message). I would recommend reporting this on https://github.com/hashicorp/terraform-provider-aws.

Side note: this looks awfully like hashicorp/terraform-provider-aws#14085

@yorinasub17 yorinasub17 self-assigned this Nov 5, 2020
@sgasquet
Copy link
Author

sgasquet commented Nov 5, 2020

Thanks man we have the exact same problem !
Will see for reporting directly to the github you mentionned.

Duplicate of hashicorp/terraform-provider-aws#14085

@sgasquet sgasquet closed this as completed Nov 5, 2020
@sgasquet
Copy link
Author

sgasquet commented Nov 9, 2020

@yorinasub17 problem solved in https://github.com/terraform-aws-modules/terraform-aws-eks/releases/tag/v13.2.0 !
I had to upgrade aws provider to 3.3.0 too and all went fine.

No more issue with tags, apply-all is now nice and smooth.

@yorinasub17
Copy link
Contributor

Glad to hear it was resolved! Thanks for closing the loop here!

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

2 participants