From c82f142d2d7bef08510a9dd14e255b338e9b0dc3 Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Tue, 14 Mar 2023 14:51:17 +0100 Subject: [PATCH 1/4] Delay creation of SVPC host bindings until APIs and JIT SAs are done --- modules/project/shared-vpc.tf | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/modules/project/shared-vpc.tf b/modules/project/shared-vpc.tf index 3894e5d7..ee2d6b41 100644 --- a/modules/project/shared-vpc.tf +++ b/modules/project/shared-vpc.tf @@ -1,5 +1,5 @@ /** - * Copyright 2022 Google LLC + * Copyright 2023 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -73,4 +73,12 @@ resource "google_project_iam_member" "shared_vpc_host_robots" { ? "serviceAccount:${local.service_account_cloud_services}" : "serviceAccount:${local.service_accounts_robots[each.value.service]}" ) + depends_on = [ + google_project_service.project_services, + google_project_service_identity.servicenetworking, + google_project_service_identity.jit_si, + google_project_default_service_accounts.default_service_accounts, + data.google_bigquery_default_service_account.bq_sa, + data.google_storage_project_service_account.gcs_sa, + ] } From 8bf3e11f344a60286a5cc81af2b3ee69f4ae6b4b Mon Sep 17 00:00:00 2001 From: Natalia Strelkova Date: Tue, 14 Mar 2023 15:43:55 +0100 Subject: [PATCH 2/4] location and storage class added to GKE GCS buckets --- fast/stages/1-resman/branch-gke.tf | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/fast/stages/1-resman/branch-gke.tf b/fast/stages/1-resman/branch-gke.tf index 76777d8f..62f6a8b5 100644 --- a/fast/stages/1-resman/branch-gke.tf +++ b/fast/stages/1-resman/branch-gke.tf @@ -117,11 +117,13 @@ module "branch-gke-prod-sa" { } module "branch-gke-dev-gcs" { - source = "../../../modules/gcs" - count = var.fast_features.gke ? 1 : 0 - project_id = var.automation.project_id - name = "dev-resman-gke-0" - prefix = var.prefix + source = "../../../modules/gcs" + count = var.fast_features.gke ? 1 : 0 + project_id = var.automation.project_id + name = "dev-resman-gke-0" + prefix = var.prefix + location = var.locations.gcs + storage_class = local.gcs_storage_class versioning = true iam = { "roles/storage.objectAdmin" = [module.branch-gke-dev-sa.0.iam_email] @@ -129,11 +131,13 @@ module "branch-gke-dev-gcs" { } module "branch-gke-prod-gcs" { - source = "../../../modules/gcs" - count = var.fast_features.gke ? 1 : 0 - project_id = var.automation.project_id - name = "prod-resman-gke-0" - prefix = var.prefix + source = "../../../modules/gcs" + count = var.fast_features.gke ? 1 : 0 + project_id = var.automation.project_id + name = "prod-resman-gke-0" + prefix = var.prefix + location = var.locations.gcs + storage_class = local.gcs_storage_class versioning = true iam = { "roles/storage.objectAdmin" = [module.branch-gke-prod-sa.0.iam_email] From fe7725e7d06628c3eec61dc0db3bd119fadf51d1 Mon Sep 17 00:00:00 2001 From: Natalia Strelkova Date: Tue, 14 Mar 2023 14:48:04 +0000 Subject: [PATCH 3/4] formatting --- fast/stages/1-resman/branch-gke.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fast/stages/1-resman/branch-gke.tf b/fast/stages/1-resman/branch-gke.tf index 62f6a8b5..fe25a7be 100644 --- a/fast/stages/1-resman/branch-gke.tf +++ b/fast/stages/1-resman/branch-gke.tf @@ -124,7 +124,7 @@ module "branch-gke-dev-gcs" { prefix = var.prefix location = var.locations.gcs storage_class = local.gcs_storage_class - versioning = true + versioning = true iam = { "roles/storage.objectAdmin" = [module.branch-gke-dev-sa.0.iam_email] } @@ -138,7 +138,7 @@ module "branch-gke-prod-gcs" { prefix = var.prefix location = var.locations.gcs storage_class = local.gcs_storage_class - versioning = true + versioning = true iam = { "roles/storage.objectAdmin" = [module.branch-gke-prod-sa.0.iam_email] } From b3139004b0ca84233d1daa01d70f899b9fe826f3 Mon Sep 17 00:00:00 2001 From: Julio Diez Date: Tue, 14 Mar 2023 16:14:19 +0100 Subject: [PATCH 4/4] Add link to public serverless networking guide --- blueprints/serverless/README.md | 2 +- blueprints/serverless/cloud-run-corporate/README.md | 2 +- blueprints/serverless/cloud-run-explore/README.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/blueprints/serverless/README.md b/blueprints/serverless/README.md index 03d2a8ae..7db56079 100644 --- a/blueprints/serverless/README.md +++ b/blueprints/serverless/README.md @@ -13,5 +13,5 @@ They are meant to be used as minimal but complete starting points to create actu ### Cloud Run series - These are a series of blueprints developing the chapters of the __Serverless Networking Guide__ (to be released soon), focused in Cloud Run. + These are a series of [blueprints](./cloud-run-explore/) developing the chapters of the [__Serverless Networking Guide__](https://services.google.com/fh/files/misc/serverless_networking_guide.pdf), focused in Cloud Run.
diff --git a/blueprints/serverless/cloud-run-corporate/README.md b/blueprints/serverless/cloud-run-corporate/README.md index fc766b02..e3baaf16 100644 --- a/blueprints/serverless/cloud-run-corporate/README.md +++ b/blueprints/serverless/cloud-run-corporate/README.md @@ -4,7 +4,7 @@ This blueprint contains all the necessary Terraform modules to build and __privately__ expose a Cloud Run service in a variety of use cases. -The content of this blueprint corresponds to the chapter '_Developing an enterprise application - The corporate environment_' of the __Serverless Networking Guide__ (to be released soon). This guide is an easy to follow introduction to Cloud Run, where a couple of friendly characters will guide you from the basics to more advanced topics with a very practical approach and in record time! The code here complements this learning and allows you to test the scenarios presented and your knowledge. +The content of this blueprint corresponds to the chapter '_Developing an enterprise application - The corporate environment_' of the [__Serverless Networking Guide__](https://services.google.com/fh/files/misc/serverless_networking_guide.pdf). This guide is an easy to follow introduction to Cloud Run, where a couple of friendly characters will guide you from the basics to more advanced topics with a very practical approach and in record time! The code here complements this learning and allows you to test the scenarios presented and your knowledge. If you are interested in following this guide, take a look to the chapters' blueprints: * [My serverless "Hello, World! - Exploring Cloud Run](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/tree/master/blueprints/serverless/cloud-run-explore) diff --git a/blueprints/serverless/cloud-run-explore/README.md b/blueprints/serverless/cloud-run-explore/README.md index b88d4f9c..23567c64 100644 --- a/blueprints/serverless/cloud-run-explore/README.md +++ b/blueprints/serverless/cloud-run-explore/README.md @@ -4,7 +4,7 @@ This blueprint contains all the necessary Terraform modules to build and __publicly__ expose Cloud Run services in a variety of use cases. -The content of this blueprint corresponds to the chapter '_My serverless "Hello, World! - Exploring Cloud Run_' of the __Serverless Networking Guide__ (to be released soon). This guide is an easy to follow introduction to Cloud Run, where a couple of friendly characters will guide you from the basics to more advanced topics with a very practical approach and in record time! The code here complements this learning and allows you to test the scenarios presented and your knowledge. +The content of this blueprint corresponds to the chapter '_My serverless "Hello, World! - Exploring Cloud Run_' of the [__Serverless Networking Guide__](https://services.google.com/fh/files/misc/serverless_networking_guide.pdf). This guide is an easy to follow introduction to Cloud Run, where a couple of friendly characters will guide you from the basics to more advanced topics with a very practical approach and in record time! The code here complements this learning and allows you to test the scenarios presented and your knowledge. If you are interested in following this guide, take a look to the chapters' blueprints: * [My serverless "Hello, World! - Exploring Cloud Run](https://github.com/GoogleCloudPlatform/cloud-foundation-fabric/tree/master/blueprints/serverless/cloud-run-explore)