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

Use strings.Trim instead of strings.Replace #158

Merged
merged 2 commits into from Nov 12, 2017

Conversation

wata727
Copy link
Member

@wata727 wata727 commented Nov 12, 2017

Fixes #157

Problem

If there is access to a map element using a key as module attributes, an evaluation error occurred.

The string obtained from the token contains unnecessary double quotes. Therefore, it deletes this, but until now it deletes even the necessary double quotes.

"\"${var.ami_info}\"" => "${var.ami_info}"
"\"${var.amis[\"test1\"]}\" => "${var.amis[test1]}" # Oops!

Solution

Remove all leading and trailing double quotes. In other words, use strings.Trim instead of strings.Replace.

@wata727 wata727 merged commit 20c62fc into master Nov 12, 2017
@wata727 wata727 deleted the fix_module_initialization_bug branch November 12, 2017 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant