Menu

Post image 1
Post image 2
1 / 2
0

Storing Terraform State in Google Cloud Storage

DEV Community·Abraham Naiborhu·27 days ago
#yD0wfTTK
Reading 0:00
15s threshold

Again with another journey of mine! In my previous Terraform labs, I created Google Cloud resources using Terraform with local state. By default, Terraform stores state locally in a file called: terraform.tfstate Enter fullscreen mode Exit fullscreen mode Previously, we are doing this locally, and now i want to try it in GCS (google cloud storage) to store my remote state. In this article, I will move from local Terraform state to remote state using Google Cloud Storage. Thus, my goal is to use the remote state using Google Cloud Storage. What This Lab Creates We will create: a Google Cloud Storage bucket for Terraform state a Terraform GCS backend configuration a custom VPC network a custom subnet a remote Terraform state file stored in GCS My state bucket name is: terraform-gcp-learning-lab-terraform-state Enter fullscreen mode Exit fullscreen mode The state path in the bucket is: terraform-gcp-learning-lab-terraform-state/terraform-gcp-learning-lab/03-remote-state-gcs/default.tfstate Enter fullscreen mode…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More