From 397b1ec9e19c02dd904901e518558830aec82daf Mon Sep 17 00:00:00 2001 From: imnitin28 <76727343+imnitin28@users.noreply.github.com> Date: Sat, 11 Sep 2021 02:36:37 +0530 Subject: [PATCH] Add few terraform questions related to state file (#148) * Adding few questions to terraform tfstate file topic --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index a136415..95d887e 100644 --- a/README.md +++ b/README.md @@ -5431,6 +5431,25 @@ terraform state mv As such, tfstate shouldn't be stored in git repositories. secured storage such as secured buckets, is a better option. +
+Which command is responsible for creating state file?
+ + - terraform apply file.terraform + - Above command will create tfstate file in the working folder. +
+ +
+By default where does the state get stored?
+ + - The state is stored by default in a local file named terraform.tfstate. +
+ +
+Can we store tfstate file at remote location? If yes, then in which condition you will do this?
+ + - Yes, It can also be stored remotely, which works better in a team environment. Given condition that remote location is not publicly accessible since tfstate file contain sensitive information as well. Access to this remote location must be only shared with team members. +
+
Mention some best practices related to tfstate