-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.tf
More file actions
88 lines (83 loc) · 2.6 KB
/
main.tf
File metadata and controls
88 lines (83 loc) · 2.6 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
data "aws_caller_identity" "current" {}
module "network" {
source = "./network"
az_count = var.az_count
container_port = var.container_port
stack = var.stack
vpc_cidr = var.vpc_cidr
}
module "rds" {
source = "./rds"
depends_on = [
module.network,
]
aws_region = var.aws_region
aws_security_group = module.network.security_groups
aws_subnet = module.network.aws_subnet
db_instance_type = var.db_instance_type
db_name = var.db_name
db_password = var.db_password
db_user = var.db_user
}
module website {
source = "./website"
depends_on = [
module.network
]
subnet = module.network.aws_subnet
vpc_id = module.network.aws_vpc_id
artifacts_bucket_name = var.artifacts_bucket
static_web_bucket_name = var.static_web_bucket
}
module ecs {
source = "./ecs"
depends_on = [
module.network,
module.rds
]
aws_alb_target_id = module.network.aws_alb_target_id
db_url = module.rds.db_url
aws_region = var.aws_region
aws_security_group = module.network.security_groups
aws_subnet = module.network.aws_subnet
db_name = var.db_name
db_password = var.db_password
db_port = var.db_port
db_user = var.db_user
family = var.family
image_repo_name = var.image_repo_name
stack = var.stack
container_port = var.container_port
}
module codepipelines {
source = "./codepipelines"
depends_on = [
module.ecs,
module.website,
module.network
]
image_backend_url = module.ecs.image_backend_url
image_backend_arn = module.ecs.image_backend_arn
aws_region = var.aws_region
family = var.family
account_id = data.aws_caller_identity.current.account_id
env_namespace = var.env_namespace
terraform_ver = var.terraform_ver
source_backend_repo_name = var.source_backend_repo_name
source_frontend_repo_name = var.source_frontend_repo_name
source_repo_branch = var.source_repo_branch
source_repo_github_token = var.source_repo_github_token
source_repo_owner = var.source_repo_owner
stack = var.stack
rds_host = module.rds.db_url
rds_db_name = var.db_name
rds_db_password = var.db_password
rds_db_username = var.db_user
rds_db_port = var.db_port
security_groups = module.network.security_groups
subnet = module.network.aws_subnet
vpc_id = module.network.aws_vpc_id
static_web_bucket = module.website.static_web_bucket
artifacts_bucket = module.website.artifacts_bucket
alb_address = module.network.alb_address
}