Skip to content

Commit

Permalink
fix(redshiftserverless): from method generates invalid ARN (#58)
Browse files Browse the repository at this point in the history
fix from method
  • Loading branch information
mazyu36 authored Oct 14, 2024
1 parent f19707e commit c36585e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/aws-redshiftserverless/namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ export class Namespace extends Resource implements INamespace {
public readonly namespaceName = attrs.namespaceName;
public readonly namespaceId = attrs.namespaceId;
public readonly namespaceArn = Stack.of(this).formatArn({
resource: 'redshift-serverless',
service: 'namespace',
service: 'redshift-serverless',
resource: 'namespace',
resourceName: attrs.namespaceId,
});
}
Expand Down
4 changes: 2 additions & 2 deletions src/aws-redshiftserverless/workgroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ export class Workgroup extends Resource implements IWorkgroup {
defaultPort: aws_ec2.Port.tcp(attrs.port),
});
public readonly workgroupArn = Stack.of(this).formatArn({
resource: 'redshift-serverless',
service: 'workgroup',
service: 'redshift-serverless',
resource: 'workgroup',
resourceName: attrs.workgroupId,
});
}
Expand Down
4 changes: 2 additions & 2 deletions test/aws-redshiftserverless/namespace.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ describe('Redshift Serverless Namespace', () => {
test('should correctly format namespaceArn', () => {
expect(existingNamespace.namespaceArn).toEqual(
Stack.of(stack).formatArn({
resource: 'redshift-serverless',
service: 'namespace',
service: 'redshift-serverless',
resource: 'namespace',
resourceName: 'my-namespace-id',
}),
);
Expand Down
4 changes: 2 additions & 2 deletions test/aws-redshiftserverless/workgroup.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@ describe('Redshift Serverless Workgroup', () => {
test('should correctly format workgroupArn', () => {
expect(importedWorkgroup.workgroupArn).toEqual(
Stack.of(stack).formatArn({
resource: 'redshift-serverless',
service: 'workgroup',
service: 'redshift-serverless',
resource: 'workgroup',
resourceName: 'my-workgroup-id',
}),
);
Expand Down

0 comments on commit c36585e

Please sign in to comment.