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

Remove REGIONAL/MULTI_REGIONAL buckets from FAST #2697

Merged
merged 2 commits into from
Nov 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
5 changes: 0 additions & 5 deletions fast/stages/1-resman/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,6 @@ locals {
# data.google_client_openid_userinfo.provider_identity[0].email, null
# )
# tag values use descriptive names
gcs_storage_class = (
length(split("-", var.locations.gcs)) < 2
? "MULTI_REGIONAL"
: "REGIONAL"
)
identity_providers = coalesce(
try(var.automation.federated_identity_providers, null), {}
)
Expand Down
15 changes: 7 additions & 8 deletions fast/stages/1-resman/stage-2-network-security.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ module "nsec-sa-ro" {
# automation bucket

module "nsec-bucket" {
source = "../../../modules/gcs"
count = var.fast_stage_2.network_security.enabled ? 1 : 0
project_id = var.automation.project_id
name = "resman-${var.fast_stage_2.network_security.short_name}-0"
prefix = var.prefix
location = var.locations.gcs
storage_class = local.gcs_storage_class
versioning = true
source = "../../../modules/gcs"
count = var.fast_stage_2.network_security.enabled ? 1 : 0
project_id = var.automation.project_id
name = "resman-${var.fast_stage_2.network_security.short_name}-0"
prefix = var.prefix
location = var.locations.gcs
versioning = true
iam = {
"roles/storage.objectAdmin" = [module.nsec-sa-rw[0].iam_email]
"roles/storage.objectViewer" = [module.nsec-sa-ro[0].iam_email]
Expand Down
15 changes: 7 additions & 8 deletions fast/stages/1-resman/stage-2-networking.tf
Original file line number Diff line number Diff line change
Expand Up @@ -225,14 +225,13 @@ module "net-sa-ro" {
# automation bucket

module "net-bucket" {
source = "../../../modules/gcs"
count = var.fast_stage_2.networking.enabled ? 1 : 0
project_id = var.automation.project_id
name = "prod-resman-${var.fast_stage_2.networking.short_name}-0"
prefix = var.prefix
location = var.locations.gcs
storage_class = local.gcs_storage_class
versioning = true
source = "../../../modules/gcs"
count = var.fast_stage_2.networking.enabled ? 1 : 0
project_id = var.automation.project_id
name = "prod-resman-${var.fast_stage_2.networking.short_name}-0"
prefix = var.prefix
location = var.locations.gcs
versioning = true
iam = {
"roles/storage.objectAdmin" = [module.net-sa-rw[0].iam_email]
"roles/storage.objectViewer" = [module.net-sa-ro[0].iam_email]
Expand Down
15 changes: 7 additions & 8 deletions fast/stages/1-resman/stage-2-project-factory.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,13 @@ module "pf-sa-ro" {
# automation bucket

module "pf-bucket" {
source = "../../../modules/gcs"
count = var.fast_stage_2.project_factory.enabled ? 1 : 0
project_id = var.automation.project_id
name = "resman-${var.fast_stage_2.project_factory.short_name}-0"
prefix = var.prefix
location = var.locations.gcs
storage_class = local.gcs_storage_class
versioning = true
source = "../../../modules/gcs"
count = var.fast_stage_2.project_factory.enabled ? 1 : 0
project_id = var.automation.project_id
name = "resman-${var.fast_stage_2.project_factory.short_name}-0"
prefix = var.prefix
location = var.locations.gcs
versioning = true
iam = {
"roles/storage.objectAdmin" = [module.pf-sa-rw[0].iam_email]
"roles/storage.objectViewer" = [module.pf-sa-ro[0].iam_email]
Expand Down
15 changes: 7 additions & 8 deletions fast/stages/1-resman/stage-2-security.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,13 @@ module "sec-sa-ro" {
# automation bucket

module "sec-bucket" {
source = "../../../modules/gcs"
count = var.fast_stage_2.security.enabled ? 1 : 0
project_id = var.automation.project_id
name = "prod-resman-${var.fast_stage_2.security.short_name}-0"
prefix = var.prefix
location = var.locations.gcs
storage_class = local.gcs_storage_class
versioning = true
source = "../../../modules/gcs"
count = var.fast_stage_2.security.enabled ? 1 : 0
project_id = var.automation.project_id
name = "prod-resman-${var.fast_stage_2.security.short_name}-0"
prefix = var.prefix
location = var.locations.gcs
versioning = true
iam = {
"roles/storage.objectAdmin" = [module.sec-sa-rw[0].iam_email]
"roles/storage.objectViewer" = [module.sec-sa-ro[0].iam_email]
Expand Down
15 changes: 7 additions & 8 deletions fast/stages/1-resman/stage-3.tf
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,13 @@ module "stage3-sa-ro" {
# automation bucket

module "stage3-bucket" {
source = "../../../modules/gcs"
for_each = local.stage3
project_id = var.automation.project_id
name = "resman-${each.value.short_name}-0"
prefix = "${var.prefix}-${each.value.environment}"
location = var.locations.gcs
storage_class = local.gcs_storage_class
versioning = true
source = "../../../modules/gcs"
for_each = local.stage3
project_id = var.automation.project_id
name = "resman-${each.value.short_name}-0"
prefix = "${var.prefix}-${each.value.environment}"
location = var.locations.gcs
versioning = true
iam = {
"roles/storage.objectAdmin" = [module.stage3-sa-rw[each.key].iam_email]
"roles/storage.objectViewer" = [module.stage3-sa-ro[each.key].iam_email]
Expand Down
Loading