Outputs for Macro Count
Closed this issue · 2 comments
Hi , I am wondering how can i get the resource output which created by count macro . For example i need to get the ec2 instance ip which is refered by macro
Currently experiencing the same issue, it seems to work until I only have to create only one.
Example below:
The condition basically reflects a !Ref to the count number set in the parameters from 2-10 (Check pull requests if you also require that)
InstanceId2:
Condition: Instance2
Description: "EC2 server ID"
Value: !Ref "WindowsInstance2"
Export:
Name: !Sub "${AWS::StackName}-InstanceId2"
Currently fighting an error that claims "WindowsInstance2" doesn't exist in the template, even though the Count is set to just 1.
We are archiving this repository in favor of similar content located here: https://github.com/aws-cloudformation/aws-cloudformation-templates/tree/main/aws/services/CloudFormation/MacrosExamples