nerdexam
HashiCorp

TERRAFORM-ASSOCIATE-004 · Question #259

A provider alias is used for what purpose in a Terraform configuration file?

The correct answer is D. using the same provider with different configurations for different resources. A provider alias in Terraform allows you to configure the same provider multiple times with different settings for various resources within a single configuration.

Submitted by fernanda_arg· Apr 18, 2026Understand Terraform Providers

Question

A provider alias is used for what purpose in a Terraform configuration file?

Options

  • Aalias isn't used with providers, they are used with provisioners
  • Bto signify what cloud-based region to deploy resources
  • Cto use as shorthand for resources to be deployed with the referenced provider
  • Dusing the same provider with different configurations for different resources

How the community answered

(41 responses)
  • A
    2% (1)
  • B
    2% (1)
  • C
    5% (2)
  • D
    90% (37)

Why each option

A provider alias in Terraform allows you to configure the same provider multiple times with different settings for various resources within a single configuration.

Aalias isn't used with providers, they are used with provisioners

Aliases are a fundamental feature of provider configuration in Terraform, allowing multiple instances of the same provider to coexist with different settings, not just provisioners.

Bto signify what cloud-based region to deploy resources

While an alias can distinguish providers by region, its purpose is to enable multiple configurations of the same provider, not solely to signify a region.

Cto use as shorthand for resources to be deployed with the referenced provider

Provider aliases do not act as shorthand for resources; instead, they explicitly define different configurations for the same provider, which resources then reference to specify which configuration to use.

Dusing the same provider with different configurations for different resourcesCorrect

Provider aliases allow a single provider (e.g., AWS) to be configured multiple times within the same Terraform configuration, each with a distinct set of parameters (e.g., different regions or credentials), enabling resources to be deployed with these varied settings.

Concept tested: Terraform provider aliases purpose

Source: https://developer.hashicorp.com/terraform/language/providers/configuration#alias-configurations

Topics

#Provider alias#Providers#Configuration#Multiple configurations

Community Discussion

No community discussion yet for this question.

Full TERRAFORM-ASSOCIATE-004 Practice