terraform state pull?terraform state pull in your Terraform project directory. What is the output or result of this command?The terraform state pull command fetches the current remote state file and prints it in JSON format to your terminal. It does not modify or upload any state.
terraform state push do?terraform state push do?The terraform state push command uploads your local state file to the remote backend, overwriting the remote state file.
The S3 backend combined with a DynamoDB table provides state locking to prevent concurrent modifications, ensuring safe collaboration.
terraform state push with a local state file?terraform state push to upload a local state file to the remote backend. What is a potential security risk of this action?Manually pushing a local state file can overwrite the remote state with outdated data, causing Terraform to lose track of real infrastructure changes, which can lead to errors or resource mismanagement.
terraform state pull, you modify the JSON state file locally. What happens if you then run terraform state push with this modified file?terraform state pull, edited the JSON state file manually, and then pushed it back with terraform state push. What is the expected outcome?Terraform does not validate or merge manual changes to the state file. Pushing a modified state replaces the remote state exactly, which can cause Terraform to lose track of resources or behave unexpectedly if the changes are invalid.