라우팅테이블 서브넷 리스트 할당 연결

This commit is contained in:
2022-12-26 21:47:17 +09:00
parent 89ee20efff
commit c79a4c9c29
6 changed files with 37 additions and 12 deletions

View File

@ -0,0 +1,7 @@
//라우팅 테이블 서브넷 연결
resource "aws_route_table_association" "route-association" {
for_each = toset(var.subnet_ids)
subnet_id = each.value
route_table_id = var.route_table_id
}

View File

@ -0,0 +1,9 @@
variable "subnet_ids" {
description = "Subnet id"
type = list
}
variable "route_table_id" {
description = "Subnet id"
type = string
}