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

sceptre generate dumps output in json escaped format when using j2 yaml templates #708

Closed
lukeplausin opened this issue May 14, 2019 · 3 comments

Comments

@lukeplausin
Copy link
Contributor

lukeplausin commented May 14, 2019

I'm not sure if this is a bug or the intended behaviour. When using sceptre to generate a template the output at the terminal does not match the output of the file which gets uploaded to S3.

Command:

sceptre generate dev/mystack

Expected result:

---
# Clouformation template for some IAM roles.

Parameters:
  RoleLoginDurationSeconds:
      Type: Number

Actual result:

['---\n# Clouformation template for some IAM roles. \n\nParameters:\n RoleLoginDurationSeconds:\n Type: Number...

I am using jinja2 yaml templates on a windows machine.

@ngfgrant
Copy link
Contributor

@lukeplausin the default is to publish text format. I think we should probably change that to default to JSON.

you can get proper JSON/YAML formatting by doing:

sceptre --output json generate dev/mystack
sceptre --output yaml generate dev/mystack

@lukeplausin
Copy link
Contributor Author

lukeplausin commented May 14, 2019

sceptre --output yaml generate dev/mystack produced what I expected. It would be nice if sceptre could derive this from the format of the template automatically, can I request this as a feature?

@ngfgrant
Copy link
Contributor

yeh just putting together a patch for this now

ngfgrant added a commit that referenced this issue May 14, 2019
@ngfgrant ngfgrant added this to To do in Sceptre via automation May 30, 2019
@ngfgrant ngfgrant added this to the 2.1.4 milestone May 30, 2019
ngfgrant added a commit that referenced this issue May 30, 2019
@ngfgrant ngfgrant moved this from To do to Reviewer approved in Sceptre May 30, 2019
@ngfgrant ngfgrant moved this from Reviewer approved to Done in Sceptre May 30, 2019
@ngfgrant ngfgrant closed this as completed Jun 5, 2019
ngfgrant added a commit that referenced this issue Jun 13, 2019
ngfgrant added a commit that referenced this issue Jun 26, 2019
thawkson pushed a commit to thawkson/sceptre that referenced this issue Feb 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants