3 questions

Providers & Terraform Cloud

In Terraform, what is the role of a provider?

  • a.It is a plugin that lets Terraform interact with a specific API, such as a cloud platform or SaaS✓
  • b.It stores the remote state file
  • c.It formats configuration to canonical style
  • d.It defines reusable groups of resources

A provider is a plugin that understands a particular API (AWS, Azure, GitHub, Kubernetes, and many others) and exposes its resource and data source types to Terraform. Providers are declared and their versions constrained so runs are reproducible. State storage is a backend concern, and reusable resource groups are modules.

Providers & Terraform Cloud

Which capability is a distinguishing benefit of using Terraform Cloud or Terraform Enterprise compared with running Terraform purely from a laptop?

  • a.It removes the need to write any HCL configuration
  • b.It provides remote runs, secure remote state storage, and team access controls✓
  • c.It only supports a single cloud provider
  • d.It eliminates the concept of Terraform state entirely

Terraform Cloud adds remote execution of plans and applies, secure and shared remote state, VCS-driven workflows, policy enforcement, and team-based access controls. It still uses HCL and state, and it supports many providers. These collaboration and governance features are its main advantages over ad hoc local runs.

Providers & Terraform Cloud

Why should you pin or constrain provider versions in the required_providers block?

  • a.To ensure reproducible runs and avoid unexpected breaking changes from newer provider releases✓
  • b.Because version constraints are required to store remote state
  • c.To make plans run faster by skipping the dependency graph
  • d.Because Terraform cannot download providers without an exact version

Constraining provider versions makes runs reproducible across machines and over time, preventing a newer provider release from silently introducing breaking changes. The lock file records the selected versions. Terraform can resolve providers from constraints without an exact pin, and version constraints are unrelated to plan speed or state storage.

Report