ExamGecko
Question list
Search
Search

Question 42 - Terraform Associate 003 discussion

Report
Export

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?

A.
Change the reference value to my-network,outputs,vmet_id
Answers
A.
Change the reference value to my-network,outputs,vmet_id
B.
Define the attribute vmet_id as a variable in the networking modeule
Answers
B.
Define the attribute vmet_id as a variable in the networking modeule
C.
Define the attribute vnet_id as an output in the networking module
Answers
C.
Define the attribute vnet_id as an output in the networking module
D.
Change the reference value module.my,network,outputs,vnet_id
Answers
D.
Change the reference value module.my,network,outputs,vnet_id
Suggested answer: C

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 namedvnet_id, which causes the reference to fail.

asked 18/09/2024
EVA LITA
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first