This module creates a terraform-enabled deployment pipeline using codebuild and codepipeline.
No requirements.
The following providers are used by this module:
No modules.
The following resources are used by this module:
- aws_cloudwatch_log_group.account_provisioning_customizations (resource)
- aws_codebuild_project.build (resource)
- aws_codebuild_project.terraform_apply (resource)
- aws_codepipeline.codestar_account_provisioning_customizations (resource)
- aws_iam_role.build (resource)
- aws_iam_role.codepipeline_role (resource)
- aws_iam_role_policy.codebuild_role (resource)
- aws_iam_role_policy.codepipeline_policy (resource)
- aws_security_group.builder (resource)
- aws_caller_identity.current (data source)
- aws_region.current (data source)
- aws_s3_bucket.bucket_name (data source)
The following input variables are required:
Description: Name of your service, should be unique across repository.
Type: string
Description: key -> value definition for example {REGION: "eu-west-1"}
Type: map(string)
Description: Name of your deployment environment. For example; sandbox, staging, production.
Type: string
Description: n/a
Type: string
Description: AWS region
Type: string
Description: n/a
Type:
object({
name = string,
branch = string
})
Description: n/a
Type: list(string)
Description: n/a
Type: string
The following input variables are optional (have default values):
Description: n/a
Type:
object({
build_timeout = string
compute_type = string
image = string
terraform_version = string
encrypted_artifact = bool
})
Default:
{
"build_timeout": "300",
"compute_type": "BUILD_GENERAL1_SMALL",
"encrypted_artifact": true,
"image": "aws/codebuild/amazonlinux2-x86_64-standard:3.0",
"terraform_version": "1.2.6"
}
Description: An ARN for AWS codestar connection (eg for github)
Type: string
Default: null
Description: n/a
Type: string
Default: ""
Description: Custom variables to be passed to the backend template {"tfstate_role_arn": "arn:aws:iam::123456789012:role/terraform-state-role"}
Type: map(string)
Default: {}
Description: AWS codebuild build custom spec
Type: string
Default: ""
Description: Specifies the number of days you want to retain log events in the specified log group. Possible values are: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1827, 3653, and 0. If you select 0, the events in the log group are always retained and never expire.
Type: number
Default: 0
Description: List of resources that will be targeted by terraform. For example: ['aws_instance.test', 'module.app']
Type: list(string)
Default: []
Description: n/a
Type: list(string)
Default: []
Description: Additional tags (e.g. '{'BusinessUnit': 'XYZ'}). Neither the tag keys nor the tag values will be modified by this module.
Type: map(string)
Default: {}
Description: The directory where the terraform files are located
Type: string
Default: ""
Description: n/a
Type: bool
Default: false
Description: AWS region where the terraform state will be stored by default the same as the region of the pipeline
Type: string
Default: ""
Description: Name of the bucket where the terraform state will be stored by default terraform-state-<account_id>
Type: string
Default: ""
Description: Name of the key where the terraform state will be stored by default <environment_name>/<application_name>.tfstate
Type: string
Default: ""
No outputs.