We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 65cc22f commit 7eaf832Copy full SHA for 7eaf832
lib/aliasRestructureStack.js
@@ -224,6 +224,11 @@ module.exports = {
224
uriParts[funcIndex] = { Ref: aliasName };
225
}
226
227
+ // If the method is located on the root resource, set the parent correctly
228
+ if (_.has(method, 'Properties.ResourceId.Fn::GetAtt') && method.Properties.ResourceId['Fn::GetAtt'][0] === 'ApiGatewayRestApi') {
229
+ method.Properties.ResourceId = { 'Fn::ImportValue': `${stackName}-ApiGatewayRestApiRootResource` };
230
+ }
231
+
232
method.Properties.RestApiId = { 'Fn::ImportValue': `${stackName}-ApiGatewayRestApi` };
233
234
// Check for user resource overrides
0 commit comments