Import existing infrastructure into Terraform. Review important considerations to keep in mind when bring infrastructure under Terraform management.
Migrate State to Terraform Cloud
Migrate a state file to Terraform Cloud for secure storage and easy collaboration.
Manage Resources in Terraform State
Create an EC2 instance and security group, and move a resource to another state file. Remove, replace, and re-import resources to manage state and reconcile drift in your infrastructure.
Apply changes to an AWS S3 bucket and bucket objects using resource targeting. Target individual resources, modules, and collections of resources to change or destroy. Explore how Terraform handles upstream and downstream dependencies.
Interpret and fix a Terraform configuration with common configuration language errors and deploy an EC2 instance with security groups in AWS. Learn best practices for logging application errors and reporting bugs.
Manage Resource Drift
Create an AWS instance and security group. Manually change the instance to create drift in your Terraform state file. Reconcile your state drift and import your resources while avoiding downtime.
Manage Resource Lifecycle
Create an AWS instance and security group. Update your configuration with lifecycle management blocks to prevent resource deletion, create resources before destroying them, and ignore changes to specific resource attributes.
Version Remote State with the Terraform Cloud API
Deploy an EC2 instance to a Terraform Cloud workspace and use the Terraform API to interact with and update state.
Use Refresh-Only Mode to Sync Terraform State
Use refresh-only plans and applies to update Terraform state to match real-world infrastructure. Understand the implicit refresh behavior in Terraform plan and apply operations.
Develop Configuration with the Console
Use the Terraform console to inspect resources and evaluate Terraform expressions before using them in configurations. Configure an S3 bucket with an IAM role to restrict access by IP address.
Use Configuration to Move Resources
Use the configuration-driven workflow to change Terraform resource IDs. Refactor configuration to move resources into modules using the `moved` block.