Editing Terraform State Files (DON'T!) | Stream Highlight - September 8th

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


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

came across an issue today, importing an fsx file system - from the terraform doco on the resource:

Certain resource arguments, like security_group_ids and the self_managed_active_directory configuation block password, do not have a FSx API method for reading the information after creation. If these arguments are set in the Terraform configuration on an imported resource, Terraform will always show a difference. To workaround this behavior, either omit the argument from the Terraform configuration or use ignore_changes to hide the difference.

thats no good- i need a security group id in the state file

zenmaster
Автор

Nice explanation but better to be more clear

spyder