Skip to content

Terraform Min/Max

Actions
GitHub action used to evaluate the Terraform minimum and maximum versions permitted
v1.3.2
Latest
Star (24)

terraform

terraform-min-max

Strict TypeScript Commitizen friendly Known Vulnerabilities

test

GitHub action used to evaluate the Terraform minimum and maximum versions permitted

Usage

steps:
  - name: Checkout
    uses: actions/checkout@v3

  - name: Extract Terraform min/max versions
    id: minMax
    uses: clowdhaus/terraform-min-max@main
    with:
      # The project root directory (.) is used as the default
      directory: .
outputs:
  minVersion: ${{ steps.minMax.outputs.minVersion }}
  maxVersion: ${{ steps.minMax.outputs.maxVersion }}

Scenarios

Extract minimum and maximum permitted versions of Terraform for use in matrix pipelines

jobs:
  versionExtract:
    name: Extract Min/Max Versions
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Extract Terraform min/max versions
        id: minMax
        uses: clowdhaus/terraform-min-max@main
        with:
          directory: tests/0.13
    outputs:
      minVersion: ${{ steps.minMax.outputs.minVersion }}
      maxVersion: ${{ steps.minMax.outputs.maxVersion }}

  versionEvaluate:
    name: Evaluate Min/Max Versions
    runs-on: ubuntu-latest
    needs: versionExtract
    strategy:
      matrix:
        version:
          - ${{ needs.versionExtract.outputs.minVersion }}
          - ${{ needs.versionExtract.outputs.maxVersion }}

    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Install Terraform v${{ matrix.version }}
        uses: hashicorp/setup-terraform@v1
        with:
          terraform_version: ${{ matrix.version }}

      - name: Initialize and validate v${{ matrix.version }}
        run: |
          cd tests/0.13
          terraform init
          terraform validate

Getting Started

The following instructions will help you get setup for development and testing purposes.

Prerequisites

yarn is used to handle dependencies and executing scripts on the codebase.

See here for instructions on installing yarn on your local machine.

Once you have installed yarn, you can install the project dependencies by running the following command from within the project root directory:

  $ yarn

Contributing

Please read CODE_OF_CONDUCT.md for details on our code of conduct and the process for submitting pull requests.

Changelog

Please see the CHANGELOG.md for details on individual releases.

Terraform Min/Max is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

GitHub action used to evaluate the Terraform minimum and maximum versions permitted
v1.3.2
Latest

Terraform Min/Max is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.