Skip to content
This repository was archived by the owner on Oct 17, 2024. It is now read-only.

Schema fails to validate Amazon AWS provided example.  #652

@techzilla

Description

@techzilla

Schema fails to validate amazon-eks-vpc-private-subnets.yaml, referenced in official EKS doc page creating-a-vpc, using cloudformation.schema.json.

I received these validation errors,

[{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 171,
	"startColumn": 9,
	"endLineNumber": 175,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 176,
	"startColumn": 9,
	"endLineNumber": 177,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 178,
	"startColumn": 9,
	"endLineNumber": 179,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 183,
	"startColumn": 16,
	"endLineNumber": 183,
	"endColumn": 17
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 192,
	"startColumn": 9,
	"endLineNumber": 196,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 197,
	"startColumn": 9,
	"endLineNumber": 198,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 199,
	"startColumn": 9,
	"endLineNumber": 200,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 204,
	"startColumn": 16,
	"endLineNumber": 204,
	"endColumn": 17
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 212,
	"startColumn": 9,
	"endLineNumber": 216,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 217,
	"startColumn": 9,
	"endLineNumber": 218,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 219,
	"startColumn": 9,
	"endLineNumber": 220,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 224,
	"startColumn": 16,
	"endLineNumber": 224,
	"endColumn": 17
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 232,
	"startColumn": 9,
	"endLineNumber": 236,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 237,
	"startColumn": 9,
	"endLineNumber": 238,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 239,
	"startColumn": 9,
	"endLineNumber": 240,
	"endColumn": 1
},{
	"resource": "/home/username/projects/ansible_aws_eks/playbooks/files/cloudformation/vpc_public_private_subnets-template.yaml",
	"owner": "_generated_diagnostic_collection_name_#1",
	"severity": 8,
	"message": "Incorrect type. Expected \"string\".",
	"source": "yaml-schema: AWS CloudFormation",
	"startLineNumber": 244,
	"startColumn": 16,
	"endLineNumber": 244,
	"endColumn": 17
}]

One section that causes these errors looks like the following:

 PrivateSubnet02:
    Type: AWS::EC2::Subnet
    Metadata:
      Comment: Private Subnet 02
    Properties:
      AvailabilityZone:
        Fn::Select:
        - '1'
        - Fn::GetAZs:
            Ref: AWS::Region
      CidrBlock:
        Ref: PrivateSubnet02Block
      VpcId:
        Ref: VPC
      Tags:
      - Key: Name
        Value: !Sub "${AWS::StackName}-PrivateSubnet02"
      - Key: kubernetes.io/role/internal-elb
        Value: 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions