TA-002-P · Question #347
A terraform apply can not___________infrastructure.
The correct answer is A. import. While terraform apply can provision, change, or destroy infrastructure, it does not have the capability to import existing infrastructure into the Terraform state.
Question
A terraform apply can not___________infrastructure.
Options
- Aimport
- Bprovision
- Cdestroy
- Dchange
How the community answered
(42 responses)- A93% (39)
- B5% (2)
- D2% (1)
Why each option
While `terraform apply` can provision, change, or destroy infrastructure, it does not have the capability to import existing infrastructure into the Terraform state.
`terraform apply` executes the actions defined in a Terraform plan, which includes creating new resources, updating existing ones, or destroying resources. Importing existing infrastructure into Terraform state is a separate operation performed using the `terraform import` command, not `terraform apply`.
`terraform apply` provisions new infrastructure resources defined in the configuration.
`terraform apply` with the -destroy flag can be used to destroy all resources managed by the configuration.
`terraform apply` is used to change or update existing infrastructure resources to match the desired state in the configuration.
Concept tested: Terraform apply command capabilities
Source: https://developer.hashicorp.com/terraform/cli/commands/apply
Topics
Community Discussion
No community discussion yet for this question.