Skip to content

Commit

Permalink
fix: Fixes the partition arn for chinese regions
Browse files Browse the repository at this point in the history
This should fix #79, #71 introduced a fix for gov-cloud that broke the arn for the chinese regions
  • Loading branch information
oliott committed Sep 5, 2024
1 parent ecac98b commit 4696f4e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,13 @@ export class StackDiff {
}

private getPartition(): string {
return this.stack.region?.startsWith('us-gov-') ? 'aws-us-gov' : 'aws';
if (this.stack.region?.startsWith('us-gov-')) {
return 'aws-us-gov';
} else if (this.stack.region?.startsWith('cn-')) {
return 'aws-cn';
} else {
return 'aws';
}
}

/**
Expand Down

0 comments on commit 4696f4e

Please sign in to comment.