-
Notifications
You must be signed in to change notification settings - Fork 21
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
Option array type #26
Comments
I know Terraform variable types where recently changed to allow the type-statement to state E.g. Initially, one could/should restrict the allowed element types to primitive types, but it might be useful for the design not to exclude deep nesting possibilities, at least not for the case of tasks calling (internal) tasks. Just to make the design task more difficult;-) The following is meant as input to a design only: Things to think about:
I really like the delimiter parsing for lists/arrays of primitive types. Parsing maps by delimiter, could be solved with a delimiter as well, e.g. E.g. consider There could be cases where one want to pass JSON, or some other structured format, but I want to argue that this is out of scope. Why? I think the best case for passing in JSON, is when you are doing it as part of som tooling pipeline, and then it's probably better to just parse everything as JSON, (possibly even via STDIN): The normal CLI method (with tab completion etc.):
An alternate method intended to tooling pipelines (delimiter configurations ignored):
STDIN content:
Example use-case for something like this, would be to use a tusk file as a Terraform external data source. Not suggesting this is the actual syntax for JSON input. If JSON input (from stdin or elsewhere) is desired, it should be raised as a separate issue and discussed there. |
Thoughts on adding a new array option type. Which would then be an array of one of the existing types.
Given the following example task definition:
And an example of how I am using it:
While this works and does the job for now, it would be nice if I could supply an array of strings to the task like this:
And then an example of what the run-p task definition might look like:
The text was updated successfully, but these errors were encountered: