How does refresh work and what is the effect of `-refresh=false`?
AdvancedConceptState Internals
Answer
During plan or apply Terraform calls each provider's read to update state attributes from reality before diffing. -refresh=false skips this and trusts state, which speeds large plans but hides drift and can produce a plan that fails at apply because reality moved. We use it only for fast iterations in dev, never for the authoritative plan.
More on State Internals
What does the state file contain?BeginnerWhat is the difference between local and remote state?BeginnerHow do you configure the S3 backend?BeginnerWhat is state locking and why does it matter?IntermediateHow does S3-native locking work and how does it replace DynamoDB?AdvancedHow do you inspect resources in state?Beginner