AWS provider version 4.0.0 issues: How do I lock the version in the Reference Architecture (or Terragrunt for that matter)? #187
-
When using
This is especially problematic now that AWS provider version 4.0 is released and it is breaking all the modules. How do I work around this and lock my provider version to 3.x series? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can work around this by using an override file in the # Use an override file to lock the provider version, regardless of if required_providers is defined in the modules.
generate "provider_version" {
path = "provider_version_override.tf"
if_exists = "overwrite_terragrunt"
contents = <<EOF
terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = "~> 3.0"
}
}
}
EOF
} Note that you may have to remove the |
Beta Was this translation helpful? Give feedback.
You can work around this by using an override file in the
generate
block. The followinggenerate
block is confirmed to properly lock the version and work around this error. You can add this to the rootterragrunt.hcl
file to ensure all your modules use the 3.x series of theaws
provider.Note that you may have to remove the
.…