This project utilizes Terraform to provision AWS infrastructure all via GitHub Actions (CI/CD). You can supply inputs in order to configure the AWS services that will be created.
The modules
directory contains terraform modules for the AWS services (e.g., AWS S3 and AWS ECR).
The .github/workflows
directory contains the configuration for the pipeline(s)
The root directory of this project contains files that create the the infrastructure using the modules
.
The following assumptions suffice for this project to run smoothly:
-
Remote State
You have created a terraform state bucket outside of this project, and that you have supplied the bucket info in the file
./backend.tfvars.ghactions
. For example, I have created a bucket in AWS S3 for that purpose and passed in the values:bucket="ileri-tf-state" key="tfstate" region="eu-central-1"
-
GitHub Repository Secrets In order for the project to authenticate with your GitHub repository as well as AWS, you must have created and stored a GitHub Token as well as AWS Access keys in GitHub Repository secrets. These values are set as environment variables in
.github/workflows/**.yaml
:GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- Fork this repository.
- Set the relevant secrets (as mentioned above) in the GitHub repository settings.
- Supply some input and trigger the pipeline under the
Actions
tab in GitHub