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

* invalid character '$' looking for beginning of value #5

Open
dansimau opened this issue Oct 3, 2018 · 0 comments
Open

* invalid character '$' looking for beginning of value #5

dansimau opened this issue Oct 3, 2018 · 0 comments

Comments

@dansimau
Copy link
Contributor

dansimau commented Oct 3, 2018

When diffing policy output that is not valid JSON, we see errors like:

* invalid character '$' looking for beginning of value

This happens, for example, when one of the lines looks like this:

assume_role_policy:                                       "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Sid\":\"\",\"Effect\":\"Allow\",\"Principal\":{\"AWS\":[\"arn:aws:iam::XXXXXX:user/foo\"]},\"Action\":\"sts:AssumeRole\"}]}" => "${var.assume_role_policy}"

In this case, there is no unified diff. The problem is that the indenting is implemented by using json.Indent which bubbles up the error if the indenting fails.

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

1 participant