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: Correct version pin to support 1.4+ and protect from upcoming provider v5 changes #396

Closed
wants to merge 1 commit into from

Conversation

bryantbiggs
Copy link
Member

What this PR does / why we need it:

  • Correct version pin to support 1.4+ and protect from upcoming provider v5 changes
    • The main implementation version requirements have been updated to constrain the AWS provider to stay within v4 in order to avoid issues with the upcoming v5 changes. The Terraform version requirements have been updated to support 1.4+ but restrict from a 2.0 release (if that were to happen - no plans at this time)

Which issue(s) this PR fixes:

Fixes #394

Quality checks

  • My content adheres to the style guidelines
  • I ran make test or make e2e-test and it was successful

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@netlify
Copy link

netlify bot commented Mar 19, 2023

Deploy Preview for eks-workshop ready!

Name Link
🔨 Latest commit 697da0e
🔍 Latest deploy log https://app.netlify.com/sites/eks-workshop/deploys/64170bba221188000853ba46
😎 Deploy Preview https://deploy-preview-396--eks-workshop.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@@ -1,12 +1,12 @@
terraform {
required_version = "~> 1.3"
Copy link
Member Author

@bryantbiggs bryantbiggs Mar 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation version restriction further constrain the versions used when provisioning to avoid any surprises. This is different from the module level version constraint (see below)

The ~> puts an upper bound restriction, where this upper bound restriction shown here is preventing from automatically adopting a major version change, but will readily accept a minor and/or patch version change

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had opened this up to work with TF 1.4, would this prevent that?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niallthomson no, the ~> 1.3 allows the rightmost digit to be anything larger than 3.

Copy link
Member Author

@bryantbiggs bryantbiggs Mar 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoops - forgot about this. Yes, what @kevcube stated is correct

@@ -1,5 +1,5 @@
terraform {
required_version = ">= 1.0.0"
required_version = ">= 1.0"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module version constraints are generally only restricted by their lower bound of their requirements, which makes them applicable to a broader range of versions for better adoption without version conflicts. The minimum requirement is derived from the features used, where language level features will raise the Terraform required version, and the provider version will be dictated by the most recent argument addition used across the resources created (i.e. - when was the argument added/updated per the CHANGELOG, this dictates the minimum required provider version)

@niallthomson
Copy link
Contributor

Closing as coming rearchitecture work will address this or make it no longer applicable

@bryantbiggs bryantbiggs deleted the fix/version-pin branch June 9, 2023 22:16
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

Successfully merging this pull request may close these issues.

[Bug]: Installation Error: Unsupported Terraform Core version (v1.4)
3 participants