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

fix: update supported tf version to have < 0.14.0 #1230

Closed
wants to merge 2 commits into from
Closed

fix: update supported tf version to have < 0.14.0 #1230

wants to merge 2 commits into from

Conversation

aidanmelen
Copy link

@aidanmelen aidanmelen commented Feb 10, 2021

modules fails to destroy EKS cluster in 0.14.5 because destroys don't refresh.

PR o'clock

Description

In terraform 0.14+ destroy command no loner refreshes the state of resources before generating execution plan (like it did in 0.13.X). terraform apply still does the refresh, that's why this issue is more frequent the more time elapses after applying.

#1162 (comment)

As a result, the module will fail to destroy all of the resources it manages.

I should say that there is a workaround in 0.14.5. The user will be required to run terraform refresh then terraform destroy.

Checklist

modules fails to destroy EKS cluster in 0.14.5 because destroys don't refresh.
@aidanmelen aidanmelen changed the title Update versions.tf Fix: update supported tf version to have < 0.14.0 Feb 10, 2021
@aidanmelen aidanmelen changed the title Fix: update supported tf version to have < 0.14.0 fix: update supported tf version to have < 0.14.0 Feb 10, 2021
@daroga0002
Copy link
Contributor

I dont think does limiting terraform version is good approach. I would rather try to solve a root cause than limiting terraform updates, especially that 0.14 is considered now as desired and stable version

@aidanmelen
Copy link
Author

@daroga0002 I agree, let's fix it because this problem isn't going away. But this module claims to support 0.14.0 when that is not entirely true. Perhaps we should add a note to the README that says:

If you are using a terraform version greater than 0.14.0, you will need to run terraform refresh prior to running terraform destroy.

I just thought something like this would save people the 30 minutes of head scratching when the terraform destroy fails.

@daroga0002
Copy link
Contributor

@aidanmelen can you describe a issue more (where it is failing, does those are only some module inputs required)?

@aidanmelen
Copy link
Author

@daroga0002 The error can be reproduced by running the basic example on terraform 0.14.X.

The specific resource that the module fails to delete is:

Error: Unauthorized

module.kubernetes_cluster.module.eks.kubernetes_config_map.aws_auth[0] will be destroyed

There is a lot more context in this related issue #1162 than I can provide here on my own. This seems to be causing confusion for a number of people.

@dak1n1
Copy link

dak1n1 commented Mar 16, 2021

Prior to Terraform version 0.14, data sources would be refreshed before destroy. This functionality has been added back to Terraform 0.15. It's an issue with Terraform core. Unless they decide to backport that fix to 0.14, it makes sense to limit the versions that are used with this module.

@dak1n1
Copy link

dak1n1 commented Mar 24, 2021

It looks like the fix will be too difficult to backport to 0.14. hashicorp/terraform#28179 (comment)

@antonbabenko
Copy link
Member

We don't have to restrict the max version of the Terraform in the module.

Btw, v15.1.0 has been just released where Terraform 0.15 is supported and the minimum version of Terraform is updated to be 0.13.1.

@github-actions
Copy link

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants