Skip to content

Commit

Permalink
fix: fix circular dep
Browse files Browse the repository at this point in the history
  • Loading branch information
Court Schuett committed Aug 14, 2023
1 parent 718b528 commit 3748297
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/pstn/pstnCustomResources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ export class PSTNResources extends Construct {
Resource: '*',
Effect: 'Allow',
},
{
Action: ['lambda:GetPolicy', 'lambda:AddPermission'],
Resource: '*',
Effect: 'Allow',
},
{
Action: 'ssm:*Parameter*',
Resource: `arn:aws:ssm:${Stack.of(this).region}:${
Expand Down Expand Up @@ -116,19 +121,19 @@ export class PSTNResources extends Construct {
});
}

if (props.resourceType === 'SMA' && props.properties.endpoint) {
pstnCustomResource.addToRolePolicy({
Action: 'lambda:GetPolicy',
Resource: props.properties.endpoint,
Effect: 'Allow',
});
// if (props.resourceType === 'SMA' && props.properties.endpoint) {
// pstnCustomResource.addToRolePolicy({
// Action: 'lambda:GetPolicy',
// Resource: props.properties.endpoint,
// Effect: 'Allow',
// });

pstnCustomResource.addToRolePolicy({
Action: 'lambda:AddPermission',
Resource: props.properties.endpoint,
Effect: 'Allow',
});
}
// pstnCustomResource.addToRolePolicy({
// Action: 'lambda:AddPermission',
// Resource: props.properties.endpoint,
// Effect: 'Allow',
// });
// }

this.pstnCustomResource = new CustomResource(this, 'pstnCustomResource', {
resourceType: 'Custom::PSTNResources',
Expand Down

0 comments on commit 3748297

Please sign in to comment.