-
Notifications
You must be signed in to change notification settings - Fork 1
/
vpc.tf
37 lines (27 loc) · 764 Bytes
/
vpc.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
35
36
37
provider "aws" {
region = "us-east-2"
}
data "aws_availability_zones" "azs" {}
module "myapp-vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "3.7.0"
name = "myapp-vpc"
cidr = var.vpc_cidr_block
private_subnets = var.private_subnets_cidr_blocks
public_subnets = var.public_subnets_cidr_blocks
azs = data.aws_availability_zones.azs.names
enable_nat_gateway = true
single_nat_gateway = true
enable_dns_hostnames = true
tags = {
"kubernetes.io/cluster/myapp-cluster" = "shared"
}
private_subnet_tags = {
"kubernetes.io/cluster/myapp-cluster" = "shared"
"kubernetes.io/role/internal-elb" = 1
}
public_subnet_tags = {
"kubernetes.io/cluster/myapp-cluster" = "shared"
"kubernetes.io/role/elb" = 1
}
}