Skip to content

Commit 680d368

Browse files
ya-luotaoclaude
andauthored
fix(aws): replace deprecated aws_region.name with .id (#2314)
The `name` attribute on `data.aws_region` was deprecated in AWS provider v6.x. Use the equivalent `id` attribute to silence the warning. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 59ca911 commit 680d368

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

iac/provider-aws/alb_athena.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
locals {
22
ingress_logs_path_prefix = "ingress"
3-
ingress_logs_path_location = "s3://${data.aws_s3_bucket.load_balancer_logs.id}/${local.ingress_logs_path_prefix}/AWSLogs/${data.aws_caller_identity.current.account_id}/elasticloadbalancing/${data.aws_region.current.name}"
3+
ingress_logs_path_location = "s3://${data.aws_s3_bucket.load_balancer_logs.id}/${local.ingress_logs_path_prefix}/AWSLogs/${data.aws_caller_identity.current.account_id}/elasticloadbalancing/${data.aws_region.current.id}"
44
}
55

66
data "aws_s3_bucket" "load_balancer_logs" {

iac/provider-aws/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ module "init" {
5252
prefix = var.prefix
5353
bucket_prefix = var.bucket_prefix
5454

55-
region = data.aws_region.current.name
55+
region = data.aws_region.current.id
5656
endpoint_ingress_subnet_ids = [
5757
aws_security_group.cluster_node.id
5858
]
@@ -153,7 +153,7 @@ module "cluster" {
153153
client_server_nested_virtualization = var.client_server_nested_virtualization
154154
client_node_labels = var.client_node_labels
155155

156-
clickhouse_az = "${data.aws_region.current.name}a"
156+
clickhouse_az = "${data.aws_region.current.id}a"
157157
clickhouse_cluster_size = var.clickhouse_cluster_size
158158
clickhouse_image_family_prefix = var.clickhouse_image_family_prefix != "" ? var.clickhouse_image_family_prefix : local.ami_family_prefix
159159
clickhouse_machine_type = var.clickhouse_server_machine_type
@@ -168,7 +168,7 @@ module "nomad" {
168168

169169
domain_name = var.domain_name
170170
environment = var.environment
171-
aws_region = data.aws_region.current.name
171+
aws_region = data.aws_region.current.id
172172

173173
nomad_acl_token = module.init.cluster.nomad_acl_token
174174
consul_acl_token = module.init.cluster.consul_acl_token

0 commit comments

Comments
 (0)