-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
aws-docdbelastic: No parameter to pass Secret ARN #28935
Comments
I checked the following links but unfortunately I can't find detailed document about the usage. I would suggest you create a username / password in AWS Secrets Manager Secret and pass the secret ARN to this property. Also, I will submit an internal ticket to the relevant team to improve the document. Let me know if it works for you. Thank you. |
To which property should I pass the ARN into?
This throws an error |
TLDR; Your own example in the ticket description should work.Have you tried it? Explanation and possible pitfallsCDK classes which starts with In a CloudFormation template you would do something like Resources:
SecretAdminUserPassword:
Type: AWS::SecretsManager::Secret
Properties:
# I advise against putting it in your CloudFormation template or CDK code like that
# here it's for example purposes only
SecretString: 'dbadmin123'
MyClaster:
Type: AWS::DocDBElastic::Cluster
Properties:
AdminUserName: "ClasterAdmin"
AdminUserPassword: !Ref SecretAdminUserPassword
AuthType: SECRET_ARN
... In CDK if you're using However, there might be a catch. According to the P.SIt's not a CDK bug. More a lack of documentation and support from the service team. |
|
Describe the bug
I am trying to create an elastic document db cluster using CDK. This is the construct for the same - https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_docdbelastic.CfnCluster.html#shardcount.
It mentions that
authType
should be eitherSECRET_ARN
orPLAIN_TEXT
. It doesn't clarify what does it mean, neither does the cloud formation documentation. I assumed that Plain_text is supposed to be used when I pass my password as plain text in theadminUserPassword
property.How does
SECRET_ARN
work? If myauthType
isSECRET_ARN
, where do I pass my secret ARN and how do I create it? Do I pass the arn in theadminUserPassword
field only? or do I pass thesecret name
? In either case, theadminUserPassword
has a character limit of 100 characters.Also, even though
adminUserPassword
is mentioned as aoptional
field in the cdk documentation and aconditional
field in the cloud formation documentation, when I don't pass it, it throws an error.Expected Behavior
There should be a property to send secret arn
Current Behavior
Only password property present.
Reproduction Steps
Possible Solution
No response
Additional Information/Context
No response
CDK CLI Version
2.108.1
Framework Version
No response
Node.js Version
v20.8.0
OS
MacOS
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: