nerdexam
HashiCorp

TA-002-P · Question #278

Select two answers to complete the following sentence: Before a new provider can be used, it must be ______ and _______.

The correct answer is C. declared in the configuration D. initialized. Before a new provider can be used in Terraform, it must be: (C) declared in the configuration - via a required_providers block in the terraform {} block, specifying the source and version constraints; and (D) initialized - by running terraform init, which downloads the provider…

Use the Terraform CLI (terraform plan, apply, destroy, fmt, init, validate, workspace, import, taint, providers, output)

Question

Select two answers to complete the following sentence: Before a new provider can be used, it must be ______ and _______.

Options

  • Aapproved by HashiCorp
  • Buploaded to source control
  • Cdeclared in the configuration
  • Dinitialized

How the community answered

(50 responses)
  • A
    2% (1)
  • B
    8% (4)
  • C
    90% (45)

Explanation

Before a new provider can be used in Terraform, it must be: (C) declared in the configuration - via a required_providers block in the terraform {} block, specifying the source and version constraints; and (D) initialized - by running terraform init, which downloads the provider plugin binary from the Terraform Registry into the .terraform directory. HashiCorp approval (A) is not required to use a provider - community and custom providers exist. Uploading to source control (B) is not required; the provider binary is fetched from the registry, not committed to version control.

Topics

#Terraform providers#Provider declaration#terraform init#Provider workflow

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice