Skip to content

Commit

Permalink
The IoT custom resource should return the endpoint even on updates
Browse files Browse the repository at this point in the history
When bumping from 2.1.* to 2.2.* in one of our repos the cr suddenly started updating which caused the deploys to fail. The reason is that when it's updating it's not returning the endpoint as it's not making any call.
  • Loading branch information
Lewenhaupt authored Jan 15, 2025
1 parent 9e112eb commit a1b1a6d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ServerlessSpy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,15 @@ export class ServerlessSpy extends Construct {
endpointType: 'iot:Data-ATS',
},
},
onUpdate: {
service: 'Iot',
action: 'describeEndpoint',
physicalResourceId:
custom_resources.PhysicalResourceId.fromResponse('endpointAddress'),
parameters: {
endpointType: 'iot:Data-ATS',
},
},
installLatestAwsSdk: false,
policy: custom_resources.AwsCustomResourcePolicy.fromSdkCalls({
resources: custom_resources.AwsCustomResourcePolicy.ANY_RESOURCE,
Expand Down

0 comments on commit a1b1a6d

Please sign in to comment.