nerdexam
HashiCorp

TA-002-P · Question #168

A single terraform resource file that defines an aws_instance resource can simply be renamed to vsphere_virtual_machine in order to switch cloud providers.

The correct answer is B. False. This is False. While the provider-specific resource type name can be swapped (e.g., from aws_instance to vsphere_virtual_machine), the resource arguments (configuration parameters) differ significantly between providers. AWS and VMware vSphere have entirely different required…

Understand Terraform basics

Question

A single terraform resource file that defines an aws_instance resource can simply be renamed to vsphere_virtual_machine in order to switch cloud providers.

Options

  • ATrue
  • BFalse

How the community answered

(19 responses)
  • A
    11% (2)
  • B
    89% (17)

Explanation

This is False. While the provider-specific resource type name can be swapped (e.g., from aws_instance to vsphere_virtual_machine), the resource arguments (configuration parameters) differ significantly between providers. AWS and VMware vSphere have entirely different required and optional attributes - things like AMI IDs, VPC settings, and security groups are AWS-specific concepts that do not exist in vSphere. A migration between providers requires rewriting the resource block's arguments to match the new provider's schema, not just renaming the resource type.

Topics

#Terraform resources#Cloud providers#Provider configuration#HCL syntax

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice