aws-cloudformation / cloudformation-template-schema

Inline syntax validation, documentation links and autocompletion for your CloudFormation templates.
Apache License 2.0
141 stars 24 forks source link

Incorrect type. Expected "array". #39

Open eist76 opened 4 years ago

eist76 commented 4 years ago

the following CFN code always creates the Warning 'Incorrect type. Expected "array".' even though it is right sythax: "Id" : { "Fn::Select" : [ "2", { "Fn::Split": ["/", { "Ref": "AWS::StackId"}]}]} ________________________________~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

is this related to the schema version (https://s3.amazonaws.com/cfn-resource-specifications-us-east-1-prod/schemas/2.15.0/all-spec.json)? is there any newer schema version out there? or any way to suppress this warning? vscode_warning

PatMyron commented 4 years ago

Which Visual Studio Code extensions do you have installed? The first two warnings look like they're coming from cfn-nag Wondering if that third warning is coming from an extension.. Maybe try un-installing and re-installing extensions to double check?

is there any newer schema version out there?

tracking this in https://github.com/aws-cloudformation/aws-cloudformation-template-schema/issues/32, I've currently been creating newer Template Schema versions for CloudFormation's Visual Studio Code extension here, but the location may change

eist76 commented 4 years ago

Pat, i have disabled all extensions and was still getting this error. Then i removed the Json schema in settings.json and the error disappeared. Added it back in as described here, then the error came back. So i doubt any other extension is causing this. I have cfn_nag and cfnlint installed. I can send a full list later.

Regards, Eike

Pat Myron notifications@github.com schrieb am Sa., 16. Mai 2020, 08:28:

Which Visual Studio Code extensions do you have installed? The first two warnings look like they're coming from cfn-nag https://marketplace.visualstudio.com/items?itemName=eastman.vscode-cfn-nag Wondering if that third warning is coming from an extension.. Maybe try un-installing and re-installing extensions to double check?

is there any newer schema version out there?

tracking this in #32 https://github.com/aws-cloudformation/aws-cloudformation-template-schema/issues/32, I've currently been creating newer Template Schema versions for CloudFormation's Visual Studio Code extension here https://raw.githubusercontent.com/aws-cloudformation/aws-cfn-lint-visual-studio-code/master/schema/all-spec.json, but the location may change

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/aws-cloudformation/aws-cloudformation-template-schema/issues/39#issuecomment-629596619, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHZSG5YDJV4SH4EPF52HDTRRYW7BANCNFSM4NAOZ5CQ .

eist76 commented 4 years ago

i tried the template schema version you provided (https://raw.githubusercontent.com/aws-cloudformation/aws-cfn-lint-visual-studio-code/master/schema/all-spec.json) and this version does not cause this error either.

PatMyron commented 4 years ago

and this version does not cause this error either.

Sorry, bit confused by this wording. Just to clarify, does the newer schema version solve the issue?

PatMyron commented 3 years ago

seeing this with GetAzs as well

Intrinsic functions seem to be handled here