aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap

Include the reader host to the generated Aurora RDS cluster secret

Open
#1,492 3 comments 19 reactions 0 assignees View on GitHub
enhancement
Dominant language
No language data
Stars
1.1k
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Name of the resource

AWS::SecretsManager::SecretTargetAttachment

### Resource name

_No response_

### Description

Include the reader host to the generated Secrets Manager secret for an RDS Aurora cluster.

Currently, the JSON it looks like this:

```json
{
"engine": "",
"dbClusterIdentifier": "",
"host": "",
"port": ""
"username": "",
"password": "",
"dbname": ""
}
```

### Use Case
It would be awesome to have the reader host in the secret, as we won't need to do string manipulation on our side:

```js
// What else can we do!? 😅
const readerHost = secret.host.replace('.cluster-', '.cluster-ro-');
```

### Proposed Solution
Just add a key conatining the readonly endpoint URL to the JSON (key name to your taste!), like so:

```json
{
"engine": "",
"dbClusterIdentifier": "",
"host": "",
"readerHost": "",
"port": ""
"username": "",
"password": "",
"dbname": ""
}
```

### Other Details

Related AWS CDK issues:
https://github.com/aws/aws-cdk/issues/11517
https://github.com/aws/aws-cdk/issues/22050

Contributor guide

Open the contributing guide

Research direction

Start with AWS::SecretsManager::SecretTargetAttachment and inspect how the generated secret JSON is currently produced for an Aurora RDS cluster. Review the related AWS CDK issues for context and confirm the expected reader endpoint field; done means the secret includes the reader host without requiring string manipulation.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws
Domain
cloud, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.