aws-rds: Subnet group name is always lowercased with `SubnetGroup` L2 construct
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the issue
On [`SubnetGroup` docs for `subnetGroupName`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.SubnetGroup.html#subnetgroupname) it's not specified that name will always be lowercased but [looking into source code](https://github.com/aws/aws-cdk/blob/a40f2ec1508e9b1718854b4b7c4037d59f197903/packages/aws-cdk-lib/aws-rds/lib/subnet-group.ts#L77-L87), name is always lowercased so things like `Ref` intrinsic function can work correctly.
QQ, why is this not the case for other constructs like [`Cluster`](https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ecs.Cluster.html)? Using `Ref` on both `DBSubnetGroup` and `Cluster` returns resource name and CDK does not lowercase `Cluster` resource name. Template reference:
+ https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbsubnetgroup.html#aws-resource-rds-dbsubnetgroup-return-values
+ https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#aws-resource-ecs-cluster-return-values
### Links
+ https://github.com/aws/aws-cdk/blob/a40f2ec1508e9b1718854b4b7c4037d59f197903/packages/aws-cdk-lib/aws-rds/lib/subnet-group.ts#L77-L87
+ https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_rds.SubnetGroup.html#subnetgroupname
+ https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-rds-dbsubnetgroup.html#aws-resource-rds-dbsubnetgroup-return-values
+ https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-cluster.html#aws-resource-ecs-cluster-return-values
Contributor guide
Research direction
Start with packages/aws-cdk-lib/aws-rds/lib/subnet-group.ts at lines 77–87 and the SubnetGroup subnetGroupName documentation. Compare the RDS DBSubnetGroup and ECS Cluster CloudFormation return-value references linked in the issue, then determine whether the behavior or its documentation is intended. Done requires an agreed resolution for the lowercasing discrepancy and corresponding project changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100