aws-cloudformation/aws-cloudformation-macros

Unresolved resource dependencies [mytestserver1] in the Outputs block of the template

Closed this issue · 3 comments

I am creating multiple ec2 instances using Count macro. Macro code does not account Outputs section when I try to obtain physical ids of launched EC2 Instances.

Hey, I am having the same problem. I am unable to output the resources that are being created using the Count macro.
The error states:
Unresolved resource dependencies [RDSDBInstance2] in the Outputs block of the template

I also considered it as a list of strings and tried joining the output, using the below script

RDSDBInstance2:
    Description: Aurora Database instance
    Value: !Join
        - ''
        - ','
        - !Ref RDSDBInstance2

this time the error was:
Template error: every Fn::Join object requires two parameters, (1) a string delimiter and (2) a list of strings to be joined or a function that returns a list of strings (such as Fn::GetAZs) to be joined.

If anyone has solved this problem, kindly help me.

I even tried using count in output block but got below error

Error: Template format error: Invalid outputs property : [Count].

RDSDBInstance:
    Description: Aurora Database instance
    Value: !Ref RDSDBInstance
    Count: !Ref DBInstancesCount