name: Terraform Modules on: push: paths: - "terraform/litellm/aws/**" - "terraform/litellm/gcp/**" - ".github/workflows/test-terraform-modules.yml" pull_request: branches: - main - "litellm_**" paths: - "terraform/litellm/aws/**" - "terraform/litellm/gcp/**" - ".github/workflows/test-terraform-modules.yml" permissions: contents: read concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: module: name: fmt, validate, test (${{ matrix.module }}) runs-on: ubuntu-latest timeout-minutes: 15 strategy: fail-fast: false matrix: module: [aws, gcp] defaults: run: working-directory: terraform/litellm/${{ matrix.module }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - uses: hashicorp/setup-terraform@dfe3c3f87815947d99a8997f908cb6525fc44e9e # v4.0.1 with: terraform_version: 1.13.3 terraform_wrapper: false - name: fmt run: terraform fmt -recursive -check -diff - name: init run: terraform init -backend=false -input=false - name: validate run: terraform validate # Plan-only, mock_provider-backed: no cloud credentials, no API calls. - name: test run: terraform test