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

add variable to expose index.html from tuf buckets #1119

Merged
merged 1 commit into from
May 31, 2024
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 terraform/gcp/modules/sigstore/sigstore.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ module "tuf" {
gcs_logging_enabled = var.gcs_logging_enabled
gcs_logging_bucket = var.gcs_logging_bucket
storage_class = var.tuf_storage_class
main_page_suffix = var.tuf_main_page_suffix

tuf_service_account_name = var.tuf_service_account_name

Expand Down
6 changes: 6 additions & 0 deletions terraform/gcp/modules/sigstore/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,12 @@ variable "tuf_kms_location" {
default = "global"
}

variable "tuf_main_page_suffix" {
type = string
description = "path to tuf bucket's directory index when missing object is treated as potential directories"
default = ""
}

variable "ca_pool_name" {
description = "Certificate authority pool name"
type = string
Expand Down
8 changes: 8 additions & 0 deletions terraform/gcp/modules/tuf/tuf.tf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ resource "google_storage_bucket" "tuf" {
log_bucket = var.gcs_logging_bucket
}
}

website {
main_page_suffix = var.main_page_suffix
}
}

resource "google_storage_bucket_iam_member" "public_tuf_member" {
Expand Down Expand Up @@ -123,6 +127,10 @@ resource "google_storage_bucket" "tuf_preprod" {
log_bucket = var.gcs_logging_bucket
}
}

website {
main_page_suffix = var.main_page_suffix
}
}

resource "google_storage_bucket_iam_member" "public_tuf_preprod_member" {
Expand Down
6 changes: 6 additions & 0 deletions terraform/gcp/modules/tuf/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,9 @@ variable "tuf_key_viewers" {
description = "List of members who can view the public key. See https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/google_kms_key_ring_iam#argument-reference for supported values"
default = []
}

variable "main_page_suffix" {
type = string
description = "Behaves as the bucket's directory index where missing objects are treated as potential directories"
default = ""
}