From e73a78a4086a6d355bc607b37084cca8573eef8f Mon Sep 17 00:00:00 2001 From: ya-luotao Date: Tue, 7 Apr 2026 23:12:39 +0800 Subject: [PATCH] fix(aws): replace deprecated aws_region.name with .id 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) --- iac/provider-aws/alb_athena.tf | 2 +- iac/provider-aws/main.tf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/iac/provider-aws/alb_athena.tf b/iac/provider-aws/alb_athena.tf index 4bf8394493..fa8f01971f 100644 --- a/iac/provider-aws/alb_athena.tf +++ b/iac/provider-aws/alb_athena.tf @@ -1,6 +1,6 @@ locals { ingress_logs_path_prefix = "ingress" - 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}" + 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}" } data "aws_s3_bucket" "load_balancer_logs" { diff --git a/iac/provider-aws/main.tf b/iac/provider-aws/main.tf index e8fe679664..c8a8937859 100644 --- a/iac/provider-aws/main.tf +++ b/iac/provider-aws/main.tf @@ -52,7 +52,7 @@ module "init" { prefix = var.prefix bucket_prefix = var.bucket_prefix - region = data.aws_region.current.name + region = data.aws_region.current.id endpoint_ingress_subnet_ids = [ aws_security_group.cluster_node.id ] @@ -153,7 +153,7 @@ module "cluster" { client_server_nested_virtualization = var.client_server_nested_virtualization client_node_labels = var.client_node_labels - clickhouse_az = "${data.aws_region.current.name}a" + clickhouse_az = "${data.aws_region.current.id}a" clickhouse_cluster_size = var.clickhouse_cluster_size clickhouse_image_family_prefix = var.clickhouse_image_family_prefix != "" ? var.clickhouse_image_family_prefix : local.ami_family_prefix clickhouse_machine_type = var.clickhouse_server_machine_type @@ -168,7 +168,7 @@ module "nomad" { domain_name = var.domain_name environment = var.environment - aws_region = data.aws_region.current.name + aws_region = data.aws_region.current.id nomad_acl_token = module.init.cluster.nomad_acl_token consul_acl_token = module.init.cluster.consul_acl_token