`replaceOutputs()` should `dependsOn` target nested stack?
vicary opened this issue · 0 comments
One of our resources in AppSync data source references a lambda ARN internally, we were adding function alias for provisioned currency.
It was all good before split stacks kicks in, until this plugin replaces my { "Fn::GetAtt": ["TheLambdaName", "Arn"] }
with this format { "Fn::GetAtt": ["FunctionsNestedStack", "Outputs.TheLambdaNameArn"] }
.
serverless-plugin-split-stacks/lib/replace-outputs.js
Lines 8 to 13 in 3fec07b
The deployment always fail with an error of Fn::GetAtt
referencing undefined resource FunctionsNestedStack
when used with this plugin, I am wondering if this is caused by the lack of DependsOn
to the FunctionsNestedStack
from the above lines.
The whole error message as below,
An error occurred: AppSyncDataSourcesNestedStack - Template error: instance of Fn::GetAtt references undefined resource FunctionsNestedStack.
Original reference syntax,
{
"lambdaFunctionArn": {
"Fn::Join": [
":",
[
{ "Fn::GetAtt": ["TheLambdaName", "Arn"] },
"provisioned"
]
]
}
}
After Split Stacks hook,
{
"lambdaFunctionArn": {
"Fn::Join": [
":",
[
{ "Fn::GetAtt": ["FunctionsNestedStack", "Outputs.TheLambdaNameArn"] },
"provisioned"
]
]
}
}