This repository demonstrates how to integrate Resourcely into repository that used Github Actions as the Terraform runner.
It contains a workflow that runs
terraform plan
and then uses the Resourcely Github
Action to
evaluate guardrails on that plan.
This repository uses Github Actions to run terraform plan
and
terraform apply
.
If you use a different runner, see the scaffolding repository for that runner:
- Terraform Cloud - scaffolding-github-terraform-cloud
This repository is a template. Some setup is required after cloning to use it.
Running Terraform in Github Actions requires storing the Terraform state in a durable backend. Terraform supports a variety of backends described here.
Edit terraform.tf to add and configured your chosen backend.
The Resourcely Github Action requires an API token to authenticate to the Resourcely API.
- Generate a new API token in the Resourcely portal
- Create a new Github repository secret named
RESOURCELY_API_TOKEN
containing this token.
.resourcely.yaml
tells Resourcely where to find the Terraform
configs within this repo. If you move the config out of the
repository root or add new configs in subdirectories, update the file
to reflect these changes.