Migrate from Secrets Manager to SSM Parameter Store#79
Merged
Conversation
Replace all Secrets Manager usage with SSM Parameter Store SecureString
to eliminate per-secret monthly costs ($0.40/secret/month).
- service-secret module: aws_secretsmanager_secret → aws_ssm_parameter
at /{project}/apps/{service}/{name}
- service-rds module: remove manage_master_user_password, use
random_password + SSM parameter at /{project}/apps/{name}/db-master-password
- ECS execution role: secretsmanager:GetSecretValue → ssm:GetParameters
scoped to parameter/{project}/apps/*
- Identity Center: secretsmanager:Describe/List → ssm:DescribeParameters/GetParametersByPath
- registry.py: update output_map and exports for new resource types
- All docs updated to reflect SSM-only secret storage
Terraform Plan🚧 Changes detected — Plan: 0 to add, 1 to change, 0 to destroy. Plan outputLLM ReviewRisk: 🟢 LOW Routine IAM policy update migrating ECS execution role from Secrets Manager to SSM Parameter Store for application secrets access.
|
Alexanderamiri
added a commit
that referenced
this pull request
May 9, 2026
## Summary
- **service-secret module**: Replaced `aws_secretsmanager_secret` with
`aws_ssm_parameter` (SecureString) at
`/{project}/apps/{service}/{name}`. Outputs renamed: `secret_arn` →
`parameter_arn`, `secret_name` → `parameter_name`
- **service-rds module**: Removed `manage_master_user_password = true`
(which forced Secrets Manager). Now uses `random_password` + SSM
parameter at `/{project}/apps/{name}/db-master-password` with
`ignore_changes` on both the parameter value and RDS password
- **ECS execution role**: `secretsmanager:GetSecretValue` →
`ssm:GetParameters` scoped to `parameter/${project}/apps/*`
- **Identity Center developer permission set**:
`secretsmanager:DescribeSecret/ListSecrets` →
`ssm:DescribeParameters/GetParametersByPath`
- **registry.py**: Updated output_map and exports for both secret and
RDS entries
- All 5 doc files updated
**Cost impact**: Eliminates $0.40/secret/month Secrets Manager charges.
SSM Parameter Store SecureString is free (standard tier).
**Scoped access verified**: All SSM permissions use specific ARN paths —
no `Resource = "*"` on any read/write action. ECS execution role is
scoped to `parameter/${project}/apps/*`.
**Note**: No RDS or service-secret resources are deployed yet, so this
is a pure code change with no state migration needed.
## Test plan
- [ ] `terraform fmt -recursive` passes
- [ ] `terraform validate` passes on platform/ and modules
- [ ] CI plan shows no unexpected changes (no secrets/RDS deployed yet)
- [ ] Verify ECS `secrets` block `valueFrom` works with SSM parameter
ARNs (supported natively by ECS)
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
aws_secretsmanager_secretwithaws_ssm_parameter(SecureString) at/{project}/apps/{service}/{name}. Outputs renamed:secret_arn→parameter_arn,secret_name→parameter_namemanage_master_user_password = true(which forced Secrets Manager). Now usesrandom_password+ SSM parameter at/{project}/apps/{name}/db-master-passwordwithignore_changeson both the parameter value and RDS passwordsecretsmanager:GetSecretValue→ssm:GetParametersscoped toparameter/${project}/apps/*secretsmanager:DescribeSecret/ListSecrets→ssm:DescribeParameters/GetParametersByPathCost impact: Eliminates $0.40/secret/month Secrets Manager charges. SSM Parameter Store SecureString is free (standard tier).
Scoped access verified: All SSM permissions use specific ARN paths — no
Resource = "*"on any read/write action. ECS execution role is scoped toparameter/${project}/apps/*.Note: No RDS or service-secret resources are deployed yet, so this is a pure code change with no state migration needed.
Test plan
terraform fmt -recursivepassesterraform validatepasses on platform/ and modulessecretsblockvalueFromworks with SSM parameter ARNs (supported natively by ECS)