Refresh CMD Flashcards
What is the purpose of the refresh functionality in TerraForm?
The refresh functionality allows TerraForm to know about manual modifications made to the infrastructure, enabling it to revert to the original desired state.
When does TerraForm automatically refresh the state?
TerraForm automatically refreshes the state when running the TerraForm Plan or TerraForm Apply commands.
What happens when you run TerraForm Plan?
The first step is to refresh the infrastructure state and match it to the desired configuration.
What can happen if you manually run the TerraForm refresh command?
Manually running the TerraForm refresh command can lead to a dangerous situation where the entire TF state file may be removed.
What should you do if the TerraForm state file is empty after a manual refresh?
You can revert to the earlier version using the TF State backup that is available.
Is the TerraForm Refresh command still recommended in newer versions?
The TerraForm Refresh command is deprecated in newer versions, and it’s recommended to use the refresh option with TerraForm Plan and Apply.
What is a best practice regarding remote backends like S3?
Enabling versioning in remote backends like S3 allows you to revert to earlier versions of the state file if it gets messed up.
What should you do with resources created for practicals?
Make sure to destroy all the resources that you create for your practicals.