-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.tf
33 lines (30 loc) · 996 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
module "iam" {
source = "./modules/iam"
iam_role_pipeline_name = "codepipeline_role"
iam_role_codebuild_name = "codebuild_role"
iam_pipeline_name = "pipeline_policy"
iam_build_name = "codebuild_policy"
}
module "pipeline" {
source = "./modules/pipeline"
service_role_codebuild = module.iam.tf_codebuild_role
role_arn = module.iam.tf_codebuild_role
codebuild1_name = "tf_plan"
codebuild2_name = "tf_apply"
compute_type = "BUILD_GENERAL1_SMALL"
type = "LINUX_CONTAINER"
artifact_type = "CODEPIPELINE"
source_type = "CODEPIPELINE"
image_pull_cred_type = "SERVICE_ROLE"
artifact_store_location = module.s3_buckets.pipeline_artifact
}
module "s3_buckets" {
source = "./modules/s3_buckets"
}
terraform {
backend "s3" {
bucket = "terraform-cicd-project-16052"
key = "terraform.tfstate"
region = "us-west-2"
}
}