Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cors and website parameter ignored #131

Closed
odise opened this issue Sep 13, 2021 · 0 comments · Fixed by #132
Closed

cors and website parameter ignored #131

odise opened this issue Sep 13, 2021 · 0 comments · Fixed by #132

Comments

@odise
Copy link
Contributor

odise commented Sep 13, 2021

I tried to run version 2.1.0 with the following example code and found core and website parameters being ignored:

module "bucket" {
  source  = "terraform-google-modules/cloud-storage/google"
  version = "2.1.0"

  project_id    = "my-project-id"
  location      = "europe-west3"
  names         = ["xxx-xxx"]
  prefix        = ""
  storage_class = "STANDARD"
  cors = {
    x = {
      max_age_seconds = 3600
      method = [
        "POST",
        "OPTIONS",
      ]
      origin = [
        "*",
      ]
      response_header = [
        "Content-Type",
      ]
    }
    y = {
      max_age_seconds = 360
      method = [
        "POST",
      ]
      origin = [
        "*",
      ]
      response_header = [
        "Content-Type",
      ]
    }
  }
  website = {
    not_found_page = "404.html"
  }
}

This is resulting in:

Terraform will perform the following actions:

  # module.bucket.google_storage_bucket.buckets["xxx-xxx"] will be created
  + resource "google_storage_bucket" "buckets" {
      + bucket_policy_only          = (known after apply)
      + force_destroy               = false
      + id                          = (known after apply)
      + labels                      = {
          + "name" = "xxx-xxx"
        }
      + location                    = "EUROPE-WEST3"
      + name                        = "xxx-xxx"
      + project                     = "my-project-id"
      + self_link                   = (known after apply)
      + storage_class               = "STANDARD"
      + uniform_bucket_level_access = true
      + url                         = (known after apply)

      + versioning {
          + enabled = false
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant