Custom resource outputs not found

Viewed 17

I've written a custom resource in Go using cloudformation-cli-go-plugin, it's failing when I try and use it in a stack with

Unable to retrieve Guid attribute for MyCo::CloudFormation::Workloads, with error message NotFound guid not found.

The stack:

AWSTemplateFormatVersion: 2010-09-09
Description: Sample MyCo Workloads Template
Resources:
  Resource1:
    Type: 'MyCo::CloudFormation::Workloads'
    Properties:
      APIKey: ""
      AccountID: ""
      Workload: >-
        workload: {entityGuids: "", name: "CloudFormationTest-Create"}
Outputs:
  CustomResourceAttribute1:
    Value: !GetAtt  Resource1.Guid

If I remove the Outputs stanza the stack runs successfully and I can see the created resource.

Running with SAM locally I've verified that Guid is in fact always returned. FWIW the resource passes all of the contract tests, Guid is the primaryIdentifier, and is a readOnlyProperties.

I've tried several tests playing with the !GetAtt definition, all of which fail with schema errors so it appears the CF is aware of the format of the resource's properties.

Suggestions and/or pointers would be appreciated.

0 Answers
Related