HashiCorp Terraform Associate (004) Question 19
Single answer1c Explain how Terraform manages multi-cloud, hybrid cloud, and service-agnostic workflowsA company is standardizing infrastructure provisioning across AWS, Azure, and an on-premises VMware environment. The platform team wants a single workflow and consistent language for defining infrastructure, while still allowing each environment to use its own provider-specific resources. They also want to avoid maintaining separate tooling for each platform. Which approach best meets these requirements with Terraform?
- A
Use Terraform configurations with multiple providers in the same workflow, defining resources for AWS, Azure, and VMware in HCL and letting each provider translate Terraform operations into the target platform's API calls.
- B
Use Terraform only for AWS resources, then use Azure Resource Manager templates for Azure and vSphere client tools for VMware, because Terraform cannot manage resources across cloud and on-premises platforms in one workflow.
- C
Convert all infrastructure definitions into a single cloud-neutral resource type in Terraform so the same resource blocks can be applied unchanged across AWS, Azure, and VMware.
- D
Use Terraform modules without providers, because modules themselves provide the multi-cloud abstraction and can create infrastructure directly on any platform.
Show answer and explanation
Correct answer: A
Explanation
Terraform manages multi-cloud, hybrid cloud, and service-agnostic workflows by using a common declarative language (HCL), a consistent CLI workflow (init, plan, apply), and a provider architecture that maps Terraform resource types to platform-specific APIs. This allows teams to manage AWS, Azure, and on-premises systems such as VMware using the same operational model, even though the actual resources remain provider-specific. Best practice is to use providers for each target platform and optionally use modules to standardize patterns across environments. HashiCorp documentation for providers, modules, and the Terraform workflow emphasizes that Terraform is cloud-agnostic in workflow, not in the sense of making all resource definitions identical across every platform.
- A. Correct.
Correct. Terraform is service-agnostic and supports multi-cloud and hybrid workflows through its provider model. A single Terraform configuration can use multiple providers, such as AWS, AzureRM, and vSphere, in one workflow. HashiCorp Configuration Language (HCL) provides the consistent syntax, while each provider is responsible for interacting with the platform-specific APIs. This is exactly how Terraform enables a unified workflow without requiring separate provisioning tools for each environment.
- B. Incorrect.
Incorrect. This reflects a common misconception that Terraform is limited to a single cloud or cannot manage on-premises environments. In reality, Terraform supports many providers, including public cloud and on-premises platforms such as VMware vSphere, enabling a single workflow across all of them.
- C. Incorrect.
Incorrect. Terraform does not convert all infrastructure into a universal cloud-neutral resource model where the same resource block works unchanged everywhere. Resources are provider-specific, such as aws_instance, azurerm_linux_virtual_machine, or vsphere_virtual_machine. Terraform provides a common workflow and language, not identical resource types across platforms.
- D. Incorrect.
Incorrect. Modules help organize and reuse Terraform code, but they do not interact with infrastructure platforms by themselves. Providers are required for Terraform to manage real resources because providers implement the API communication with the target services.