Ponzio Pilato
Ponzio Pilato

Reputation: 325

AWS Cloudformation error: Template format error: Invalid outputs property : [Ref]

I'm trying to use this template:

https://gist.github.com/jbt/712d1abdf40db84ea5e24d8c5d0db712

found here:

https://www.gosquared.com/blog/simple-high-availability-wordpress-hosting-on-aws

But I receive the error in the object:

Template format error: Invalid outputs property : [Ref].

If I open the designer and try to validate the template in JSON format I received this error.

Template contains errors.: Template error: every Fn::GetAtt object requires two non-empty parameters, the resource name and the resource attribute

I'm quite new in yaml template so I don't know exactly which could be the problem.

Any suggestion?

Upvotes: 0

Views: 2742

Answers (2)

Pat Myron
Pat Myron

Reputation: 4638

Recommend trying the CloudFormation Linter in VSCode to see some of these errors inline:

Visual Studio Code screenshot

[cfn-lint] E6002: Output TargetGroup is missing property Value

Upvotes: 1

Marcin
Marcin

Reputation: 238199

The Outputs are incorrect.

Instead of:

Outputs:
  TargetGroup: !Ref PublicAlbTargetGroup

There should be:

Outputs:
  TargetGroup: 
    Value: !Ref PublicAlbTargetGroup

Please note that the template can have other issues which are not apparent yet.

Upvotes: 3

Related Questions