-
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_redshiftserverless): CfnNamespace missing adminPasswordSecretArn property #29930
Comments
Looking at the Please cut a ticket to cloudformation-coverage-roadmap to help the cfn team prioritize. Meanwhile, I'll cut an internal ticket for that as well. |
internal tracking: V1360162562 |
Confirmed it's a limit of CFN. At this moment CDK would need custom resource for that. |
You can use this for now if needed // Custom resource role, for least privilege
const getNamespaceCRRole = new iam.Role(this, 'GetNamespaceRole', {
assumedBy: new iam.ServicePrincipal('lambda.amazonaws.com'),
inlinePolicies: {
NamespaceCRPolicy: new iam.PolicyDocument({
statements: [
new iam.PolicyStatement({
actions: ['redshift-serverless:GetNamespace'],
resources: ['exmpleNamespaceArn'],
}),
new iam.PolicyStatement({
actions: ['logs:CreateLogStream', 'logs:PutLogEvents'],
resources: ['logGroupArn'],
}),
],
}),
},
});
// custom resource def
const getNamespaceCR = new cr.AwsCustomResource(this, 'GetNamespaceCR', {
onUpdate: {
service: 'RedshiftServerless',
action: 'GetNamespace',
parameters: {
namespaceName: props.namespaceName,
},
physicalResourceId: cr.PhysicalResourceId.of('exampleNamespaceName'),
},
role: getNamespaceCRRole.withoutPolicyUpdates(),
functionName: props.getNamespaceFunctionName,
logGroup: logGroupConstruct,
});
// importing the secret into the CDK, using the full secret ARN
this.redshiftAdminSecret = secretsmanager.Secret.fromSecretCompleteArn(
this,
'RedshiftAdminSecret',
getNamespaceCR.getResponseField('namespace.adminPasswordSecretArn')
); |
Describe the feature
CfnNamespace is missing
attrNamespaceAdminPasswordSecretArn
which is listed in NamespaceProperty.Use Case
I need the Secret ARN that Redshift Serverless has created when
manageAdminPassword = true
, so that I can use the ARN in subsequent code.Proposed Solution
No response
Other Information
No response
Acknowledgements
CDK version used
2.138.0
Environment details (OS name and version, etc.)
macOS 13.6.4
The text was updated successfully, but these errors were encountered: