Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6c5bc44
Add production refactor design spec
daringanitch May 17, 2026
3f89b14
Add production refactor implementation plan
daringanitch May 17, 2026
e3a6eb0
chore: add .gitignore with .worktrees/ and .DS_Store
daringanitch May 18, 2026
58383be
feat: add bootstrap module for S3 + DynamoDB remote state
daringanitch May 18, 2026
e9550db
fix: bootstrap module — add S3 sub-resource ordering and DynamoDB pre…
daringanitch May 18, 2026
5edb77c
feat: add providers.tf with version constraints and Helm/K8s config
daringanitch May 18, 2026
00a41ea
refactor: variables.tf is now single source of truth; add cluster_ver…
daringanitch May 18, 2026
a4b3695
fix: correct EKS arg names (subnet_ids, desired_size); wire all child…
daringanitch May 18, 2026
89dc46c
refactor: cert_manager module — add variables.tf and outputs.tf
daringanitch May 18, 2026
69d0e03
refactor: istio module — add variables.tf and outputs.tf
daringanitch May 18, 2026
fa30f38
refactor: postgres module — add variables.tf and outputs.tf
daringanitch May 18, 2026
44dc8ea
fix: vault module — replace broken kubernetes_manifest with native k8…
daringanitch May 18, 2026
153aaae
feat: flux module — wire GitRepository + Kustomization; add variables…
daringanitch May 18, 2026
b089e64
feat: add Datadog module — APM, logs, cluster metrics, IRSA
daringanitch May 18, 2026
d8ed063
chore: remove komodor module — replaced by Datadog
daringanitch May 18, 2026
4acbe99
feat: add bootstrap.sh — runs bootstrap/ and writes backend.tf automa…
daringanitch May 18, 2026
0b96c9a
fix: rewrite one-shot-deploy.sh — correct paths, single root apply, i…
daringanitch May 18, 2026
37a869d
feat: add GitHub Actions terraform-plan workflow (PR: fmt + validate …
daringanitch May 18, 2026
967b372
feat: add GitHub Actions terraform-apply workflow (merge to main: pla…
daringanitch May 18, 2026
89bd075
docs: add terraform.tfvars.example, update .gitignore and README with…
daringanitch May 18, 2026
e8ab455
fix: use OIDC auth, -backend-config for state, and plan artifact in C…
daringanitch May 18, 2026
74f3158
fix: parameterize postgres credentials, cert-manager email, and fix b…
daringanitch May 18, 2026
2d351ac
fix(ci): switch AWS auth to access key secrets; guard PR comment agai…
daringanitch May 20, 2026
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
56 changes: 56 additions & 0 deletions .github/workflows/terraform-apply.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Terraform Apply

on:
push:
branches:
- main

permissions:
contents: read

concurrency:
group: terraform-apply
cancel-in-progress: false

jobs:
apply:
name: Terraform Apply
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~1.7"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Terraform Init
run: |
terraform init -input=false \
-backend-config="bucket=${{ secrets.TF_STATE_BUCKET }}" \
-backend-config="key=eks-gitops-platform/terraform.tfstate" \
-backend-config="region=us-west-2" \
-backend-config="dynamodb_table=${{ secrets.TF_STATE_TABLE }}" \
-backend-config="encrypt=true"
working-directory: eks-gitops-platform

- name: Terraform Plan
run: |
terraform plan -no-color -input=false -out=/tmp/tfplan \
-var="datadog_api_key=${{ secrets.DATADOG_API_KEY }}" \
-var="datadog_app_key=${{ secrets.DATADOG_APP_KEY }}" \
-var="github_repo_url=${{ secrets.TF_VAR_GITHUB_REPO_URL }}"
working-directory: eks-gitops-platform

- name: Terraform Apply
run: terraform apply -auto-approve /tmp/tfplan
working-directory: eks-gitops-platform
100 changes: 100 additions & 0 deletions .github/workflows/terraform-plan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Terraform Plan

on:
pull_request:
branches:
- main

permissions:
contents: read
pull-requests: write

concurrency:
group: terraform-plan-${{ github.ref }}
cancel-in-progress: true

jobs:
plan:
name: Terraform Plan
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v3
with:
terraform_version: "~1.7"

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2

- name: Terraform Format Check
id: fmt
run: terraform fmt -check -recursive
working-directory: eks-gitops-platform

- name: Terraform Init
id: init
run: |
terraform init -input=false \
-backend-config="bucket=${{ secrets.TF_STATE_BUCKET }}" \
-backend-config="key=eks-gitops-platform/terraform.tfstate" \
-backend-config="region=us-west-2" \
-backend-config="dynamodb_table=${{ secrets.TF_STATE_TABLE }}" \
-backend-config="encrypt=true"
working-directory: eks-gitops-platform

- name: Terraform Validate
id: validate
run: terraform validate
working-directory: eks-gitops-platform

- name: Run tfsec
uses: aquasecurity/tfsec-action@v1.0.3
with:
working_directory: eks-gitops-platform
minimum_severity: HIGH
soft_fail: false

- name: Terraform Plan
id: plan
run: |
terraform plan -no-color -input=false \
-var="datadog_api_key=${{ secrets.DATADOG_API_KEY }}" \
-var="datadog_app_key=${{ secrets.DATADOG_APP_KEY }}" \
-var="github_repo_url=${{ secrets.TF_VAR_GITHUB_REPO_URL }}" \
2>&1 | tee /tmp/plan.txt
echo "exit_code=${PIPESTATUS[0]}" >> "$GITHUB_OUTPUT"
working-directory: eks-gitops-platform

- name: Post Plan as PR Comment
uses: actions/github-script@v7
if: always()
env:
PLAN_PATH: /tmp/plan.txt
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
if (!fs.existsSync(process.env.PLAN_PATH)) {
console.log('No plan output — skipping comment (plan did not run)');
return;
}
const plan = fs.readFileSync(process.env.PLAN_PATH, 'utf8');
const truncated = plan.length > 60000
? plan.substring(0, 60000) + '\n\n...[truncated — see Actions logs for full output]'
: plan;
const header = `## Terraform Plan — ${{ github.event.pull_request.head.sha }}`;
const body = `${header}\n\n\`\`\`\n${truncated}\n\`\`\``;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body,
});
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.worktrees/
.DS_Store
Loading
Loading