terrastate icon indicating copy to clipboard operation
terrastate copied to clipboard

Feature request: Support remote state files

Open jamiet-msm opened this issue 2 years ago • 1 comments

Hi, Love the ethos of this extension however I'm currently unable to use it because we use remote state which is defined like so:

terraform {
  backend "gcs" {}
}

and we configure it like so:

terraform init -reconfigure -get=true  -backend=true -backend-config="bucket=my-bucket" -backend-config="prefix=path/to/state/dir"

Is there any way that remote state files could be supported in this extension?

jamiet-msm avatar May 24 '22 10:05 jamiet-msm

@jamiet-msm What happens if you define the bucket and prefix in the tf file?

# backend.tf
terraform {
  backend "gcs" {
    bucket  = "my-bucket"
    prefix  = "path/to/state/dir"
  }
}

matthewhembree avatar Jun 09 '22 05:06 matthewhembree