DevOps Classroom notes 24/Sep/2024

Terraform state management

  • Terraform always ensures desired state is equal to actual state during apply
  • Terraform execution
    • terraform gets the current state from provider
    • compares that with desired state, difference becomes plan
    • executes the plan to create resources and stores the creation details in the state file
  • Note: Never manually edit/change state files
  • If you want to force recreation of a resource
    • taint: marking a resource as taint will force replacement during next apply
  • If you want to stop managing a resource from terraform and still want the resource to exist
    • delete from state
    • delete from template

Terraform Importing Resources

  • Refer Here for official docs
  • Watch classroom recording for example
Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company
Exit mobile version
%%footer%%