Migrate database migration workflows to AWS AppConfig while resolving the "edge case" where .NET services require a fully-baked appsettings.json (handling Container-Runtime-Population markers) without leaking secrets into build artifacts.
- New
rendercommand: Fetches config from AppConfig and resolves secrets. - Recursive Resolution: Handles nested JSON objects and lists in
appsettings.json. - Placeholder Baking: Specifically resolves
Container-Runtime-Populationstrings by searching Secrets Manager connection strings. - Role Assumption: Supports
sts:AssumeRolewithEXTERNAL_ID=\"appconfig-cicd\". - Robust Search: Checks both hyphenated and underscored service names across all applications.
- Two-Stage Fetch:
fetch-appconfig.shnow pulls a "raw" config (with placeholders) for the repo and a "resolved" config (with secrets) to a hidden directory. - Secure Runtime Mount:
dotnet-db-auto-migration-v1.shmounts the resolved config directly into the container, keeping the build context clean. - Credential Isolation: Isolated cross-account role credentials using temporary variables to prevent breaking subsequent ECR logins.
- Workflow Updates: Added toolkit setup and AWS credential logic to all migration entry points (
cicd-db-auto-migration-v1.yml,cicd-db-v1.yml,cicd-db-legacy-v1.yml). - Detection Fallback: Prioritizes find-based auto-detection for
apidirwhile maintaining metadata as a fallback.
- IAM Fix: Updated
cicd-appconfig-cross-account-accessrole trust policy to allow the local account root (and thuseks_mgmt). - User Permission: Explicitly granted
sts:AssumeRoleon the cross-account roles to theeks_mgmtuser iniam.tf.
- Successes:
approval_service,booking_service,optimize_service_sync,integration_service,validation_service. - Infrastructure Noise: Some failures persist due to unrelated
TIERvariable errors in Helm scripts orImagePullBackOff. - Branch:
test/appconfig-migrations-integrationacross all three repos.
- appconfig_toolkit: https://github.com/Groups360/appconfig_toolkit/pull/74
- devops_pipelines: https://github.com/Groups360/devops_pipelines/pull/63
- devops_aws_terraform: https://github.com/Groups360/devops_aws_terraform/pull/56