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

leap, m2lines: Bucket public access update #2751

Merged
merged 3 commits into from
Jul 3, 2023

Conversation

GeorgianaElena
Copy link
Member

@GeorgianaElena GeorgianaElena commented Jul 3, 2023

This allows specifying bucket public access as hub_cloud_permissions attribute to be consistent.

Also switches from google_storage_default_object_access_control to the google_storage_bucket_access_control resource for bucket public access.

I think the difference between the two resources is why #2732 didn't do what it should. The google_storage_default_object_access_control says that it's applied to a new object within a Google Cloud Storage bucket when no ACL was provided for that object, but the bucket and objects that were meant to be made public already existed and had acl defined for them. Hopefully this fixes it.

Todo:

  • update public buckets docs

Fixes #2696

terraform plan output:

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create
  - destroy

Terraform will perform the following actions:

  # google_storage_bucket_access_control.public_rule["prod.persistent-ro"] will be created
  + resource "google_storage_bucket_access_control" "public_rule" {
      + bucket = "leap-persistent-ro"
      + domain = (known after apply)
      + email  = (known after apply)
      + entity = "allUsers"
      + id     = (known after apply)
      + role   = "READER"
    }

  # google_storage_default_object_access_control.public_rule["persistent-ro"] will be destroyed
  # (because google_storage_default_object_access_control.public_rule is not in configuration)
  - resource "google_storage_default_object_access_control" "public_rule" {
      - bucket       = "leap-persistent-ro" -> null
      - entity       = "allUsers" -> null
      - generation   = 0 -> null
      - id           = "leap-persistent-ro/allUsers" -> null
      - project_team = [] -> null
      - role         = "READER" -> null
    }

Plan: 1 to add, 0 to change, 1 to destroy.

@GeorgianaElena GeorgianaElena requested a review from a team as a code owner July 3, 2023 08:08
Copy link
Member

@sgibson91 sgibson91 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - would be good to add some docs for this as well

@GeorgianaElena GeorgianaElena merged commit 8a9a1ba into 2i2c-org:master Jul 3, 2023
@GeorgianaElena GeorgianaElena deleted the pub-acc branch July 3, 2023 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

leap: Change existing bucket permissions to make it public
2 participants