docs: update README, GAP_ANALYSIS, add CHANGELOG #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Terraform Validate | |
| on: | |
| push: | |
| branches: [dev, main, master] | |
| pull_request: | |
| branches: [main, master] | |
| env: | |
| TF_VERSION: "1.5.0" | |
| jobs: | |
| validate: | |
| name: Validate Terraform | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Terraform | |
| uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: ${{ env.TF_VERSION }} | |
| - name: Terraform Format Check | |
| id: fmt | |
| run: terraform fmt -check -recursive | |
| continue-on-error: true | |
| - name: Create dummy tfvars for validation | |
| run: | | |
| cat > terraform.tfvars <<EOF | |
| telegram_token = "dummy-token-for-validation" | |
| lab_role_arn = "arn:aws:iam::123456789012:role/LabRole" | |
| environment = "dev" | |
| EOF | |
| - name: Create dummy package directory | |
| run: | | |
| mkdir -p package | |
| cp handler.py package/ | |
| touch package/__init__.py | |
| - name: Terraform Init | |
| id: init | |
| run: terraform init -backend=false | |
| - name: Terraform Validate | |
| id: validate | |
| run: terraform validate | |
| - name: Post Validation Status | |
| if: github.event_name == 'pull_request' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| const output = `#### Terraform Format 🖌 \`${{ steps.fmt.outcome }}\` | |
| #### Terraform Init ⚙️ \`${{ steps.init.outcome }}\` | |
| #### Terraform Validate 🤖 \`${{ steps.validate.outcome }}\` | |
| *Pushed by: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; | |
| github.rest.issues.createComment({ | |
| issue_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: output | |
| }) | |
| lint: | |
| name: Lint Python | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.9" | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install flake8 | |
| - name: Lint with flake8 | |
| run: | | |
| # Stop build if there are Python syntax errors or undefined names | |
| flake8 handler.py --count --select=E9,F63,F7,F82 --show-source --statistics | |
| # Exit-zero treats all errors as warnings | |
| flake8 handler.py --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Run Checkov (Terraform Security) | |
| uses: bridgecrewio/checkov-action@v12 | |
| with: | |
| directory: . | |
| framework: terraform | |
| soft_fail: true | |
| output_format: cli |