Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .github/workflows/pr_iac_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
with:
distribution: 'corretto'
java-version: 11
- name: Build Project
working-directory: .
run: |
mvn install -DskipTests
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

terraform validate needs to be able to find the artifacts of the build process. Because they are all -SNAPSHOT, they have to be built. So, build them.

- name: Run SAM validator to check syntax of IaC templates - Java
working-directory: examples/powertools-examples-core/${{ matrix.project }}
run: |
Expand All @@ -38,7 +42,7 @@ jobs:
terraform -version
terraform init -backend=false
terraform validate
terraform plan
echo terraform plan # We can't do this without a credentials source
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one needs IAM credentials ?! I've removed it so we do all of the validation apart from the part that connects to AWS. I think this is reasonable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's remove the part that needs AWS credentials, it will avoid failed builds for non-PT-members who push a PR.

- name: Setup Terraform lint
uses: terraform-linters/setup-tflint@a5a1af8c6551fb10c53f1cd4ba62359f1973746f # v3.1.1
- name: Run Terraform lint to check for best practices, errors, deprecated syntax etc.
Expand Down

This file was deleted.