MENU

Fun & Interesting

Using Moved Blocks in Terraform

Ned in the Cloud 6,541 lượt xem 3 years ago
Video Not Working? Fix It Now

Introduced in Terraform 1.1, the moved configuration block helps you refactor your Terraform code without breaking production. There's two primary use cases for moved blocks, refactoring published modules and refactoring large code bases. In this video, we'll focus on how you can refactor an existing deployment into modules, rename resources, and add looping without disrupting the deployed architecture.

Terraform Certification Guide: https://leanpub.com/terraform-certified/

Blog post: https://nedinthecloud.com/2021/12/14/using-the-moved-block-in-terraform-1-1/

-----------------------------------------------------------------------------------------------------

Daily Check-In: https://anchor.fm/ned-bellavance
Day Two Cloud: https://daytwocloud.io
Website: https://nedinthecloud.com
Pluralsight: https://app.pluralsight.com/profile/author/edward-bellavance
GitHub: https://github.com/ned1313

Music by Evan Williams ©2020

Timestamps:
Intro 0:00
Use Cases for Moved Blocks 1:11
Moving Resources to a Module 3:13
The state mv Command 8:03
Using Moved Blocks 10:09
Updating Resources with for_each 12:30
Caveats for the Moved Block 15:09
Outro 16:25

Comment