Add few terraform questions related to state file (#148)

* Adding few questions to terraform tfstate file topic
This commit is contained in:
imnitin28 2021-09-11 02:36:37 +05:30 committed by GitHub
parent 891c9c69fe
commit 397b1ec9e1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.
</b></details>
<details>
<summary>Which command is responsible for creating state file?</summary><br><b>
- terraform apply file.terraform
- Above command will create tfstate file in the working folder.
</b></details>
<details>
<summary>By default where does the state get stored?</summary><br><b>
- The state is stored by default in a local file named terraform.tfstate.
</b></details>
<details>
<summary>Can we store tfstate file at remote location? If yes, then in which condition you will do this?</summary><br><b>
- 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.
</b></details>
<details>
<summary>Mention some best practices related to tfstate</summary><br><b>