Terraform-provider-google: [Feature] Set object versioning for google storage buckets

Created on 6 Sep 2017  ·  2Comments  ·  Source: hashicorp/terraform-provider-google

Terraform Version

v0.10.3

Affected Resource(s)

  • google_storage_bucket

Terraform Configuration Files

resource "google_storage_bucket" "foo" {
  name     = "foo"
  location = "${var.gcp_region}"
  storage_class = "REGIONAL"
  versioning = "true"
}

Expected Behavior

I would like to be able to enable object versioning on a bucket.

Actual Behavior

$ terraform plan
1 error(s) occurred:

* google_storage_bucket.gpdb-release-builds: : invalid or unknown key: versioning

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan

This is a feature request, and so the suggested field doesn't exist which is expect.

Important Factoids

N/A

References

To the best of our knowledge we were unable to find a relevant issue.

Most helpful comment

Slight modification, since versioning is an object:

resource "google_storage_bucket" "foo" {
  name     = "foo"
  location = "${var.gcp_region}"
  storage_class = "REGIONAL"
  versioning = {
    enabled = "true"
  }
}

All 2 comments

Slight modification, since versioning is an object:

resource "google_storage_bucket" "foo" {
  name     = "foo"
  location = "${var.gcp_region}"
  storage_class = "REGIONAL"
  versioning = {
    enabled = "true"
  }
}

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

Was this page helpful?
0 / 5 - 0 ratings