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

Split on a single value should still return a list #2240

Closed
mahileeb opened this issue Jun 4, 2015 · 5 comments
Closed

Split on a single value should still return a list #2240

mahileeb opened this issue Jun 4, 2015 · 5 comments
Assignees

Comments

@mahileeb
Copy link

mahileeb commented Jun 4, 2015

Currently calling split on a string with no delimiter returns a unmodified string. So the following fails

${formatlist("aws_instance.%s.id", split(",", "demo-rest-elb"))}

as split does not return a single element list to formatlist

@arr-dev
Copy link

arr-dev commented Jun 9, 2015

👍

@zoltrain
Copy link

👍

You have to put a separator at the end to get around it, but then you have a empty string floating around which isn't ideal.

@phinze
Copy link
Contributor

phinze commented Jun 10, 2015

Yep, just hit this myself when working on a config. Working on a fix now.

@mitchellh
Copy link
Contributor

Going to assign this to you @phinze since I think you have this.

@ghost
Copy link

ghost commented May 2, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@ghost ghost locked and limited conversation to collaborators May 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants