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 ReplyCancel reply

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

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%