---
tags:
- devops
- l1
- flashcard-deck
- terraform-providers
---
<!-- wiki:breadcrumb:start -->
[Portal](../../../../library/portal/index.md) | **Level:** [L1: Foundations](../../../../library/portal/levels.md) | **Topics:** [Terraform Deep Dive](../../../../library/portal/topics.md) | **Domain:** DevOps & Tooling
<!-- wiki:breadcrumb:end -->

id	category	difficulty	tags	question	answer	source_path
terraform-providers/12ad81a810c4	terraform-providers	hard	terraform, custom-provider, configuration	What are "Terraform Providers" and how do they extend Terraform's capabilities?	Terraform Providers are plugins that extend Terraform's capabilities by enabling it to interact with different infrastructure platforms and services. Providers abstract the underlying API interactions, providing a consistent interface for managing resources. Each provider focuses on a specific platform (e.g., AWS, Azure, VMware). Providers define resource types, data sources, and provider-specific functionalities. By using different providers, Terraform supports multi-cloud and hybrid cloud scenarios, giving users flexibility in choosing and managing their infrastructure.	projects/knowledge/interview/terraform/232-what-are-terraform-providers-and-how-do-they-exten.txt
terraform-providers/23dd523993e2	terraform-providers	medium	terraform, configuration	Explain the significance of the Terraform provider "alias."	The Terraform provider alias allows you to use multiple configurations for the same provider within a single Terraform configuration. This is useful in scenarios where you want to manage resources in the same provider but with different configurations. For example, you might use provider aliases to create multiple AWS S3 buckets with different configurations in the same configuration file. Provider aliases are declared using the provider block with an alias attribute.	projects/knowledge/interview/terraform/207-explain-the-significance-of-the-terraform-provider.txt
terraform-providers/2d0dca8c6010	terraform-providers	medium	terraform, configuration	Where can you find publicly available providers?	In the [Terraform Registry](https://registry.terraform.io/browse/providers)\n\nRemember: "Pin provider versions to avoid surprises." version = "~> 5.0" means >= 5.0 and < 6.0.	projects/knowledge/interview/terraform/022-where-can-you-find-publicly-available-providers.txt
terraform-providers/36483848e808	terraform-providers	easy	terraform, providers, configuration	What is a Terraform provider block and why do you need it?	The provider block in Terraform config specifies which provider (and version settings) to use, and usually contains authentication or region settings. For example, provider "aws" { region = "us-west-2" } configures the AWS provider for a region. It's needed so Terraform knows how to connect to the respective service's API.	projects/knowledge/interview/terraform/282-provider-block.txt
terraform-providers/3b04ceba892b	terraform-providers	easy	terraform, configuration	Explain what is a "provider"	[terraform.io](https://www.terraform.io/docs/language/providers/index.html): "Terraform relies on plugins called "providers" to interact with cloud providers, SaaS providers, and other APIs...Each provider adds a set of resource types and/or data sources that Terraform can manage. Every resource type is implemented by a provider; without providers, Terraform can't manage any kind of infrastructure."	projects/knowledge/interview/terraform/021-explain-what-is-a-provider.txt
terraform-providers/3eed2594a8c1	terraform-providers	medium	terraform, configuration	Where Terraform installs providers from by default?	By default Terraform providers are installed from Terraform Registry\n\nRemember: "Provider aliases = multiple configs for same provider." Use for multi-region or multi-account.	projects/knowledge/interview/terraform/027-where-terraform-installs-providers-from-by-default.txt
terraform-providers/5535c097d44c	terraform-providers	medium	terraform, configuration, authentication	What can you do to NOT store provider credentials in Terraform configuration files in plain text?	1. Use environment variables\n2. Use password CLIs (like 1Password which is generic but there also specific provider options like aws-vault)\n\nRemember: "Providers are Go binaries using gRPC." They translate HCL to API calls. The registry hosts thousands of providers.	projects/knowledge/interview/terraform/161-what-can-you-do-to-not-store-provider-credentials-.txt
terraform-providers/7accf0f5d7ed	terraform-providers	easy	terraform, configuration	What are the names of the providers in this case?	The provider names are `azurerm` (for Azure Resource Manager) and `aws` (for Amazon Web Services). Providers are declared in the `required_providers` block inside `terraform {}`. Each provider has its own version constraints and configuration. Pin versions to avoid breaking changes: `version = "~> 5.0"` allows minor updates but not major.	projects/knowledge/interview/terraform/023-what-are-the-names-of-the-providers-in-this-case-t.txt
terraform-providers/818a85a27aa6	terraform-providers	medium	terraform, configuration	Where providers are downloaded to? (when for example you run terraform init)	Providers are downloaded to the `.terraform/providers/` directory when you run `terraform init`. This directory is gitignored because providers are large binaries (often 100+ MB). `terraform init` recreates it from the lock file (`terraform.lock.hcl`). Commit `terraform.lock.hcl` to ensure all team members use identical provider versions and checksums.	projects/knowledge/interview/terraform/029-where-providers-are-downloaded-to-when-for-example.txt
terraform-providers/8e376a7f994f	terraform-providers	hard	terraform, configuration	How can you use Terraform to manage resources across multiple cloud providers (multi-cloud)?	Terraform supports multi-cloud deployments by using provider-specific configurations. Key steps include:\n* Provider Blocks: Define provider blocks for each cloud provider in the configuration.\n* Resource Configuration: Create resources using provider-specific configurations.\n* Variables and Conditional Logic: Use variables and conditional logic to customize configurations based on the target cloud.\n* Terraform Workspaces: Utilize workspaces for environment-specific configurations.	projects/knowledge/interview/terraform/250-how-can-you-use-terraform-to-manage-resources-acro.txt
terraform-providers/a230df977c38	terraform-providers	medium	terraform, configuration	Discuss the role of Terraform providers in supporting different cloud services.	Terraform providers are plugins that enable Terraform to interact with various infrastructure platforms and services. Providers abstract the underlying API interactions, allowing users to declare resources in a consistent manner regardless of the underlying cloud or service. For example, the AWS provider supports Amazon Web Services, while the Azure provider supports Microsoft Azure. By supporting multiple providers, Terraform facilitates multi-cloud and hybrid cloud infrastructure management, giving users flexibility and choice in their cloud environments.	projects/knowledge/interview/terraform/220-discuss-the-role-of-terraform-providers-in-support.txt
terraform-providers/af42fcddaa0b	terraform-providers	easy	terraform, configuration	What is a Terraform provider?	In Terraform, a provider is a plugin that enables communication between Terraform and a specific infrastructure platform or service. Providers define the resources and their behavior for a particular platform, such as AWS, Azure, or vSphere. Each provider has its set of resources that can be managed using Terraform configurations. Users can configure multiple providers in a single Terraform configuration to manage resources across different platforms.	projects/knowledge/interview/terraform/195-what-is-a-terraform-provider.txt
terraform-providers/b45d0538bc6a	terraform-providers	hard	terraform, configuration, authentication	What's the issue with the following provider configuration?	It's not secure! you should never store credentials in plain text this way.\n\nRemember: "Provider authentication: use environment variables, not hardcoded credentials." Never put credentials in .tf files.	projects/knowledge/interview/terraform/160-whats-the-issue-with-the-following-provider-config.txt
terraform-providers/cb2f5156e102	terraform-providers	medium	terraform, authentication, custom-provider, configuration	What are "Terraform Providers" and how do they integrate with the Terraform core?	Terraform Providers are plugins that extend the functionality of Terraform by enabling it to interact with different infrastructure platforms. They integrate with the Terraform core by:\n* Resource Handling: Providers define and manage resources specific to a target platform.\n* Data Sources: Providers offer data sources for importing external information into Terraform.\n* Authentication: They handle authentication and API communication with the platform.\n* State Management: Providers interact with the Terraform state to track resource state.	projects/knowledge/interview/terraform/261-what-are-terraform-providers-and-how-do-they-integ.txt
terraform-providers/cb7d0cf690db	terraform-providers	hard	terraform, configuration	How to manage multiple regions in AWS provider configuration?	```\nprovider "aws" {\n  region = "us-west-1"\n  alias = "west_region"\n}\n\nprovider "aws" {\n  region = "us-east-1"\n  alias = "east_region"\n}\n\ndata "aws_region" "west_region" {\n  provider = aws.west_region\n}\n\ndata "aws_region" "east_region" {\n  provider = aws.east_region\n}\n```\n\nTo use it:\n\n```\nresource "aws_instance" "west_region_instance" {\n  provider = aws.west_region\n  instance_type = "t2.micro"\n  ...\n}\n```	projects/knowledge/interview/terraform/156-how-to-manage-multiple-regions-in-aws-provider-con.txt
terraform-providers/d36a811feed2	terraform-providers	medium	terraform, configuration	How to install a provider?	You write a provider block like the following one and run `terraform init`\n\n```\nprovider "aws" {\n  region = "us-west-1"\n}\n```\n\nRemember: "Required providers go in the terraform {} block." This is where you pin source and version.	projects/knowledge/interview/terraform/024-how-to-install-a-provider.txt
terraform-providers/dc58f8dedc82	terraform-providers	medium	terraform, configuration, versioning, required-providers	Write a configuration of a Terraform provider (any type you would like)	AWS is one of the most popular providers in Terraform. Here is an example of how to configure it to use one specific region and specifying a specific version of the provider\n\n```\nterraform {\n  required_providers {\n    aws = {\n      source  = "hashicorp/aws"\n      version = "~> 3.0"\n    }\n  }\n}\n\n# Configure the AWS Provider\nprovider "aws" {\n  region = "us-west-2"\n}\n```\n\nRemember: "Community providers live outside the hashicorp namespace." Source format: namespace/name.	projects/knowledge/interview/terraform/026-write-a-configuration-of-a-terraform-provider-any-.txt
terraform-providers/f8ffd2c52781	terraform-providers	easy	terraform, configuration	True or False? You can install providers only from hashicorp	False. You can specify any provider from any URL, not only those from hashicorp.\n\nRemember: "Provider configuration is inherited by all resources of that type." Override per-resource with the provider meta-argument.	projects/knowledge/interview/terraform/031-true-or-false-you-can-install-providers-only-from-.txt

<!-- wiki:related:start -->
---

## Wiki Navigation

### Related Content

- [Runbook: Terraform Drift Detection Response](../../../../library/runbooks/cloud-terraform/drift-detection.md) (Runbook, L2) — Terraform Deep Dive
- [Terraform Deep Dive](../../../../library/topics/terraform-deep-dive/index.md) (Topic Pack, L2) — Terraform Deep Dive
- Terraform Modules Flashcards *(CLI)* (flashcard_deck, L1) — Terraform Deep Dive
- Terraform State Flashcards *(CLI)* (flashcard_deck, L1) — Terraform Deep Dive
- Terraform Workflow Flashcards *(CLI)* (flashcard_deck, L1) — Terraform Deep Dive

<!-- wiki:related:end -->
