TA-002-P · Question #249
A single terraform resource file that defines an aws_instance resource can simple be renamed to azurerm_virtual_machine in order to switch cloud providers
The correct answer is B. False. Simply renaming the resource type is not sufficient to switch cloud providers. Each provider has its own unique resource schema with different required and optional arguments. For example, 'aws_instance' uses 'ami' and 'instance_type', while 'azurerm_virtual_machine' requires com
Question
A single terraform resource file that defines an aws_instance resource can simple be renamed to azurerm_virtual_machine in order to switch cloud providers
Options
- ATrue
- BFalse
How the community answered
(55 responses)- A7% (4)
- B93% (51)
Explanation
Simply renaming the resource type is not sufficient to switch cloud providers. Each provider has its own unique resource schema with different required and optional arguments. For example, 'aws_instance' uses 'ami' and 'instance_type', while 'azurerm_virtual_machine' requires completely different arguments like 'resource_group_name', 'vm_size', 'storage_image_reference', etc. Switching providers requires rewriting the resource block, updating provider configuration, and potentially managing state migration.
Topics
Community Discussion
No community discussion yet for this question.