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

feat: add support for uniform_bucket_level_access #585

Merged
merged 2 commits into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ determining that location is as follows:
| bucket\_location | The location for a GCS bucket to create (optional) | `string` | `"US"` | no |
| bucket\_name | A name for a GCS bucket to create (in the bucket\_project project), useful for Terraform state (optional) | `string` | `""` | no |
| bucket\_project | A project to create a GCS bucket (bucket\_name) in, useful for Terraform state (optional) | `string` | `""` | no |
| bucket\_ula | Enable Uniform Bucket Level Access | `bool` | `true` | no |
| bucket\_versioning | Enable versioning for a GCS bucket to create (optional) | `bool` | `false` | no |
| budget\_alert\_pubsub\_topic | The name of the Cloud Pub/Sub topic where budget related messages will be published, in the form of `projects/{project_id}/topics/{topic_id}` | `string` | `null` | no |
| budget\_alert\_spent\_percents | A list of percentages of the budget to alert on when threshold is exceeded | `list(number)` | <pre>[<br> 0.5,<br> 0.7,<br> 1<br>]</pre> | no |
Expand Down
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ module "project-factory" {
bucket_versioning = var.bucket_versioning
bucket_labels = var.bucket_labels
bucket_force_destroy = var.bucket_force_destroy
bucket_ula = var.bucket_ula
auto_create_network = var.auto_create_network
disable_services_on_destroy = var.disable_services_on_destroy
default_service_account = var.default_service_account
Expand Down
11 changes: 6 additions & 5 deletions modules/core_project_factory/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -278,11 +278,12 @@ resource "google_project_usage_export_bucket" "usage_report_export" {
resource "google_storage_bucket" "project_bucket" {
count = local.create_bucket ? 1 : 0

name = local.project_bucket_name
project = var.bucket_project == local.base_project_id ? google_project.main.project_id : var.bucket_project
location = var.bucket_location
labels = var.bucket_labels
force_destroy = var.bucket_force_destroy
name = local.project_bucket_name
project = var.bucket_project == local.base_project_id ? google_project.main.project_id : var.bucket_project
location = var.bucket_location
labels = var.bucket_labels
force_destroy = var.bucket_force_destroy
uniform_bucket_level_access = var.bucket_ula

versioning {
enabled = var.bucket_versioning
Expand Down
6 changes: 6 additions & 0 deletions modules/core_project_factory/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ variable "bucket_force_destroy" {
default = false
}

variable "bucket_ula" {
description = "Enable Uniform Bucket Level Access"
type = bool
default = true
}

variable "auto_create_network" {
description = "Create the default network"
type = bool
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ variable "bucket_force_destroy" {
default = false
}

variable "bucket_ula" {
description = "Enable Uniform Bucket Level Access"
type = bool
default = true
}

variable "auto_create_network" {
description = "Create the default network"
type = bool
Expand Down