Skip to content
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

Odd behaviour from render when piping to cfn-lint vs outputting to file & then linting #272

Open
marksweb opened this issue Jul 21, 2021 · 4 comments

Comments

@marksweb
Copy link

marksweb commented Jul 21, 2021

This is the same issue as raised in #238

I'm attempting to debug some unusual behaviour happening on my mac, which doesn't occur for a colleague on a linux machine.

Officially my iidy version is 1.11.0, but I've built from source at commit 892629099a4d719cf74d57809f95831a5d6ccbc9

For reference my cfn-lint is 0.44.5.

We lint our templates before working on stacks, as I'm sure most people do;

CommandsBefore:
  - "iidy render ../templates/stack.yml | cfn-lint"

Running this I get errors;

% iidy update-stack realbuzz-events.yml
== Executing CommandsBefore from argsfile ============================

-- Command 1 --------------------------------------------------
iidy render ../templates/stack.yml | cfn-lint
-- Command 1 Output -------------------------
W2001 Parameter WebALBACMCertificateArn not used.
None:69:3

E1010 Invalid GetAtt WebStaticCDN.DomainName for resource JumpHostTaskDefintion
None:547:17

E1010 Invalid GetAtt WebStaticCDN.DomainName for resource AppTask
None:715:17

E1010 Invalid GetAtt WebStaticCDN.DomainName for resource CeleryTask
None:1020:17

E3001 Resource not properly configured at WebALBSecurityGroupIngressHTTP
None:2135:3

error Error running command (exit code 6):
iidy render ../templates/stack.yml | cfn-lint 

To try to debug this I wanted to output the render to a file & linting that, however, it's successful.

% iidy render ../templates/stack.yml > /tmp/compiled-terminal.yml
% cfn-lint /tmp/compiled-terminal.yml                            
% 

On inspecting the compiled file for the error;

E3001 Resource not properly configured at WebALBSecurityGroupIngressHTTP
None:2135:3

This is the line;
000100d0: 2057 6562 414c 4253 6563 7572 6974 7947 WebALBSecurityG

@tavisrudd
Copy link
Collaborator

Hi @marksweb, our lint rules had gotten out of date with upstream. I'm working on an update to them this week. In the meantime you can pass the argument --lint-template false to bypass them.

@tavisrudd
Copy link
Collaborator

Hi @marksweb, I think I misunderstood this issue on first read. Would you mind testing it on the latest cfn-lint and iidy v1.12.0? If it's still broken can you email me a copy of your template to try debugging?
Tavis

@marksweb
Copy link
Author

marksweb commented Nov 5, 2021

@tavisrudd I've finally found some time to try this out & it's still not happy with our templates, so I can email one over.

@tavisrudd
Copy link
Collaborator

@tavisrudd I've finally found some time to try this out & it's still not happy with our templates, so I can email one over.

Yes please: tavis at unbounce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants