Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bendrucker/find-terraform-modules
GitHub Action to find all Terraform module directories in a monorepo
https://github.com/bendrucker/find-terraform-modules
github-actions terraform
Last synced: 21 days ago
JSON representation
GitHub Action to find all Terraform module directories in a monorepo
- Host: GitHub
- URL: https://github.com/bendrucker/find-terraform-modules
- Owner: bendrucker
- License: mit
- Created: 2021-06-22T16:32:17.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T19:19:35.000Z (about 1 month ago)
- Last Synced: 2024-10-02T14:35:37.691Z (about 1 month ago)
- Topics: github-actions, terraform
- Language: TypeScript
- Size: 1.08 MB
- Stars: 12
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Find Terraform Modules Action [![build-test](https://github.com/bendrucker/find-terraform-modules/actions/workflows/test.yml/badge.svg)](https://github.com/bendrucker/find-terraform-modules/actions/workflows/test.yml)
A GitHub Action that finds all Terraform module directories in a monorepo. Results can be passed to matrix jobs or looped in other steps.
## Usage
```yaml
name: Validate
on:
push:
branches: [ main ]
pull_request:jobs:
find-modules:
runs-on: ubuntu-latest
steps:
- id: find
uses: bendrucker/find-terraform-modules@v1
with:
working-directory: ./modules
outputs:
modules: ${{ steps.find.outputs.modules }}
validate:
runs-on: ubuntu-latest
needs: find-modules
strategy:
matrix:
module: ${{ fromJson(needs.find-modules.outputs.modules) }}
steps:
- uses: actions/checkout@v2
- uses: hashicorp/setup-terraform@v1
- run: terraform fmt -check
- run: terraform init
- run: terraform validate -chdir ${{ matrix.module }}
```## Releasing
```sh
npm version $inc && git push --follow-tags
```