Featured resource
2026 Tech Forecast
2026 Tech Forecast

1,500+ tech insiders, business leaders, and Pluralsight Authors share their predictions on what’s shifting fastest and how to stay ahead.

Download the forecast
  • Lab
    • Libraries: If you want this lab, consider one of these libraries.
    • Core Tech
Google Cloud Platform icon
Labs

Manage Resource Lifecycles and Import Existing Infrastructure

Practise managing the lifecycle of AWS resources with Terraform. You’ll define an explicit dependency, apply lifecycle rules to control replacement and destruction, and interpret plan output before making changes. You’ll also import an existing resource, reconcile its configuration, and rename its Terraform address using a moved block. By the end, you’ll be able to verify that Terraform manages the intended resources without introducing unintended changes.

Google Cloud Platform icon
Lab platform
Lab Info
Level
Intermediate
Last updated
Oct 30, 2026
Duration
2h 0m

Contact sales

By clicking submit, you agree to our Privacy Policy and Terms of Use, and consent to receive marketing emails from Pluralsight.
Table of Contents
  1. Challenge

    Define explicit resource dependencies
    1. Identify an ordering requirement that Terraform cannot infer from existing resource references.
    2. Define the required dependency using
  2. Challenge

    Apply resource lifecycle rules
    1. Configure create_before_destroy and prevent_destroy on the designated resources.
    2. Configure ignore_changes for a specific externally managed attribute.
  3. Challenge

    Predict lifecycle behaviour from plan output
    1. Review plans for controlled changes and predict how the configured lifecycle rules affect replacement, destruction, and attribute updates.
    2. Verify the predictions through permitted operations and the expected destruction-protection error.
  4. Challenge

    Import an existing resource
    1. Define a resource block and an import block for the designated resource created outside Terraform.
    2. Review and complete the import while preserving the existing AWS resource.
  5. Challenge

    Reconcile the imported resource configuration
    1. Compare the imported resource’s settings with its Terraform configuration.
    2. Align the configuration with the intended settings and verify that the resulting plan contains no unintended changes.
  6. Challenge

    Rename a resource safely
    1. Rename the Terraform resource address and record the address change using a moved block.
    2. Apply the move and verify that the AWS resource retains its identity without replacement.
About the author

Pluralsight Skills gives leaders confidence they have the skills needed to execute technology strategy. Technology teams can benchmark expertise across roles, speed up release cycles and build reliable, secure products. By leveraging our expert content, skill assessments and one-of-a-kind analytics, keep up with the pace of change, put the right people on the right projects and boost productivity. It's the most effective path to developing tech skills at scale.

Real skill practice before real-world application

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Learn by doing

Engage hands-on with the tools and technologies you’re learning. You pick the skill, we provide the credentials and environment.

Follow your guide

All labs have detailed instructions and objectives, guiding you through the learning process and ensuring you understand every step.

Turn time into mastery

On average, you retain 75% more of your learning if you take time to practice. Hands-on labs set you up for success to make those skills stick.

Get started with Pluralsight