Comments (9)
1-org tf plan check step 9 requires a 0-bootstrap plan check on backend validation errors - due to terraform 1.3.0 (docker) and 1.7.4 (console) mismatch - may require console terraform downgrade before starting deployment
before creating the state file
from terraform-example-foundation.
see step 9 in main jira
#1133 (comment)
from terraform-example-foundation.
1-org step 9 terraform version mismatch mitigation
I was hoping to avoid a terraform downgrade until we get into refactoring but it looks like a 1.7.4 to 1.3.0 TF downgrade is required before creating the state file - or we get into a situation where the cloud build triggered plan running 1.3.0 cannot reconcile with the state file created in the gcp console under 1.7.4.
Either we restart the deployment after downgrading or upgrade the TEF to TF 1.7 - will need to do this before moving on to 2-environments
from terraform-example-foundation.
TF Versions
Cloud Build via Dockerfile is 1.3.0
https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/0-bootstrap/Dockerfile#L18
ARG TERRAFORM_VERSION=1.3.0
GCP console as of 202403 is 1.7.4
michael@cloudshell:~/tef-olapp/github/gcp-org (tef-olapp)$ terraform --version
Terraform v1.7.4
on linux_amd64
from terraform-example-foundation.
for change tracking post terraform 1.3.0 follow
#831
https://github.com/terraform-google-modules/terraform-example-foundation/pull/1003/files
from terraform-example-foundation.
Update: should have followed the warning around 1.3.0 in
https://github.com/terraform-google-modules/terraform-example-foundation/pull/831/files
https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/0-bootstrap/README.md#prerequisites
Note: Make sure that you use version 1.3.0 of Terraform throughout this series. Otherwise, you might experience Terraform state snapshot lock errors.
from terraform-example-foundation.
Terraform local downgrade procedure - OSX (watch the sh line endings) - do windows 11 as well
get 1.3
https://releases.hashicorp.com/terraform/
https://releases.hashicorp.com/terraform/1.3.0/
https://releases.hashicorp.com/terraform/1.3.0/terraform_1.3.0_darwin_arm64.zip
drop terraform binary into a path folder
michaelobrien@mbp7 TEF-GCP-LZ-HS % terraform --version
Terraform v1.3.0
on darwin_arm64
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
from terraform-example-foundation.
The validation script needs to be updated
https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/scripts/validate-requirements.sh#L94
TF_VERSION="1.3.0"
...
TERRAFORM_CURRENT_VERSION=$(terraform version -json | jq -r .terraform_version)
if [ "$(compare_version "$TERRAFORM_CURRENT_VERSION" "$TF_VERSION")" -gt 1 ]; then
echo_wrong_version "Terraform" "greater than or equal to" "$TF_VERSION" "https://learn.hashicorp.com/tutorials/terraform/install-cli" "$TERRAFORM_CURRENT_VERSION"
ERRORS+=$' Terraform version is incompatible.\n'
fi
change
-greater than or equal to
+equal to
- if [ "$(compare_version "$TERRAFORM_CURRENT_VERSION" "$TF_VERSION")" -gt 1 ]; then
+ if [ "$(compare_version "$TERRAFORM_CURRENT_VERSION" "$TF_VERSION")" -eq 1 ]; then
## test this change first (locally in just a script unit test or in a new-org deploy)
Note we can go to 1.3.7 - on a minor version but 1.4+ is untested
from terraform-example-foundation.
stale bot timer restart - https://github.com/terraform-google-modules/terraform-example-foundation/blob/master/.github/workflows/stale.yml#L21
from terraform-example-foundation.
Related Issues (20)
- Update documentation on supported deployment methods HOT 1
- Google Cloud Foundation Bootstrapping fail due to github secret_key 404 Not Found HOT 4
- organization service account missing permissions when describing scc-notify HOT 2
- Validate parent_folder early
- Example on how to implement 4-projects step for GitLab
- remove `data_access_logs_enabled` HOT 1
- Rename stage 5-app-infra for internal consistency on pipeline layers (foundation vs infra vs application) HOT 1
- Upgrade to google-github-actions/setup-gcloud@v2 HOT 3
- Ask: Document process for common tasks HOT 2
- Alternative setup for cloud source repository HOT 1
- PLEASE DELETE
- 1-org Github steps missing
- 1-org: .terraform.lock.hcl not versioned
- CI broken by perma-diff in Cloud Functions HOT 9
- 1-org: Getting resource ancestry or parent failed: user does not have the correct permissions HOT 4
- Docker tests fail due to CSR dependency
- Bootstrap should utilize the method from the official documentation for remote state bucket management
- docker_test_prepare: Missing role
- Running terraform vet runs into 404 errors HOT 4
- Route scope tags preventing NAT egress from working for GKE autopilot
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-example-foundation.