forked from cloudposse/terraform-aws-vpc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.tf
34 lines (30 loc) · 1.09 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
module "label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.14.0"
namespace = var.namespace
name = var.name
stage = var.stage
delimiter = var.delimiter
attributes = var.attributes
tags = var.tags
}
resource "aws_vpc" "default" {
cidr_block = var.cidr_block
instance_tenancy = var.instance_tenancy
enable_dns_hostnames = var.enable_dns_hostnames
enable_dns_support = var.enable_dns_support
enable_classiclink = var.enable_classiclink
enable_classiclink_dns_support = var.enable_classiclink_dns_support
assign_generated_ipv6_cidr_block = true
tags = module.label.tags
}
# If `aws_default_security_group` is not defined, it would be created implicitly with access `0.0.0.0/0`
resource "aws_default_security_group" "default" {
vpc_id = aws_vpc.default.id
tags = {
Name = "Default Security Group"
}
}
resource "aws_internet_gateway" "default" {
vpc_id = aws_vpc.default.id
tags = module.label.tags
}