This Terraform module build a basic GitHub repository to use Terraform GitHub Actions for Terraform Cloud/Enterprise for AWS projects.
A backend to connect to Terraform Cloud/Enterprise state management is created.
Static security check can be added in workflow using GitHub Actions for Checkov or Bridgecrew solutions.
Use : terraform-github-cicd-bootstrap module
You can use this module with Terraform OSS or Terraform Cloud/Enterprise to create and configure your new GitHub repository.
Just import the module and set variables :
module "cicd_bootstrap_aws" {
source = "recarnot/cicd-bootstrap-aws/github"
github_token = var.github_token
github_organization = var.github_organization
repository_name = var.project_name
tf_organization = var.tf_organization
tf_token = var.secret_tfc_token
tf_workspace = var.project_name
aws_access_key = var.aws_access_key
aws_secret_key = var.aws_secret_key
aws_region = var.aws_region
}Take a look at terraform-github-cicd-bootstrap module documentation for more details.
This module creates (in addition to the resources of the cicd-bootstrap module) :
- Variables for AWS credentials in Terraform workspace
- A provider.tf file with AWS Provider definition (using workspace variables)