Skip to content

Commit

Permalink
fix(ssm): fix service principals for all regions since ap-east-1 (#17047
Browse files Browse the repository at this point in the history
)

fixes #16188 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
jolo-dev committed Nov 11, 2021
1 parent 4ba40dc commit 5900548
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/@aws-cdk/region-info/lib/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ export class Default {

// Services with a regional principal
case 'states':
case 'ssm':
return `${service}.${region}.amazonaws.com`;

// Services with a partitional principal
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/region-info/test/default.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const urlSuffix = '.nowhere.null';

describe('servicePrincipal', () => {
for (const suffix of ['', '.amazonaws.com', '.amazonaws.com.cn']) {
for (const service of ['states']) {
for (const service of ['states', 'ssm']) {
test(`${service}${suffix}`, () => {
expect(Default.servicePrincipal(`${service}${suffix}`, region, urlSuffix)).toBe(`${service}.${region}.amazonaws.com`);
});
Expand Down

0 comments on commit 5900548

Please sign in to comment.