Skip to content

feat(secrets-management): add cloud-kms references for aws and gcp#66

Open
rawkode wants to merge 5 commits into
mainfrom
feat-secrets-management-cloud-kms
Open

feat(secrets-management): add cloud-kms references for aws and gcp#66
rawkode wants to merge 5 commits into
mainfrom
feat-secrets-management-cloud-kms

Conversation

@rawkode
Copy link
Copy Markdown

@rawkode rawkode commented Apr 8, 2026

Summary

  • Add cloud-kms reference docs under secrets-management/.
  • Add AWS reference: AWS KMS + Secrets Manager + ESO manifests + Terraform.
  • Add GCP reference: Cloud KMS (CMEK) + Secret Manager + ESO manifests + Terraform.
  • Each example provisions its own CoreWeave VPC and CKS cluster, then wires federation directly from module.cks.service_account_oidc_issuer_url — no terraform_remote_state dependency.
  • Optional automation for AWS IAM OIDC provider creation (create_oidc_provider) and GCP Workload Identity Pool/provider creation (create_workload_identity_pool).
  • AWS ServiceAccount carries the eks.amazonaws.com/role-arn annotation for ESO IRSA; SecretStore omits the redundant role field.
  • Each example ships an manifests/cpu-nodepool.yaml starter for clusters without auto-allocated capacity.

Validation

  • terraform fmt passes for both Terraform dirs.
  • AWS example exercised end-to-end on CKS: Terraform apply → ESO install → ExternalSecret syncs three keys → demo app reads them → rotation via aws secretsmanager put-secret-value propagates within one refresh interval → IAM scope negative test returns AccessDenied on an out-of-scope secret → terraform destroy cleans up.
  • GCP example mirrors the AWS structural fixes but is not yet runtime-tested.

@rawkode rawkode force-pushed the feat-secrets-management-cloud-kms branch from dbb6677 to 7992c58 Compare April 8, 2026 10:14
@rawkode rawkode changed the base branch from feat-secrets-management-infisical to main April 8, 2026 10:17
rawkode added 3 commits April 8, 2026 11:25
…to-end test

- Rewrite aws-kms and gcp-kms READMEs as numbered, copy-pasteable tutorials.
- Each example provisions its own VPC + CKS cluster and uses that cluster's
  OIDC issuer URL directly (no remote_state dependency).
- aws-kms: annotate SA with eks.amazonaws.com/role-arn for ESO IRSA;
  drop redundant role field from SecretStore.
- Add cpu-nodepool.yaml as a starter NodePool for clusters that don't get
  capacity automatically.
- Fix trim() -> trimspace() in OIDC presence check (Terraform trim/2).
- Add env.example KUBECONFIG entries and AWS_REGION clarification.
- Gitignore .envrc, kubeconfig, and tfplan in each example.
@rawkode rawkode marked this pull request as ready for review May 13, 2026 11:15
Copilot AI review requested due to automatic review settings May 13, 2026 11:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a new secrets-management reference area with end-to-end AWS and GCP “Cloud KMS + managed secrets backend + External Secrets Operator” tutorials, including Terraform to provision a disposable CoreWeave VPC/CKS cluster plus cloud-side KMS and secret manager resources, and Kubernetes manifests to validate syncing into runtime Secrets.

Changes:

  • Added top-level and secrets-management documentation to index the new reference architectures.
  • Added AWS reference (KMS + Secrets Manager + OIDC federation) with Terraform + ESO manifests + validation steps.
  • Added GCP reference (Cloud KMS CMEK + Secret Manager + Workload Identity Federation) with Terraform + ESO manifests + validation steps.

Reviewed changes

Copilot reviewed 35 out of 35 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
README.md Links the new secrets-management reference area from the repo root.
secrets-management/README.md Introduces secrets-management references and shared validation flow.
secrets-management/cloud-kms/README.md Documents the Cloud KMS-based secrets references and links to provider-specific guides.
secrets-management/cloud-kms/aws-kms/README.md AWS tutorial instructions for provisioning and validating ESO sync from Secrets Manager.
secrets-management/cloud-kms/aws-kms/.gitignore Ignores local tutorial artifacts (envrc/kubeconfig).
secrets-management/cloud-kms/aws-kms/env.example Example environment variable inputs for the AWS tutorial.
secrets-management/cloud-kms/aws-kms/manifests/00-namespace.yaml Namespace manifest for the AWS tutorial.
secrets-management/cloud-kms/aws-kms/manifests/10-service-account.yaml ServiceAccount for ESO auth in the AWS tutorial.
secrets-management/cloud-kms/aws-kms/manifests/20-secret-store.yaml ESO SecretStore definition for AWS Secrets Manager.
secrets-management/cloud-kms/aws-kms/manifests/30-external-secret.yaml ESO ExternalSecret mapping provider secrets to Kubernetes Secret keys.
secrets-management/cloud-kms/aws-kms/manifests/40-demo-app.yaml Demo Deployment reading the synced Kubernetes Secret.
secrets-management/cloud-kms/aws-kms/manifests/cpu-nodepool.yaml Optional NodePool manifest to ensure schedulable capacity.
secrets-management/cloud-kms/aws-kms/terraform/.gitignore Terraform stack gitignore for AWS tutorial files/state.
secrets-management/cloud-kms/aws-kms/terraform/main.tf Provisions CoreWeave VPC/CKS plus AWS KMS, Secrets Manager, OIDC provider, and IAM role/policy.
secrets-management/cloud-kms/aws-kms/terraform/outputs.tf Exposes key outputs (cluster name, issuer URL, role ARN, secret names).
secrets-management/cloud-kms/aws-kms/terraform/providers.tf Configures CoreWeave and AWS providers for the stack.
secrets-management/cloud-kms/aws-kms/terraform/terraform.tfvars.example Example variables for the AWS tutorial stack.
secrets-management/cloud-kms/aws-kms/terraform/variables.tf Defines inputs for CoreWeave + AWS provisioning and demo secret values.
secrets-management/cloud-kms/aws-kms/terraform/versions.tf Pins Terraform/provides constraints for the AWS stack.
secrets-management/cloud-kms/gcp-kms/README.md GCP tutorial instructions for provisioning and validating ESO sync from Secret Manager (CMEK).
secrets-management/cloud-kms/gcp-kms/.gitignore Ignores local tutorial artifacts (envrc/kubeconfig).
secrets-management/cloud-kms/gcp-kms/env.example Example environment variable inputs for the GCP tutorial.
secrets-management/cloud-kms/gcp-kms/manifests/00-namespace.yaml Namespace manifest for the GCP tutorial.
secrets-management/cloud-kms/gcp-kms/manifests/10-service-account.yaml ServiceAccount for ESO auth in the GCP tutorial.
secrets-management/cloud-kms/gcp-kms/manifests/20-secret-store.yaml ESO SecretStore definition for GCP Secret Manager.
secrets-management/cloud-kms/gcp-kms/manifests/30-external-secret.yaml ESO ExternalSecret mapping provider secrets to Kubernetes Secret keys.
secrets-management/cloud-kms/gcp-kms/manifests/40-demo-app.yaml Demo Deployment reading the synced Kubernetes Secret.
secrets-management/cloud-kms/gcp-kms/manifests/cpu-nodepool.yaml Optional NodePool manifest to ensure schedulable capacity.
secrets-management/cloud-kms/gcp-kms/terraform/.gitignore Terraform stack gitignore for GCP tutorial files/state.
secrets-management/cloud-kms/gcp-kms/terraform/main.tf Provisions CoreWeave VPC/CKS plus GCP KMS, Secret Manager CMEK secrets, and WIF resources/bindings.
secrets-management/cloud-kms/gcp-kms/terraform/outputs.tf Exposes key outputs (cluster name, issuer URL, KMS key ID, principal, secret names).
secrets-management/cloud-kms/gcp-kms/terraform/providers.tf Configures CoreWeave and Google providers for the stack.
secrets-management/cloud-kms/gcp-kms/terraform/terraform.tfvars.example Example variables for the GCP tutorial stack.
secrets-management/cloud-kms/gcp-kms/terraform/variables.tf Defines inputs for CoreWeave + GCP provisioning and demo secret values.
secrets-management/cloud-kms/gcp-kms/terraform/versions.tf Pins Terraform/provider constraints for the GCP stack.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread secrets-management/README.md
Comment thread secrets-management/cloud-kms/aws-kms/terraform/.gitignore Outdated
Comment thread secrets-management/cloud-kms/gcp-kms/terraform/.gitignore Outdated
Comment thread secrets-management/cloud-kms/gcp-kms/terraform/variables.tf
Comment thread secrets-management/cloud-kms/aws-kms/terraform/main.tf
…load_identity_pool_id

- Stop ignoring .terraform.lock.hcl in aws-kms and gcp-kms terraform dirs;
  commit the existing lock files so providers are pinned across runs
  (matches repo-level terraform/.gitignore guidance).
- Drop default = null from gcp-kms workload_identity_pool_id; the check
  in main.tf already asserts it must be set, so the variable is required.

Surfaced by Copilot PR review on #66.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants