-
Notifications
You must be signed in to change notification settings - Fork 2
/
vpc.tf
31 lines (27 loc) · 933 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
locals {
azs = ["${data.aws_region.current.name}a", "${data.aws_region.current.name}c"]
public_subnets = ["10.0.0.0/20", "10.0.16.0/20"]
private_subnets = ["10.0.128.0/20", "10.0.144.0/20"]
vpc_cidr = "10.0.0.0/16"
}
module "vpc" {
source = "./modules/vpc"
vpc_cidr = local.vpc_cidr
azs = local.azs
private_subnets = local.private_subnets
public_subnets = local.public_subnets
public_subnet_tags_per_az = {
"${local.region}a" = {
"karpenter.sh/discovery/xquare-v3-cluster" = "xquare-v3-cluster"
"kubernetes.io/cluster/xquare-v3-cluster" = "owned"
"kubernetes.io/role/elb" = "1"
},
"${local.region}c" = {}
}
name_prefix = local.name_prefix
cluster_name = "${local.name_prefix_v3}-cluster"
}
resource "aws_vpc_endpoint" "s3" {
vpc_id = module.vpc.vpc_id
service_name = "com.amazonaws.ap-northeast-2.s3"
}