I need to access the arn of a gateway that has been created and subscribed to using a Cloudformation SAM template.
When I try the following, I get an error 'Unresolved resource dependencies [GetResource] in the Outputs block.'
AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31
Resources:
TestFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: dist
Handler: index.handler
Events:
GetResource:
Type: Api
Properties:
Path: /path
Method: get
Outputs:
ReadApi:
Value: !Ref GetResource
Export:
Name: ReadApi
command failed: /bin/sh -c aws cloudformation deploy --region "ap-southeast-2" --template-file ./serverless-output.yml --capabilities CAPABILITY_IAM --stack-name "SamTest"
Failed to create the changeset: Waiter ChangeSetCreateComplete failed: Waiter encountered a terminal failure state Status: FAILED. Reason: Unresolved resource dependencies [GetResource] in the Outputs block of the template
Is it possible to access the gateway ref in this way?