File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -252,4 +252,12 @@ resource "aws_eip" "web_ip" {
252252 automqVendor = " automq"
253253 automqEnvironmentID = var.automq_byoc_env_id
254254 }
255+ }
256+
257+ locals {
258+ public_subnet_id = var. create_new_vpc ? module. automq_byoc_vpc [0 ]. public_subnets [0 ] : var. automq_byoc_env_console_public_subnet_id
259+ }
260+
261+ data "aws_subnet" "public_subnet_info" {
262+ id = local. public_subnet_id
255263}
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ resource "aws_instance" "automq_byoc_console" {
3232}
3333
3434resource "aws_ebs_volume" "data_volume" {
35- availability_zone = aws_instance . automq_byoc_console . availability_zone
35+ availability_zone = data . aws_subnet . public_subnet_info . availability_zone
3636 size = 20
3737 type = " gp3"
3838
You can’t perform that action at this time.
0 commit comments