diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..22372c7 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Terraform Plan Generic Modules +on: + push: + branches: + - monorepo + pull_request: + branches: + - main + +jobs: + modules: + runs-on: ubuntu-latest + steps: + - uses: theappnest/terraform-monorepo-action@master + id: modules + with: + monitored: 'main.tf' + outputs: + modules: ${{ steps.modules.outputs.modules }} + + terraform: + needs: modules + strategy: + matrix: + module: ${{ fromJson(needs.modules.outputs.modules) }} + uses: appvia/appvia-cicd-workflows/.github/workflows/terraform-plan.yml@main + name: Terraform + secrets: + infracost-api-key: ${{ secrets.ORG_INFRACOST_API_KEY }} + with: + aws-account-id: 536471746696 + enable-infracost: true + terraform-version: 1.5.7 + terraform-values-file: '${{ fromJson(needs.modules.outputs.modules) }}/values/production.tfvars' + working-directory: ${{ matrix.module }} \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..524ab92 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.DS_Store +._.DS_Store +**/.DS_Store +**/._.DS_Store \ No newline at end of file diff --git a/main.tf b/main.tf new file mode 100644 index 0000000..b6fc4c6 --- /dev/null +++ b/main.tf @@ -0,0 +1 @@ +hello \ No newline at end of file