Note: This module is in alpha state and is likely to contain bugs and updates may introduce breaking changes. It is not recommended for production use at this time.
Terraform AWS CodeStar Module
Authors : Rahul Gaikwad (firstname.lastname@example.org)
This Terraform module creates an AWS CodeStar host and connection.
AWS CodeStar allows you to quickly develop, build, and deploy your applications on AWS with unified user interface, enabling you to easily manage your software development activities in one place.
Repository directory structure
- The terraform-aws-codestar/deploy/ directory contains .tf configuration files and dev.auto.tfvars to define default variables.
- Install Terraform. See Install Terraform for a tutorial.
- Sign up and log into Terraform Cloud. There is a free tier available.
Configure Terraform Cloud API access
Generate a Terraform Cloud token.
Configure your .tfvars file
Example file path
Example .tfvars file contents
In the following example, replace asterisks with your AKEY and SKEY.
AWS_SECRET_ACCESS_KEY = "*****************" AWS_ACCESS_KEY_ID = "*****************" AWS_SESSION_TOKEN = "*****************"
Note: STS-based credentials are optional but highly recommended.
WARNING: Make sure your credentials are secured outside of version control and follow secrets-management best practices.
Deploy the module (Linux or MacOS)
Clone the aws-ia/terraform-aws-codestar repository.
git clone https://github.com/aws-ia/terraform-aws-codestar
Change to the module root directory.
Set up your Terraform cloud workspace.
Run the following commands in order:
terraform apply -var-file="$HOME/.aws/terraform.tfvars".
Note: Terraform apply runs remotely in Terraform Cloud.
Change to the deploy directory.
Open dev.auto.tfvars and edit the default values to match your environment.
Run the following command to deploy:
terraform apply -var-file="$HOME/.aws/terraform.tfvars"
aws_codestarconnections_connection resources are created in PENDING status by default. Authentication with the host provider must be completed in the AWS Developer Tools console. For more information, see Set up a pending host.