TA-002-P · Question #169
A data block requests that Terraform read from a given data source and export the result under the given local name.
The correct answer is B. True. A data block instructs Terraform to read from a specified data source and export the result under a local name, making it referenceable in the configuration. This is a true statement about Terraform data source behavior.
Question
A data block requests that Terraform read from a given data source and export the result under the given local name.
Options
- AFalse
- BTrue
How the community answered
(34 responses)- A6% (2)
- B94% (32)
Why each option
A data block instructs Terraform to read from a specified data source and export the result under a local name, making it referenceable in the configuration. This is a true statement about Terraform data source behavior.
False is incorrect because the statement accurately and completely describes the purpose and mechanics of a Terraform data block.
True. The data block syntax tells Terraform to query a given data source type and store the returned attributes under the specified local name, which can then be referenced elsewhere in the configuration using the data.<TYPE>.<NAME> pattern.
Concept tested: Terraform data source block behavior and usage
Source: https://developer.hashicorp.com/terraform/language/data-sources
Topics
Community Discussion
No community discussion yet for this question.