Skip to content

Commit

Permalink
fix(docdb): DB Instance ARN uses 'docdb' as the service component ins…
Browse files Browse the repository at this point in the history
…tead of 'rds' (aws#19555)

Fixes aws#19554

----

### All Submissions:

* [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/master/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/master/INTEGRATION_TESTS.md)?
	* [ ] Did you use `cdk-integ` to deploy the infrastructure and generate the snapshot (i.e. `cdk-integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
peterwoodworth authored and Stephen Potter committed Apr 27, 2022
1 parent 8d77076 commit a32ee4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-docdb/lib/instance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ abstract class DatabaseInstanceBase extends cdk.Resource implements IDatabaseIns
*/
public get instanceArn(): string {
return cdk.Stack.of(this).formatArn({
service: 'docdb',
service: 'rds',
resource: 'db',
arnFormat: ArnFormat.COLON_RESOURCE_NAME,
resourceName: this.instanceIdentifier,
Expand Down
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-docdb/test/instance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ describe('DatabaseInstance', () => {
[
'arn:',
{ Ref: 'AWS::Partition' },
':docdb:us-test-1:12345:db:',
':rds:us-test-1:12345:db:',
{ Ref: 'InstanceC1063A87' },
],
],
Expand Down Expand Up @@ -160,7 +160,7 @@ describe('DatabaseInstance', () => {
[
'arn:',
{ Ref: 'AWS::Partition' },
`:docdb:us-test-1:12345:db:${instanceIdentifier}`,
`:rds:us-test-1:12345:db:${instanceIdentifier}`,
],
],
},
Expand Down

0 comments on commit a32ee4d

Please sign in to comment.