Referring to resources named with variables in Terraform

后端 未结 2 812
广开言路
广开言路 2021-02-12 21:49

I\'m trying to create a module in Terraform that can be instantiated multiple times with different variable inputs. Within the module, how do I reference resources when their na

2条回答
  •  [愿得一人]
    2021-02-12 22:32

    I was fundamentally misunderstanding how modules worked.

    Terraform does not support interpolation in resource names (see the relevant issues), but that doesn't matter in my case, because the resources of each instance of a module are in the instance's namespace. I was worried about resource names colliding, but the module system already handles that.

提交回复
热议问题