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

fix(multi-runner): Fix runner_additional_security_group_ids #3352

Merged
merged 1 commit into from
Jul 11, 2023
Merged

fix(multi-runner): Fix runner_additional_security_group_ids #3352

merged 1 commit into from
Jul 11, 2023

Conversation

dominicbr
Copy link
Contributor

If runner_additional_security_group_ids is only set outside the multi_runner_config coalesce(each.value.runner_config.runner_additional_security_group_ids, var.runner_additional_security_group_ids) is coalescing an empty list (the default value for each.value.runner_config.runner_additional_security_group_ids) with whatever is set outside the multi_runner_config, this always results in the returned value being an empty list:

> coalesce([], ["sg-123456"])
tolist([])

Using coalescelist instead returns the first non-empty list:

> coalescelist([], ["sg-123456"])
[
  "sg-123456",
]

And the try returns an empty list if both coalesced lists are empty (rather than throwing an error):

> try(coalescelist([], []), [])
[]

If `runner_additional_security_group_ids` is only set outside the multi_runner_config `coalesce(each.value.runner_config.runner_additional_security_group_ids, var.runner_additional_security_group_ids)` is coalescing an empty list (the default value for `each.value.runner_config.runner_additional_security_group_ids`) with whatever is set outside the multi_runner_config, this always results in the returned value being an empty list:

```
> coalesce([], ["sg-123456"])
tolist([])

```

Using coalescelist instead returns the first non-empty list:

```
> coalescelist([], ["sg-123456"])
[
  "sg-123456",
]
```

And the `try` returns an empty list if both coalesced lists are empty (rather than throwing an error):

```
> try(coalescelist([], []), [])
[]
```
@GuptaNavdeep1983 GuptaNavdeep1983 merged commit 1f0c938 into philips-labs:main Jul 11, 2023
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

Successfully merging this pull request may close these issues.

2 participants