TERRAFORM-ASSOCIATE-003 · Question #60
You are using a networking module in your Terraform configuration with the name label my- network. In your main configuration you have the following code: When you run terraform validate, you get…
The correct answer is C. Define the attribute vnet_id as an output in the networking module. This is what you must do to successfully retrieve this value from your networking module, as it will expose the attribute as an output value that can be referenced by other modules or resources. The error message indicates that the networking module does not have an output…
Question
You are using a networking module in your Terraform configuration with the name label my- network. In your main configuration you have the following code:
When you run terraform validate, you get the following error:
What must you do to successfully retrieve this value from your networking module?
Exhibit
Options
- AChange the reference value to my-network,outputs,vmet_id
- BDefine the attribute vmet_id as a variable in the networking modeule
- CDefine the attribute vnet_id as an output in the networking module
- DChange the reference value module.my,network,outputs,vnet_id
How the community answered
(69 responses)- A10% (7)
- B3% (2)
- C83% (57)
- D4% (3)
Explanation
This is what you must do to successfully retrieve this value from your networking module, as it will expose the attribute as an output value that can be referenced by other modules or resources. The error message indicates that the networking module does not have an output value named vnet_id, which causes the reference to fail.
Topics
Community Discussion
No community discussion yet for this question.
