-
Notifications
You must be signed in to change notification settings - Fork 0
/
code-deploy.tf
44 lines (40 loc) · 1.39 KB
/
code-deploy.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
42
43
resource "aws_codedeploy_app" "backend_codedeploy_app" {
name = format(module.naming.result, "backend-cd-app")
}
resource "aws_codedeploy_deployment_group" "backend_codedeploy_deployment_group" {
app_name = aws_codedeploy_app.backend_codedeploy_app.name
deployment_group_name = format(module.naming.result, "backend-cd-deployment-group")
service_role_arn = module.codedeploy_role.iam_role_arn
deployment_config_name = "CodeDeployDefault.OneAtATime"
auto_rollback_configuration {
enabled = true
events = ["DEPLOYMENT_FAILURE"]
}
ec2_tag_set {
ec2_tag_filter {
key = "Name"
type = "KEY_AND_VALUE"
value = module.backend.tags_all.Name
}
}
}
resource "aws_codedeploy_app" "noti_codedeploy_app" {
name = format(module.naming.result, "noti-cd-app")
}
resource "aws_codedeploy_deployment_group" "noti_codedeploy_deployment_group" {
app_name = aws_codedeploy_app.noti_codedeploy_app.name
deployment_group_name = format(module.naming.result, "noti-cd-deployment-group")
service_role_arn = module.codedeploy_role.iam_role_arn
deployment_config_name = "CodeDeployDefault.OneAtATime"
auto_rollback_configuration {
enabled = true
events = ["DEPLOYMENT_FAILURE"]
}
ec2_tag_set {
ec2_tag_filter {
key = "Name"
type = "KEY_AND_VALUE"
value = module.backend.tags_all.Name
}
}
}