| .. | ||
| action.yml | ||
| README.md | ||
terraform-validate
Validate Terraform code without a backend (for PR checks).
Inputs
| Input | Required | Default | Description |
|---|---|---|---|
jfrog-token |
Yes | Sets TF_TOKEN_schmalz_jfrog_io for provider auth |
|
terraform-dir |
No | terraform |
Directory containing .tf files |
terraform-version |
No | 1.11 |
Terraform version to use |
aws-role-arn |
No | "" |
If provided, runs aws-configure before validate |
aws-profile |
No | stage |
AWS profile when aws-role-arn is given |
Usage
- uses: schmalz/shared-actions/.github/actions/terraform-validate@v1
with:
jfrog-token: ${{ secrets.JFROG_TOKEN }}
Notes
- Runs
terraform init -backend=false,terraform fmt -check -recursive, andterraform validate. - Sets
TF_WORKSPACE=stageduring init. - Provider cache is restored/saved automatically.
- Optionally configures AWS credentials if
aws-role-arnis provided (requiresenable-openid-connect: true).