Using Moved Blocks in Terraform

preview_player
Показать описание
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.

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

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
Рекомендации по теме
Комментарии
Автор

I don't make a habit of posting comments on YouTube, but I wanted to say - keep making these! Super clear, really concise, and a great pace to follow along with. I really appreciate the effort you've put in pulling this together. Your video helped me understand this, when so many other did not. Keep it up mate.

MagicalMelv
Автор

This is most underrated youtube channel. You explain things real good, thank you

mishamovdivar
Автор

TY Ned awesome overview! Happy to see TF Tue is back to the game!!!

mosksky
Автор

This channel is Fantastic! I’ve learned so much and appreciate the time and effort put into these videos. This is possibly the best place for those new to Terraform to supplement their studies and ramp up without going through the drudgery of reading documentation. Agree with another comment that this channel is highly underrated. It’s a diamond in the rough.

spyderclin
Автор

Thorough and informative. Great work! Look forward to more videos!

andyslezak
Автор

Wowwww i never see this kind of great explanation

saiteju
Автор

Is this moved block has to be permanent in the code. Or can it be removed once the state change has taken place after an apply has been done. ?

ayush
Автор

Great content Ned, thanks!
One thing, if I wanted to then remove my moved block from my code I could right? since the resource was already moved

rodolfoalbuquerque
Автор

Hi, Thanks for the demo, I trying to moved between cloudposse module from aws s3 module, Do you have any recommendation moving state between modules.

luvmyo
Автор

Thanks a lot Ned for sharing your knowledge to all of us!
I really learnt a lot from you.

I have a request and finding it a bit difficult in provisining multiple resources example subnet or Vm based on a condition like if create = true using for_each loop

It would be nice of you if you can make a video on this

sandeepmishal