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

feat: lock terraform version to 1.4.6 #233

Merged
merged 3 commits into from
Apr 8, 2024

Conversation

sanketnadkarni
Copy link
Contributor

@sanketnadkarni sanketnadkarni commented Mar 3, 2024

Changes as below:

To Do:

  • currently all the above changes are only made to the dev folder, same needs to be replicated to the other envs.
❯ terraform version
Terraform v1.7.0
on darwin_amd64
+ provider registry.terraform.io/cyrilgdn/postgresql v1.11.0
+ provider registry.terraform.io/hashicorp/random v3.6.0

Your version of Terraform is out of date! The latest version
is 1.7.4. You can update by downloading from https://www.terraform.io/downloads.html


# If incorrect version is used terraform init command will fail with below error: 
❯ terraform init -backend-config=backend-config.tfvars

Initializing the backend...
Initializing modules...
╷
│ Error: Unsupported Terraform Core version
│
│   on provider.tf line 11, in terraform:
│   11:   required_version = "~> 1.4.6"
│
│ This configuration does not support Terraform version 1.7.0. To proceed, either choose another supported Terraform version or update this version constraint. Version constraints are
│ normally set for good reason, so updating the constraint may lead to other errors or unexpected behavior.
╵




# .terraform-version file will not allow to use incorrect version as seen below
❯ tfenv use 1.7.0
Switching default version to v1.7.0
Default version file overridden by /gs/treetracker-infrastructure/database-grants/terraform/dev/.terraform-version, changing the default version has no effect
Default version (when not overridden by .terraform-version or TFENV_TERRAFORM_VERSION) is now: 1.7.0



…d_version config to provider.tf, update setup_keys.sh to pick up correct auth creds
@dadiorchen
Copy link
Contributor

This pull request looks good for me, accept the comment I made about

@sanketnadkarni
Copy link
Contributor Author

This pull request looks good for me, accept the comment I made about

Cool thanks for the review @dadiorchen , I have addressed your comments, if all looks good , I will go ahead with merging this one and create another one for the remaining environments.

@sanketnadkarni
Copy link
Contributor Author

@dadiorchen could you approve the PR

@dadiorchen dadiorchen self-assigned this Apr 1, 2024
@dadiorchen dadiorchen merged commit 7c4e90d into Greenstand:master Apr 8, 2024
1 check passed
@sanketnadkarni sanketnadkarni deleted the gh222-tf-version branch April 8, 2024 11:07
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.

2 participants