-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
41 lines (32 loc) · 833 Bytes
/
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
35
36
37
38
39
40
41
provider "aws" {
region = "ap-northeast-1"
skip_credentials_validation = true
skip_requesting_account_id = true
skip_metadata_api_check = true
skip_region_validation = true
}
module "ecs_fargate" {
source = "./tf"
security_groups = [module.sg.security_group_id]
subnets = module.vpc.public_subnets
vpc_id = module.vpc.vpc_id
container_port = "8080"
}
module "vpc" {
source = "terraform-aws-modules/vpc/aws"
version = "4.0.1"
name = "dev"
cidr = "10.0.0.0/16"
enable_nat_gateway = false
azs = ["ap-northeast-1"]
public_subnets = ["10.0.101.0/24"]
tags = {
Environment = "dev"
}
}
module "sg" {
source = "terraform-aws-modules/security-group/aws"
version = "4.17.1"
name = "dev"
vpc_id = module.vpc.vpc_id
}