diff --git a/README.md b/README.md index 5a5a336..396229c 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,13 @@ Module Input Variables - `default_custom_error_response_policy` - Default custom error response policy - `services` - map cloud run service metadata - `buckets` - map of gcs bucket metadata + - `name` - GCS bucket name + - `location` - bucket location + - `service_name` - backend bucket service name + - `website` - (optional, default `false`) enable GCS static website hosting; sets `main_page_suffix = index.html` and `not_found_page = index.html` so the load balancer serves `index.html` instead of returning an XML bucket listing + - `hosts` - list of hostnames to route to this bucket + - `path_rules` - map of path rules for URL routing + - `backend` - backend configuration (CDN, IAP, logging, CORS, custom response headers) Usage ----- diff --git a/main.tf b/main.tf index 91fd5be..c5decc7 100644 --- a/main.tf +++ b/main.tf @@ -60,6 +60,7 @@ module "buckets" { name = each.value["name"] location = each.value["location"] service_name = each.value["service_name"] + website = each.value["website"] enable_cdn = each.value.backend["enable_cdn"] cdn_policy = each.value.backend["cdn_policy"] default_custom_error_response_policy = each.value.backend["default_custom_error_response_policy"] diff --git a/variables.tf b/variables.tf index 036c85b..98f8299 100644 --- a/variables.tf +++ b/variables.tf @@ -96,6 +96,7 @@ variable "buckets" { name = string location = string service_name = string + website = optional(bool, false) hosts = list(string) path_rules = map(object({ paths = list(string)