This commit is contained in:
5
main.tf
5
main.tf
@@ -28,12 +28,15 @@ module "vpc" {
|
|||||||
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
|
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
|
||||||
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
|
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
|
||||||
|
|
||||||
|
|
||||||
enable_nat_gateway = true
|
enable_nat_gateway = true
|
||||||
single_nat_gateway = true
|
single_nat_gateway = true
|
||||||
|
|
||||||
enable_dns_hostnames = true
|
enable_dns_hostnames = true
|
||||||
enable_dns_support = true
|
enable_dns_support = true
|
||||||
|
|
||||||
|
enable_flow_log = true
|
||||||
|
|
||||||
tags = {
|
tags = {
|
||||||
terraform = "true"
|
terraform = "true"
|
||||||
environment = "test"
|
environment = "test"
|
||||||
@@ -61,7 +64,7 @@ module "ec2_instance" {
|
|||||||
instance_type = "t2.micro"
|
instance_type = "t2.micro"
|
||||||
key_name = module.key_pair.key_pair_name
|
key_name = module.key_pair.key_pair_name
|
||||||
monitoring = true
|
monitoring = true
|
||||||
vpc_security_group_ids = [ module.web_server_sg.security_group_id ]
|
vpc_security_group_ids = [module.web_server_sg.security_group_id]
|
||||||
subnet_id = module.vpc.public_subnets[0]
|
subnet_id = module.vpc.public_subnets[0]
|
||||||
user_data = file("userdata.sh")
|
user_data = file("userdata.sh")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user