aws-cloudformation / cloudformation-cli-go-plugin

The CloudFormation Provider Development Toolkit Go Plugin allows you to autogenerate Go code based on an input schema.
52 stars 31 forks source link

cfn test errors when using integer property #124

Closed stlava closed 4 years ago

stlava commented 4 years ago

Here is our property:

        "AutoResolveTimeout": {
            "description": "Auto resolve timeout of this Pagerduty service.",
            "type": "integer"
        },

When running the cfn test we get: Unable to complete request: interface conversion: interface {} is float64, not string

stilvoid commented 4 years ago

I can't replicate this using a trivial example schema. Can you share some of the handler code?

ctrombley commented 4 years ago

+1 on this issue with very simple handlers that match the generated example code like so:

response := handler.ProgressEvent{
    OperationStatus: handler.Success,
    Message:         "Create complete",
    ResourceModel:   currentModel,
}

return response, nil

I also get a similar issue when using any boolean types in my schema. Use of the following schema param:

        "IgnoreOverlap": {
          "description": "description",
          "type": "boolean"
        },

leads to the following error when running cfn test:

Unable to complete request: interface conversion: interface {} is bool, not string

Edit: This is using: