Skip to content

Commit 442e7c1

Browse files
morremeyergoruha
andauthored
chore: fix "name" deprecation for aws_region data source (#363)
* chore: fix "name" deprecation for aws_region data source This fixes the deprecation of the "name" attribute for the aws_region data source, adding a fallback for provider versions < 6.0.0. * fixup! chore: fix "name" deprecation for aws_region data source * fixup! chore: fix "name" deprecation for aws_region data source --------- Co-authored-by: Igor Rodionov <[email protected]>
1 parent 12c1ee5 commit 442e7c1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ locals {
9797
"eu-north-1" = "eu-west-2"
9898
"me-south-1" = "ap-south-1"
9999
}
100-
origin_shield_region = local.enabled ? lookup(local.origin_shield_region_fallback_map, data.aws_region.current[0].name, data.aws_region.current[0].name) : "this string is never used"
100+
origin_shield_region = local.enabled ? lookup(local.origin_shield_region_fallback_map, data.aws_region.current[0].region, data.aws_region.current[0].region) : "this string is never used"
101101

102102
cors_origins = distinct(compact(concat(var.cors_allowed_origins, var.aliases, var.external_aliases)))
103103
}

versions.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 4.9"
7+
version = ">= 6.0"
88
}
99
random = {
1010
source = "hashicorp/random"

0 commit comments

Comments
 (0)