Skip to content

Commit

Permalink
fix: support AWS::URLSuffix CFN pseudo-param in mock (aws-amplify#7416)
Browse files Browse the repository at this point in the history
  • Loading branch information
cjihrig authored and cjihrig-aws committed Jul 12, 2021
1 parent 9a93c9d commit 76085c6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const CFN_DEFAULT_PARAMS = {
'AWS::AccountId': '12345678910',
'AWS::StackId': 'fake-stackId',
'AWS::StackName': 'local-testing',
'AWS::URLSuffix': 'amazonaws.com',
};

const RESOLVER_TEMPLATE_LOCATION_PREFIX = 's3://${S3DeploymentBucket}/${S3DeploymentRootKey}/';
Expand Down
1 change: 1 addition & 0 deletions packages/amplify-util-mock/src/CFNParser/stack/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const CFN_PSEUDO_PARAMS = {
'AWS::AccountId': '12345678910',
'AWS::StackId': 'fake-stackId',
'AWS::StackName': 'local-testing',
'AWS::URLSuffix': 'amazonaws.com',
};

export function nestedStackHandler(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ describe('populate cfn params', () => {
'AWS::AccountId': '1234',
'AWS::StackId': 'arn:aws:cloudformation:us-test-1:1234:stack/my-test-stack',
'AWS::StackName': 'test-stack-name',
'AWS::URLSuffix': 'amazonaws.com',
});
});

Expand All @@ -93,6 +94,7 @@ describe('populate cfn params', () => {
'AWS::AccountId': '12345678910',
'AWS::StackId': 'fake-stack-id',
'AWS::StackName': 'local-testing',
'AWS::URLSuffix': 'amazonaws.com',
});
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const getCfnPseudoParams = (): Record<string, string> => {
'AWS::AccountId': accountId,
'AWS::StackId': stackId,
'AWS::StackName': stackName,
'AWS::URLSuffix': 'amazonaws.com',
};
};

Expand Down

0 comments on commit 76085c6

Please sign in to comment.