Skip to content

feat: support list(string) as coder_parameter #111

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

Merged
merged 3 commits into from
Mar 14, 2023

Conversation

mtojek
Copy link
Member

@mtojek mtojek commented Mar 14, 2023

Related: coder/coder#6582

This PR adds another supported type to coder_parameter, a list of strings.

@mtojek mtojek marked this pull request as ready for review March 14, 2023 13:10
data "coder_parameter" "users" {
name = "System users"
type = "list(string)"
default = jsonencode(["root", "user1", "user2"])
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really unfortunate, but we need to pick a single type of property. We need to fallback to string.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is ok just wondering if list:string could be better to parse if we parse it at all. Just a thought, the current one looks good too.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be definitely easier to parse, but it is aligned with Terraform now, so I'd rather keep like this.

Copy link
Collaborator

@BrunoQuaresma BrunoQuaresma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@mtojek mtojek merged commit 23a23a2 into coder:main Mar 14, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants