2016-06-17 10 views
3

terraformドキュメントには、テンプレートの使用方法が示されています。このレンダリングされた出力をコンソールに記録する方法はありますか?あなたはterraform output renderedターミナルで出力されたテラフォームテンプレートを出力しますか?

$ terraform apply 
template_file.example: Creating... 
    rendered: "" => "<computed>" 
    template: "" => "${hello} ${world}!" 
    vars.#:  "" => "2" 
    vars.hello: "" => "goodnight" 
    vars.world: "" => "moon" 
template_file.example: Creation complete 

Apply complete! Resources: 1 added, 0 changed, 0 destroyed. 

The state of your infrastructure has been saved to the path 
below. This state is required to modify and destroy your 
infrastructure, so keep it safe. To inspect the complete state 
use the `terraform show` command. 

State path: terraform.tfstate 

Outputs: 

    rendered = goodnight moon! 
$ terraform output rendered 
goodnight moon! 

答えて

2

は、そのコードは、おそらくモジュールの一部ですか?モジュールの一部であれば、表示されません。モジュールが呼び出される場所にモジュールの出力を配置する必要があります。

+2

'terraform refresh 'で十分です。テラフォームを適用する必要はありません。 –

関連する問題