How to use terraform output as input variable of another terraform template

前端 未结 2 810
悲哀的现实
悲哀的现实 2021-02-07 10:25

Is there any way I can use a Terraform template output to another Terraform template\'s input?

Ex: I have a Terraform template which creates an ELB and I have another T

2条回答
  •  暖寄归人
    2021-02-07 10:32

    Looks like in newer versions of Terraform you'd access the output var like this

    your_elb = "${data.terraform_remote_state.your_state.your_output_resource}"
    

    All the rest is the same, just how you referenced it.

提交回复
热议问题