Which of the following is NOT a limitation when using terraform import?
Think about what terraform import actually does versus what it cannot do.
terraform import only maps existing resources to Terraform state. It does not create or modify configuration files. It cannot import multiple resources in one command, and it requires a unique resource ID. It can import resources managed outside Terraform by mapping them.
You have a Terraform configuration with resources that depend on each other. What is the best practice when importing these resources?
Think about how Terraform manages dependencies and state.
Terraform requires importing resources in dependency order to maintain correct state and avoid errors. Importing resources with dependencies first can cause errors.
Which security risk is most relevant when importing existing cloud resources into Terraform?
Consider what information Terraform state files contain after import.
Terraform state files can contain sensitive data such as secrets or passwords. Importing resources without securing the state file can expose this data.
After importing a resource into Terraform state, what is the recommended next step to ensure proper management?
Think about how Terraform manages resources and configuration files.
Terraform import only adds the resource to state. To manage it properly, the resource must be defined in the configuration files matching the actual resource.
Consider a cloud resource whose ID changes dynamically after creation (e.g., a load balancer with a generated ID). What happens if you import this resource into Terraform and then the ID changes in the cloud provider?
Think about how Terraform tracks resources using IDs in state.
Terraform relies on resource IDs in state to track resources. If the ID changes outside Terraform, the state becomes invalid and errors occur during operations.