
HashiCorp Certified:Terraform Associate
Domain 7Objective 1
7a Import Existing Infrastructure into Your Terraform Workspace TERRAFORM-ASSOCIATE-004 Practice Questions (Page 4)
Part of the Maintain infrastructure with Terraform domain, which makes up ~7% of our current practice bank. HashiCorp does not publish an official question count, but from its 60-minute exam (~25–40 total, ~2–3 in this domain), expect 1–1 from this objective — we provide 22 practice questions to prepare you well beyond it. (estimate)
22questions here
5free pages
5concepts
Questions 16–20
- 16
A developer is trying to import an existing Azure Storage Account into Terraform. The storage account name is 'mystorageacct2024'. They have the resource block azurerm_storage_account.storage in their configuration. They run the import command and receive the error: 'Error: Invalid address to import: expected a resource address in the format resource_type.name'. What is the most likely cause?
Select an answer first - 17
A team is importing an existing AWS VPC into Terraform. The VPC has a CIDR block of 10.0.0.0/16 and is named 'prod-vpc'. The configuration has a resource block aws_vpc.main with cidr_block = "10.0.0.0/16" and tags = { Name = "prod-vpc" }. After running terraform import aws_vpc.main vpc-0a1b2c3d4e5f67890, they run terraform plan and see that Terraform wants to change the instance tenancy from 'default' to 'dedicated'. The actual VPC has tenancy = 'default'. What is the most likely cause?
Select an answer first - 18
When importing a resource, what should you do if you receive an error that the resource ID cannot be found?
Select an answer first - 19
A team is importing an existing Azure virtual machine into Terraform. The VM is named 'vm-prod' in the 'prod-rg' resource group. They have a resource block azurerm_virtual_machine.vm in their configuration. They run the import command and it succeeds. However, when they run terraform plan, they see that Terraform wants to change the VM's boot diagnostics settings. The actual VM has boot diagnostics enabled with a storage account 'diagstore'. The configuration does not specify boot diagnostics. What is the most likely cause?
Select an answer first - 20
A company has imported an existing AWS RDS instance into Terraform. The instance has a specific parameter group applied. The configuration for aws_db_instance.db does not specify a parameter group name. After import, terraform plan shows that Terraform wants to modify the parameter group. What should the team do to prevent this change?
Select an answer first
Finished these 5 questions?
Review the revealed explanations, or continue through the curriculum.
Free Basic Practice is a study aid with revealable answers — not a scored exam. Examers.io is independent and not affiliated with or endorsed by HashiCorp. “TERRAFORM-ASSOCIATE-004” is a trademark of its owner, used for identification only.