-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpipeline.tf
65 lines (55 loc) · 1.48 KB
/
pipeline.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
resource "aws_codepipeline" "hugo" {
name = "${var.project_name}_codepipeline"
role_arn = "${aws_iam_role.hugo.arn}"
artifact_store {
location = "${aws_s3_bucket.hugo.bucket}"
type = "S3"
}
stage {
name = "Source"
action {
name = "Source"
category = "Source"
owner = "ThirdParty"
provider = "GitHub"
version = "1"
output_artifacts = ["source_output"]
configuration {
Owner = "${var.github_organization}"
Repo = "${var.github_source_repo_name}"
Branch = "${var.github_source_repo_branch}"
OAuthToken = "${var.github_oauth_secret}"
}
}
}
stage {
name = "Build"
action {
name = "Build"
category = "Build"
owner = "AWS"
provider = "CodeBuild"
input_artifacts = ["source_output"]
output_artifacts = ["build_output"]
version = "1"
configuration {
ProjectName = "${aws_codebuild_project.hugo.name}"
}
}
}
stage {
name = "Deploy"
action {
name = "Deploy"
category = "Deploy"
owner = "AWS"
provider = "S3"
input_artifacts = ["build_output"]
version = "1"
configuration {
BucketName = "${aws_s3_bucket.hugo_root.bucket}"
Extract = "true"
}
}
}
}