This is an updated version of the previous [GCP terraform](https://github.com/fleetdm/fleet/tree/main/infrastructure/dogfood/terraform/gcp) with more options and updated usage of modules and Cloud Run (v1 -> v2) which means we were able to ditch the manged VPC connectors (extra cost) and go with the VPC direct access. I think now that I have cloud run jobs figured out we'll be able to add a proper migration addon or module.
19 lines
639 B
Terraform
19 lines
639 B
Terraform
resource "google_storage_hmac_key" "key" {
|
|
project = var.project_id
|
|
service_account_email = google_service_account.fleet_run_sa.email
|
|
}
|
|
|
|
resource "google_storage_bucket" "software_installers" {
|
|
project = var.project_id
|
|
name = var.fleet_config.installers_bucket_name
|
|
location = var.location
|
|
force_destroy = true
|
|
|
|
uniform_bucket_level_access = true
|
|
}
|
|
|
|
resource "google_storage_bucket_iam_member" "hmac_sa_storage_admin" {
|
|
bucket = google_storage_bucket.software_installers.name
|
|
role = "roles/storage.objectAdmin"
|
|
member = "serviceAccount:${google_service_account.fleet_run_sa.email}"
|
|
} |