You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating multiple resources within a count or for_each loop, you end up with multiple resources using the same label as seen in the terraform graph output. The ConvertState function within providers/terraform/resources.go sees references to these resources as a problem since they share the same label and fails to let you use them.
Use Case
Below is a simple example which creates 5 random passwords and attempts to make coder_metadata resources for them. While this instance uses coder_metadata, a similar result also occurs with many of the other coder_* resource types.
Yeah, this is an unfortunate limitation of the current design. We'd need ConvertState to intercept resources that use count and then append whatever index it is to the resource label. I'm not sure if/when this will get prioritised.
Problem
When creating multiple resources within a
count
orfor_each
loop, you end up with multiple resources using the same label as seen in theterraform graph
output. TheConvertState
function withinproviders/terraform/resources.go
sees references to these resources as a problem since they share the same label and fails to let you use them.Use Case
Below is a simple example which creates 5 random passwords and attempts to make
coder_metadata
resources for them. While this instance usescoder_metadata
, a similar result also occurs with many of the othercoder_*
resource types.What I Want
5
coder_metadata
resources, one for each of the generatedrandom_password
resources.What I Get
The text was updated successfully, but these errors were encountered: