When it comes to managing a Terraform state file the worst thing you can do is edit it directly. This will lead to broken infrastructure and downtime. Instead use Terraform's built in native commands for importing, moving, removing and renaming objects inside of the state.
0:00 Intro
0:03 Scenario
3:49 Documentation Overview
6:26 Inspecting State
9:03 Tainting - Resource Recreation
11:54 Moving Resources
14:19 Disaster Recovery
15:58 Importing Resources
19:04 Scenario Wrap-up
Subscribe: https://bit.ly/3tjY9cy
Our community: https://chat.learndevops.com.au/
End to End DevOps: https://learndevops.com.au/
About Michael Crilly:
Michael Crilly is a leading expert in DevOps and automation. Mike has automated everything from Cisco hardware to AWS resources using various tools like Python, Ruby, Go, Terraform, Packer, Ansible, CloudFormation, CI/CD, JenkinsCI, GitLab, Docker, Kubernetes, GitOps, and much more. Mike also loves to teach everyone and anyone about the joy of automating complex Cloud resources to deliver a fast, better infrastructure that's cheaper to operate and more stable to manage.
Checkout my FREE courses!
What are IAC & CAC?: https://bit.ly/3BT6OG9
Terraform Crash Course: https://bit.ly/3nawGZO
Ansible Crash Course: https://bit.ly/3l4nKT0
Packer Crash Course: https://bit.ly/3kZkY1E