Modern QA2026Integrating Into CI — tiles
Log inJoin
62 / 75 · 08 Infrastructure as Code Testing · IAM Policy and Network Rule Verification← prev⊞ allnext →☰ Read as one page

11.5Integrating Into CI

# .github/workflows/iam-network-tests.yml
name: IAM and Network Policy Tests
on:
  pull_request:
    paths:
      - 'terraform/policies/**'
      - 'terraform/modules/networking/**'
      - 'terraform/modules/security/**'

jobs:
  policy-tests:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-python@v5
        with:
          python-version: '3.12'
      - run: pip install pytest
      - name: Run IAM policy tests
        run: pytest tests/test_iam_policies.py tests/test_network_rules.py -v

IAM and network testing is high-value, low-effort work. These tests run in seconds, require no cloud credentials (they analyze JSON files), and catch the most dangerous class of infrastructure misconfigurations.