-
Notifications
You must be signed in to change notification settings - Fork 1
/
codepipeline.tf
84 lines (70 loc) · 1.75 KB
/
codepipeline.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
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
resource "aws_codepipeline" "0" {
name = "${local.project_name}"
role_arn = "${local.pipeline_role_arn}"
artifact_store {
location = "${aws_s3_bucket.0.bucket}"
type = "S3"
}
stage {
name = "Source"
action {
name = "Source"
category = "Source"
owner = "ThirdParty"
provider = "GitHub"
version = "1"
output_artifacts = ["code"]
configuration {
OAuthToken = "${var.github_oauth_token}"
Owner = "${var.github_org}"
Repo = "${var.github_repo}"
Branch = "${var.github_branch}"
PollForSourceChanges = "${var.github_poll_for_changes}"
}
}
}
stage {
name = "Build"
action {
name = "Build"
category = "Build"
owner = "AWS"
provider = "CodeBuild"
version = "1"
input_artifacts = ["code"]
output_artifacts = ["task"]
configuration {
ProjectName = "${local.project_name}"
}
}
}
stage {
name = "Deploy"
action {
name = "Deploy"
category = "Deploy"
owner = "AWS"
provider = "ECS"
input_artifacts = ["task"]
version = "1"
configuration {
ClusterName = "${var.ecs_cluster}"
ServiceName = "${var.ecs_service}"
}
}
}
stage {
name = "Test"
action {
name = "Test"
category = "Test"
owner = "AWS"
provider = "CodeBuild"
input_artifacts = ["code"]
version = "1"
configuration {
ProjectName = "${local.project_name_integration_test}"
}
}
}
}