feat(phase4): ArgoCD-driven Terraform apply via PostSync Hook Job
- Create Phase 4 ArgoCD Application (terraform-apply) - PostSync Hook Job runs: terraform init && terraform apply -auto-approve - ServiceAccount + ClusterRole for cluster-admin RBAC - S3 credentials encrypted with SOPS (terraform-s3-secrets.enc.yaml) - Pre-commit hook blocks local 'terraform apply' — all changes via git push - True IaC: modify terraform/*.tf → git push → ArgoCD applies automatically
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: terraform-apply
|
||||
namespace: argocd
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: terraform-apply
|
||||
rules:
|
||||
- apiGroups: ["*"]
|
||||
resources: ["*"]
|
||||
verbs: ["*"]
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: terraform-apply
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: terraform-apply
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: terraform-apply
|
||||
namespace: argocd
|
||||
Reference in New Issue
Block a user