secret from SecretsManager not resolved correctly
See original GitHub issuethe secret doesn’t seem to be correctly resolved when used in outputs
Reproduction Steps
const secret = secretsManager.Secret.fromSecretArn(
this,
'Secrets',
'arn:aws:secretsmanager:us-east-1:xxx:secret:yyy-secrets-zzz',
);
new cdk.CfnOutput(this, 'testoutput', {
value: secret.secretValueFromJson('abcdef').toString(),
});
produces the following output:
app.testoutput = {{resolve:secretsmanager:arn:aws:secretsmanager:us-east-1:xxx:secret:yyy-secrets-zzz:SecretString:abcdef::}}
instead of the actual resolved secret
Environment
using aws-cdk v1.8.0
This is 🐛 Bug Report
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Resolve Secrets Manager secret access errors after updating ...
I attempted to retrieve or access an AWS Secrets Manager secret, ... This version of secret is not encrypted with the current KMS...
Read more >GetSecretValue operation is not authorized error with AWS ...
The issue was that the IAM user that I was using did not have he SecretsManager execution policy attached.
Read more >How to manage any kind of secret with AWS Secrets Manager
Setting up Secrets Manager for a non-RDS database is less trivial as ... Be sure to properly look into the service and keep...
Read more >AWS Secrets Manager — Boto3 Docs 1.17.104 documentation
The secret could be created using either the Secrets Manager console or the CLI/SDK ... print("The requested secret " + secret_name + "...
Read more >Best practice rules for AWS Secrets Manager - Medium
Ensure that Amazon Secrets Manager's automatic rotation interval is properly configured. 2. Secrets Manager In Use. Ensure that AWS Secrets Manager is in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
that makes sense. my actual use case is to use a secret from secretsManager as a k8s secret using
aws-cdk
’saddResource
functionality. in that case as well the secret is not resolved. what would be a good workflow there?Same use case here. It seems something related to
addResource
, that doesn’t resolve the value. But usingSecret.fromSecretArn
to create an environment variable in an ECS task definition works. Any workarround for this?