🌎Terrateam

CI/CD Automation with Terrateam

By integrating Resourcely with Terrateam, you can automatically evaluate your Terraform plans and policies on every pull request and receive feedback directly within your pull request.

To set up Resourcely with Terrateam, you must perform the following steps:

  • Verify Prerequisites

  • Store the Resourcely API Token as a GitHub Secret

  • Enable the Resourcely integration in your Terrateam configuration file

Prerequisites

Before integrating Resourcely with Terrateam, ensure that you have the following:

  • A Terrateam account with an existing repository

  • A Resourcely account with an API token

If you don’t already have a Terrateam account configured, you can follow their Quickstart Guide here: https://terrateam.io/docs/quickstart-guide.

Enable the Resourcely Integration

To enable the Resourcely integration in Terrateam, follow these steps:

  1. Open your Terrateam repository and navigate to the .terrateam/config.yml file.

  2. Add the following configuration to enable the Resourcely integration:

integrations:
    resourcely:
        enabled:true
  1. Commit and push the changes to your repository.

Store the Resourcely API Token

Terrateam needs access to your Resourcely API token to communicate with the Resourcely service and evaluate your Terraform plans. To securely store your Resourcely API token, follow these steps:

  1. In your GitHub repository, navigate to “Settings” > “Secrets” > “Actions”.

  2. Click on “New repository secret”.

  3. Enter RESOURCELY_API_TOKEN as the secret name and paste your Resourcely API token as the value.

  4. Click “Add secret” to save the API token.

Once the Resourcely integration is enabled in your Terrateam configuration file and the API token is stored in GitHub Secrets, Resourcely will automatically evaluate any generated Terraform plan files during the plan operation. If the plan file evaluation fails any of the Resourcely Guardrails, Terrateam will provide feedback directly in the pull request, indicating which guardrails were violated.

Last updated