Terraform Associate Exam QuestionsBrowse all questions from this exam

Terraform Associate Exam - Question 117


Which type of block fetches or computes information for use elsewhere in a Terraform configuration?

Show Answer
Correct Answer: D

Data blocks in Terraform are used to fetch or compute information for use elsewhere in a Terraform configuration. They allow access to data defined outside of Terraform or data defined by another separate Terraform configuration without making changes to the infrastructure itself. This makes data blocks the correct choice for acquiring information needed throughout the configuration.

Discussion

8 comments
Sign in to comment
BurakkoOption: D
Sep 1, 2022

Data sources allow data to be fetched or computed for use elsewhere in Terraform configuration. Use of data sources allows a Terraform configuration to build on information defined outside of Terraform, or defined by another separate Terraform configuration.

bora4motionOption: D
Sep 2, 2022

it's D as you're using infrastructure already created - that's when you use "data". With "resource" you create new infrastructure.

kprodOption: D
Sep 5, 2022

D - data

TechHeroOption: D
Jan 19, 2023

D. data Data blocks in Terraform are used to fetch or compute information for use elsewhere in a Terraform configuration. They allow you to read data from external sources such as an API, a file, or a database and use it to populate variables or other parts of your Terraform configuration. A. provider A provider block is used to configure the provider plugin used in Terraform configuration, it's not related to data fetching or computation B. resource A resource block is used to create and manage infrastructure resources, it's not related to data fetching or computation C. local A local block is used to define variables that are only used within the module in which they are defined and not exposed as outputs. It's not related to data fetching or computation. It's important to understand that data blocks do not make changes to the infrastructure, they are only used to fetch or compute data.

SilentMilliOption: D
Mar 15, 2023

The data block is used in Terraform to fetch or compute information from a given data source, and make that information available for use elsewhere in the Terraform configuration. This data can come from a variety of sources, including cloud provider APIs, databases, and other external systems.

Ravi528Option: D
Mar 28, 2023

Definitely not A, It's D as Infra is done already, Data is used to compute

mkeologyOption: D
Apr 13, 2023

D. data, a data source

Ni33Option: D
May 9, 2023

D is the correct answer !