igw 생성.
This commit is contained in:
24
modules/route-table/main.tf
Normal file
24
modules/route-table/main.tf
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
라우팅 테이블에 서브넷을 연결.
|
||||
라우팅에서 경로 설정.
|
||||
*/
|
||||
|
||||
//public
|
||||
resource "aws_route_table" "public-table" {
|
||||
vpc_id = var.vpc_id
|
||||
tags = {
|
||||
Name = "${var.tag_name}-route-public"
|
||||
}
|
||||
|
||||
# route {
|
||||
# cidr_block = "10.0.1.0/24"
|
||||
# gateway_id = aws_internet_gateway.example.id
|
||||
# }
|
||||
|
||||
# route {
|
||||
# ipv6_cidr_block = "::/0"
|
||||
# egress_only_gateway_id = aws_egress_only_internet_gateway.example.id
|
||||
# }
|
||||
}
|
||||
|
||||
//private
|
5
modules/route-table/outputs.tf
Normal file
5
modules/route-table/outputs.tf
Normal file
@ -0,0 +1,5 @@
|
||||
output "route_public_id" {
|
||||
description = "get route_public_id"
|
||||
value = aws_route_table.public-table.id
|
||||
|
||||
}
|
9
modules/route-table/variables.tf
Normal file
9
modules/route-table/variables.tf
Normal file
@ -0,0 +1,9 @@
|
||||
variable "vpc_id" {
|
||||
description = "set vpc id"
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "tag_name" {
|
||||
description = "value"
|
||||
type = string
|
||||
}
|
Reference in New Issue
Block a user