Slackbot
12/22/2023, 1:35 PMLuiz Silva
12/22/2023, 1:42 PM{"level":"info","ts":"2023-12-22T13:41:48.529Z","caller":"terraform/terraform_client.go:442","msg":"could not find terraform version 1.5.5 in PATH o │
│ r /atlantis/bin, downloading from <https://releases.hashicorp.com>","json":{}}Luiz Silva
12/22/2023, 1:42 PMLuiz Silva
12/22/2023, 2:32 PM- Unsupported state file format: The state file could not be parsed as JSON:
syntax error at byte offset 1.
- Unsupported state file format: The state file does not have a "version"
attribute, which is required to identify the format version.
Plan read error: plan file was created by Terraform 1.5.5, but this is 1.3.5;
plan files cannot be transferred between different Terraform versionsLuiz Silva
12/22/2023, 2:33 PMrepos:
- id: "/.*/"
apply_requirements: [approved, mergeable]
pre_workflow_hooks:
- run: |
find . -name '.terragrunt-cache' | xargs rm -rf
terragrunt-atlantis-config generate --output atlantis.yaml --autoplan --automerge --parallel --num-executors 5 --terraform-version v1.5.5
workflow: terragrunt
policies:
owners:
users:
- luizandrends
workflows:
terragrunt:
plan:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- env:
name: TF_IN_AUTOMATION
value: "true"
- run: terragrunt plan -input=false -out=$PLANFILE
- run: terragrunt show -json $PLANFILE > $SHOWFILE
policy_check:
steps:
- policy_check:
extra_args:
[
"--update",
"my-s3-bucket",
"--all-namespaces",
]
- run: terragrunt show -no-color -json $PLANFILE > $SHOWFILE
- run: conftest test $SHOWFILE
apply:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- env:
name: TF_IN_AUTOMATION
value: "true"
- run: terragrunt apply -input=false $PLANFILEChastity Blackwell
12/22/2023, 3:25 PMChastity Blackwell
12/22/2023, 3:27 PMterraform block or one of the included modules requires a version, even if it's something like ~> 1.5, it will use the newest version that fulfills the versioning requirement.Chastity Blackwell
12/22/2023, 3:28 PMLuiz Silva
12/22/2023, 4:25 PMLuiz Silva
12/22/2023, 4:26 PMterraform -v it outputs 1.3.5Luiz Silva
12/22/2023, 4:26 PMterraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.27"
}
}
required_version = "1.5.5"
}Chastity Blackwell
12/22/2023, 4:30 PMLuiz Silva
12/22/2023, 4:31 PM- run: terragrunt show -no-color -json $PLANFILE > $SHOWFILEChastity Blackwell
12/22/2023, 4:32 PMLuiz Silva
12/22/2023, 4:38 PMChastity Blackwell
12/22/2023, 4:42 PMTiago Meireles
01/03/2024, 10:29 PMpolicy_check:
steps:
- env:
name: TERRAGRUNT_TFPATH
command: 'echo "terraform${ATLANTIS_TERRAFORM_VERSION}"'
- env:
name: TF_IN_AUTOMATION
value: "true"
- policy_check:
extra_args:
[
"--update",
"my-s3-bucket",
"--all-namespaces",
]
- run: terragrunt show -no-color -json $PLANFILE > $SHOWFILE
- run: conftest test $SHOWFILE