Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clowdhaus/terraform-min-max
GitHub action used to evaluate the Terraform minimum and maximum versions permitted
https://github.com/clowdhaus/terraform-min-max
github-actions terraform
Last synced: 2 days ago
JSON representation
GitHub action used to evaluate the Terraform minimum and maximum versions permitted
- Host: GitHub
- URL: https://github.com/clowdhaus/terraform-min-max
- Owner: clowdhaus
- License: apache-2.0
- Created: 2020-11-06T05:27:23.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2024-06-16T18:04:15.000Z (5 months ago)
- Last Synced: 2024-10-27T13:28:38.392Z (18 days ago)
- Topics: github-actions, terraform
- Language: HCL
- Homepage:
- Size: 1.41 MB
- Stars: 23
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
terraform-min-max
GitHub action used to evaluate the Terraform minimum and maximum versions permitted
## Usage
```yml
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
```yml
jobs:
versionExtract:
name: Extract Min/Max Versions
runs-on: ubuntu-lateststeps:
- 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](https://github.com/yarnpkg/yarn)
`yarn` is used to handle dependencies and executing scripts on the codebase.
See [here](https://yarnpkg.com/en/docs/install#debian-stable) 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:
```bash
$ yarn
```## Contributing
Please read [CODE_OF_CONDUCT.md](.github/CODE_OF_CONDUCT.md) for details on our code of conduct and the process for submitting pull requests.
## Changelog
Please see the [CHANGELOG.md](CHANGELOG.md) for details on individual releases.