hashicorp / aws-cloudformation-resource-schema-sdk-go

This package provides AWS CloudFormation Resource Schema functionality in Go
Mozilla Public License 2.0
5 stars 2 forks source link

`handlers.list: Additional property handlerSchema is not allowed` errors #51

Closed ewbankkit closed 1 year ago

ewbankkit commented 1 year ago

When loading recent CloudFormation resources schemas, we have being seeing a new error:

error loading CloudFormation Resource Provider Schema for aws_networkmanager_transit_gateway_registration: validating /var/folders/lx/48ng4y950gv10_x6x1jwk05w0000gq/T/966188975/AWS_NetworkManager_TransitGatewayRegistration.json: Validation Errors: 1 error occurred:
    * handlers.list: Additional property handlerSchema is not allowed
{
  "typeName": "AWS::NetworkManager::TransitGatewayRegistration",
  "description": "The AWS::NetworkManager::TransitGatewayRegistration type registers a transit gateway in your global network. The transit gateway can be in any AWS Region, but it must be owned by the same AWS account that owns the global network. You cannot register a transit gateway in more than one global network.",
  "sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-resource-providers-networkmanager.git",
  "properties": {
    "GlobalNetworkId": {
      "description": "The ID of the global network.",
      "type": "string"
    },
    "TransitGatewayArn": {
      "description": "The Amazon Resource Name (ARN) of the transit gateway.",
      "type": "string"
    }
  },
  "taggable": false,
  "additionalProperties": false,
  "required": [
    "GlobalNetworkId",
    "TransitGatewayArn"
  ],
  "createOnlyProperties": [
    "/properties/GlobalNetworkId",
    "/properties/TransitGatewayArn"
  ],
  "primaryIdentifier": [
    "/properties/GlobalNetworkId",
    "/properties/TransitGatewayArn"
  ],
  "handlers": {
    "create": {
      "permissions": [
        "networkmanager:RegisterTransitGateway"
      ],
      "timeoutInMinutes": 30
    },
    "read": {
      "permissions": [
        "networkmanager:GetTransitGatewayRegistrations"
      ]
    },
    "list": {
      "handlerSchema": {
        "properties": {
          "GlobalNetworkId": {
            "$ref": "resource-schema.json#/properties/GlobalNetworkId"
          }
        },
        "required": ["GlobalNetworkId"]
      },
      "permissions": [
        "networkmanager:GetTransitGatewayRegistrations"
      ]
    },
    "delete": {
      "permissions": [
        "networkmanager:DeregisterTransitGateway"
      ],
      "timeoutInMinutes": 30
    }
  }
}
ewbankkit commented 1 year ago

So far, these resource schemas are affected:

ewbankkit commented 1 year ago

Relates https://github.com/aws-cloudformation/cloudformation-resource-schema/issues/145.

ewbankkit commented 1 year ago

https://github.com/aws-cloudformation/cloudformation-resource-schema/pull/147 has been merged.