Terraform configuration (including any module references) can contain only one Terraform provider type.
Terraform configuration (including any module references) can contain only one Terraform provider type.
A Terraform configuration can contain multiple provider types. Providers in Terraform are responsible for understanding API interactions and exposing resources for various cloud platforms and infrastructure services. You can use multiple providers in a single Terraform configuration to manage resources across different platforms or services.
provider "aws" { region = "us-west-2" access_key = "ACCESS_KEY" secret_key = "SECRET_KEY" } provider "google" { project = "my-gcp-project" credentials = "path/to/google/credentials.json" }
B. False A Terraform configuration can contain multiple provider types. Providers in Terraform are responsible for understanding API interactions and exposing resources for various cloud platforms and infrastructure services. You can use multiple providers in a single Terraform configuration to manage resources across different platforms or services.
A Terraform configuration can contain multiple provider blocks, each associated with a different provider type and version. This allows you to use multiple providers in a single Terraform configuration, such as using different cloud providers for different resources. For example, you might use the AWS provider for your EC2 instances and the Azure provider for your virtual machines. You can define each provider block with its own configuration settings, such as access keys or region, and reference the appropriate provider block in the resource blocks that use that provider.
A Terraform configuration can contain multiple provider blocks, each associated with a different provider type and version.