New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Regression] Cloudformation Support #77

Open
17twenty opened this Issue Jul 19, 2018 · 17 comments

Comments

Projects
None yet
@17twenty

17twenty commented Jul 19, 2018

Originally closed issue in #20 but it looks like Cloudformation support is no longer present.

image

This is with the following tags:

...
    "yaml.customTags": [
        "!Ref",
        "!GetAtt",
        "!FindInMap sequence",
        "!FindInMap scalar",
        "!GetAtt",
        "!GetAZs",
        "!Cidr",
        "!ImportValue",
        "!Join sequence",
        "!Select",
        "!Split",
        "!Sub sequence",
        "!Sub scalar",
        "!And",
        "!Equals",
        "!If",
        "!Not",
        "!Or"
    ]
@JPinkney

This comment has been minimized.

Member

JPinkney commented Jul 19, 2018

What are the errors?

@17twenty

This comment has been minimized.

17twenty commented Jul 19, 2018

unacceptable node kind for !<!FindInMap> tag; it should be "scalar", not "sequence"
@17twenty

This comment has been minimized.

17twenty commented Jul 19, 2018

It also triggers follow on errors like missed comma between flow collection entries but that seems to be a knock on effect of the previous

@JPinkney

This comment has been minimized.

Member

JPinkney commented Jul 21, 2018

It looks like instead of checking if the !FindInMap contains either scalar or sequence its looking like it is instead throwing an error when one one is found but not the other.

@JPinkney JPinkney added the bug label Jul 21, 2018

@17twenty

This comment has been minimized.

17twenty commented Jul 21, 2018

The sample above is from the AWS codepipeline tutorial here https://s3.amazonaws.com/cloudformation-examples/user-guide/continuous-deployment/wordpress-single-instance.zip

Hope that helps!

@dessite

This comment has been minimized.

dessite commented Oct 15, 2018

Any luck with fixing?
I have error

unknown tag <!Ref>

despite having

"yaml.customTags": [
        "!Ref",
        "!GetAtt",
        "!FindInMap sequence",
        "!FindInMap scalar",
        "!GetAtt",
        "!GetAZs",
        "!Cidr",
        "!ImportValue",
        "!Join sequence",
        "!Select",
        "!Split",
        "!Sub sequence",
        "!Sub scalar",
        "!And",
        "!Equals",
        "!If",
        "!Not",
        "!Or"
    ]
@str3tch

This comment has been minimized.

str3tch commented Oct 16, 2018

I have similar error for !Join:

unacceptable node kind for !<!Join> tag; it should be "scalar", not "sequence"

@farmerbean

This comment has been minimized.

farmerbean commented Oct 16, 2018

I had this issue too. Custom tags setup in user.settings, etc.

Removed cloudformation plugin
Removed rhel yaml plugin

Added in cloudformation plugin
(cloudformation plugin installed rhel yaml dependency)

Problem now (temporarily I assume!) resolved.

@wgroenewald

This comment has been minimized.

wgroenewald commented Oct 23, 2018

Still not working for me. This is the contents of my settings.json:
{ "workbench.startupEditor": "newUntitledFile", "git.enableSmartCommit": true, "window.zoomLevel": 0, "files.associations": {}, "yaml.customTags": [ "!Ref", "!GetAtt", "!FindInMap sequence", "!FindInMap scalar", "!GetAtt", "!GetAZs", "!Cidr", "!ImportValue", "!Join sequence", "!Select", "!Split", "!Sub sequence", "!Sub scalar", "!And", "!Equals", "!If", "!Not", "!Or"] }

Still get the error, unknown tag <!Equals>

Anyone have any luck resolving yet?
Tried reinstalling Cloudformation and YAML for RHEL plugin, no luck

@deepu105

This comment has been minimized.

deepu105 commented Oct 25, 2018

This works for me, but if you are using scalar types with those you will have issues

    "yaml.customTags": [
        "!fn",
        "!And",
        "!If",
        "!Not",
        "!Equals",
        "!Or",
        "!FindInMap sequence",
        "!Base64",
        "!Cidr",
        "!Ref",
        "!Sub",
        "!GetAtt",
        "!GetAZs",
        "!ImportValue",
        "!Select",
        "!Split",
        "!Join sequence"
    ]
@sgtoj

This comment has been minimized.

sgtoj commented Nov 15, 2018

I resolved a similar issue by renaming my template to end with yaml extension. Same file throws errors with yml extension.

@mixmatch

This comment has been minimized.

mixmatch commented Nov 21, 2018

Is there a fix in the works for this? Have to disable validation make the editor usable:
"yaml.validate": false

@JPinkney

This comment has been minimized.

Member

JPinkney commented Nov 21, 2018

Not currently. Would you like to contribute one? I can show you where to get started.

@mixmatch

This comment has been minimized.

mixmatch commented Nov 21, 2018

I'm not familiar with vscode extensions but I can take a look...

@JPinkney

This comment has been minimized.

Member

JPinkney commented Nov 21, 2018

@tanduong

This comment has been minimized.

tanduong commented Nov 30, 2018

It appears that after added "!If sequence" to the list of custom tags, I need to restart my editor and it will work.

@mandersondesign

This comment has been minimized.

mandersondesign commented Dec 18, 2018

I ended up using this one so far...

"yaml.customTags": [
        "!fn",
        "!And",
        "!If",
        "!Not",
        "!Equals",
        "!Or",
        "!FindInMap sequence",
        "!Base64",
        "!Cidr",
        "!Ref",
        "!Sub",
        "!GetAtt",
        "!GetAZs",
        "!ImportValue",
        "!Select",
        "!Split",
        "!Join sequence",
        "!Select sequence"
    ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment