@eladazary wrote:
I would like to use a variable inside a variable.
This is my resource:
resource "aws_route" "vpc_peering_accepter" { provider = "aws.accepter" count = length(data.terraform_remote_state.vpc.outputs.${var.region}-vpc-private_routing_tables) route_table_id = tolist(data.terraform_remote_state.vpc.outputs.${var.region}-vpc-private_routing_tables)[count.index] destination_cidr_block = var.vpc_cidr vpc_peering_connection_id = aws_vpc_peering_connection.peer.*.id[0] }
Of course this one is not working.
What’s the best practice to do it?Thanks,
Elad
Posts: 2
Participants: 2