init
This commit is contained in:
14
modules/vpc/main.tf
Normal file
14
modules/vpc/main.tf
Normal file
@ -0,0 +1,14 @@
|
||||
resource "aws_vpc" "main" {
|
||||
# cidr_block = "10.3.0.0/16"
|
||||
cidr_block = var.cidr_block
|
||||
// instance_tenancy = "default"
|
||||
|
||||
# 인스턴스에 public DNS가 표시되도록 하는 속성
|
||||
enable_dns_hostnames = true
|
||||
enable_dns_support = true
|
||||
|
||||
|
||||
tags = {
|
||||
Name = "${var.tag_name}-vpc"
|
||||
}
|
||||
}
|
||||
10
modules/vpc/outputs.tf
Normal file
10
modules/vpc/outputs.tf
Normal file
@ -0,0 +1,10 @@
|
||||
//modules-vpc-output
|
||||
output "vpc_id" {
|
||||
description = "The name of vpc hq id"
|
||||
value = aws_vpc.main.id
|
||||
}
|
||||
|
||||
output "vpc_name" {
|
||||
value = var.tag_name
|
||||
}
|
||||
|
||||
8
modules/vpc/valiables.tf
Normal file
8
modules/vpc/valiables.tf
Normal file
@ -0,0 +1,8 @@
|
||||
variable "cidr_block" {
|
||||
description = "value"
|
||||
type = string
|
||||
}
|
||||
variable "tag_name" {
|
||||
description = "value"
|
||||
type = string
|
||||
}
|
||||
Reference in New Issue
Block a user