TERRAFORM-ASSOCIATE-004 · Question #34
TERRAFORM-ASSOCIATE-004 Question #34: Real Exam Question with Answer & Explanation
The correct answer is D: Terraform import. 'terraform import' is the command used to bring existing, manually created infrastructure resources under Terraform management by adding them to the Terraform state file. It maps a real-world resource to a resource block in your configuration. 'terraform init' initializes the wor
Question
Which command add existing resources into Terraform state?
Options
- ATerraform init
- BTerraform plan
- CTerraform refresh
- DTerraform import
- EAll of these
Explanation
'terraform import' is the command used to bring existing, manually created infrastructure resources under Terraform management by adding them to the Terraform state file. It maps a real-world resource to a resource block in your configuration. 'terraform init' initializes the working directory. 'terraform plan' previews changes. 'terraform refresh' updates the state to match the real-world infrastructure but does not import new resources into state. Only 'terraform import' adds a previously unmanaged resource into Terraform state.
Topics
Community Discussion
No community discussion yet for this question.