0
0
Terraformcloud~20 mins

Import limitations and considerations in Terraform - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Terraform Import Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Terraform Import Limitations

Which of the following is NOT a limitation when using terraform import?

ATerraform import does not create resource configuration in code; it only maps existing resources to state.
BImported resources must have a unique ID that Terraform can recognize.
CTerraform import cannot import resources that are managed outside of Terraform.
DTerraform import can import multiple resources at once using a single command.
Attempts:
2 left
💡 Hint

Think about what terraform import actually does versus what it cannot do.

Architecture
intermediate
2:00remaining
Importing Resources with Complex Dependencies

You have a Terraform configuration with resources that depend on each other. What is the best practice when importing these resources?

AImport resources starting from the ones with no dependencies, then import dependent resources in order.
BImport only the top-level resource; dependent resources will be imported automatically.
CDelete dependent resources before importing the main resource.
DImport all resources in any order; Terraform will automatically resolve dependencies.
Attempts:
2 left
💡 Hint

Think about how Terraform manages dependencies and state.

security
advanced
2:00remaining
Security Considerations When Importing Resources

Which security risk is most relevant when importing existing cloud resources into Terraform?

ATerraform import automatically encrypts all resource data during import.
BTerraform import deletes existing resources to secure them.
CTerraform import exposes resource secrets in the state file if not handled properly.
DTerraform import disables all resource access policies temporarily.
Attempts:
2 left
💡 Hint

Consider what information Terraform state files contain after import.

Best Practice
advanced
2:00remaining
Handling Resource Configuration After Import

After importing a resource into Terraform state, what is the recommended next step to ensure proper management?

ARun <code>terraform apply</code> immediately without any configuration changes.
BManually write the resource configuration in Terraform code to match the imported resource.
CDelete the imported resource from the cloud provider to avoid conflicts.
DIgnore the imported resource and manage it outside Terraform.
Attempts:
2 left
💡 Hint

Think about how Terraform manages resources and configuration files.

service_behavior
expert
2:00remaining
Terraform Import Behavior with Resources Having Dynamic IDs

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?

ATerraform state will become out of sync, causing errors on next plan or apply.
BTerraform automatically updates the state with the new resource ID without user action.
CTerraform deletes the resource and recreates it with the old ID.
DTerraform ignores the ID change and continues managing the resource without issues.
Attempts:
2 left
💡 Hint

Think about how Terraform tracks resources using IDs in state.