deploy coder_agent with for_each loop

hi there, i'm trying to deploy coder_agent with a for_each loop, but when it's deploying i receive this error "duplicate agent name", but is not any "name" parameter at resource "coder_agent", any idea to fix this? kind regards! resource "coder_agent" "platform" { for_each = local.enabled_platform os = "linux" arch = "amd64" startup_script = try(each.value.startup_script, null) } duplicate agent name: platform
3 Replies
Codercord
Codercord2mo ago
<#1297831352799989790>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
zounce
zounce2mo ago
In this case the name is coming from the resource name, which is admittedly confusing Though that does make me think you might not be able to use a for_each with coder_agent due to the way it's implemented, unfortunately
Martí
MartíOP2mo ago
is there any possibility to change these in future coder releases?
Want results from more Discord servers?
Add your server