advanced patterns with AWS CloudFormation nested stacks and outputs
I can't seem to get I recently switched to I can't seem to get I'm working with an scenario with AWS CloudFormation where my nested stacks are not passing outputs as expected. I've set up a main stack that includes two nested stacks, and I'm trying to pass an output value from one nested stack to the other. However, it seems that the output from the first nested stack isn't being recognized in the second one, leading to a `ResourceNotFound` behavior when I attempt to reference it. Here's a simplified version of my CloudFormation template: ```yaml Resources: MainStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://mybucket.s3.amazonaws.com/nested1.yaml Parameters: SomeParameter: !Ref SomeValue AnotherNestedStack: Type: AWS::CloudFormation::Stack Properties: TemplateURL: https://mybucket.s3.amazonaws.com/nested2.yaml Parameters: OutputFromFirstStack: !GetAtt MainStack.Outputs.SomeOutput ``` In `nested1.yaml`, I have the following output defined: ```yaml Outputs: SomeOutput: Description: "An output value to be used in another stack" Value: !Ref SomeResource ``` In `nested2.yaml`, I'm trying to use that output like this: ```yaml Parameters: OutputFromFirstStack: Type: String Description: "This is the output from the first nested stack" ``` Despite this setup, I'm getting the following behavior during the creation of the main stack: ``` Resource with id 'SomeResource' not found. ``` I've double-checked the resource names and ensured that they match across both stacks, and I'm using the latest version of the CloudFormation template syntax. I've also looked into the CloudFormation documentation on nested stacks but haven't found specific guidance on how to properly reference outputs from one stack to another. Is there something I might be overlooking? Any advice or insights would be greatly appreciated! This is for a application running on Debian. Has anyone else encountered this? For reference, this is a production CLI tool. Thanks in advance!