-
Notifications
You must be signed in to change notification settings - Fork 888
only one app in "coder_app" resource block using "for_each" is considered #6234
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
Comments
Ahh, will fix! |
A fix is on the way in the attached PR. Thanks for looking through the code too, you were indeed correct where the problem was! |
Thanks in advance for fixing this! Yeah this took some time until we understood what is wrong here. |
It was a silly assumption on our part that was just straight-up wrong, so I'm happy y'all found it! Would you like me to do a patch with this in it today? Happy to do so if it'd help y'all out. |
no thanks. we can wait until next release. You release so often we can wait for sure |
Reopening the issue as we spotted a blocker. Reverting now: #6248 |
Fixed again in #6255 |
We want to create coder apps dynamically through the following terraform resource block:
If
local.apps_map
contains more than one entry, only one of them is considered by coder and appears as button in the UI.As an example, we used the following
coder.yaml
to populatelocal.apps_map
:Relevant excerpt of the workspace creation logs:
After creating a workspace we proved the mentioned misbehaving by running
Only the apps within the above response body are considered in the UI and health check loop, so the bug must appear earlier.
We eventually nailed it down to these two lines. Here, the label for a
coder_app
resource block constructed throughfor_each
is the same for all contained applications, which is not suitable to be used as a key in a map, since each app entry is overwritten by its successor.The text was updated successfully, but these errors were encountered: