-
Notifications
You must be signed in to change notification settings - Fork 910
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1175 from juliodiez/serverless-program
Serverless networking program
- Loading branch information
Showing
14 changed files
with
1,090 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+305 KB
blueprints/serverless/cloud-run-corporate/images/service-running-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+180 KB
blueprints/serverless/cloud-run-corporate/images/service-running-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/** | ||
* 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. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
output "default_URL_cart" { | ||
description = "Cloud Run service 'cart' default URL." | ||
value = (var.custom_domain != null ? | ||
module.cloud_run_cart[0].service.status[0].url : "none") | ||
} | ||
|
||
output "default_URL_checkout" { | ||
description = "Cloud Run service 'checkout' default URL." | ||
value = (var.custom_domain != null ? | ||
module.cloud_run_checkout[0].service.status[0].url : "none") | ||
} | ||
|
||
output "default_URL_hello" { | ||
description = "Cloud Run service 'hello' default URL." | ||
value = module.cloud_run_hello.service.status[0].url | ||
} | ||
|
||
output "load_balancer_ip" { | ||
description = "Load Balancer IP address." | ||
value = var.custom_domain != null ? module.ilb-l7[0].address : "none" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/** | ||
* 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. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
provider "google" { | ||
user_project_override = true | ||
billing_project = var.prj_main_id | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
/** | ||
* 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. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
variable "access_policy" { | ||
description = "VPC SC access policy, if it exists." | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "access_policy_create" { | ||
description = "Parameters for the creation of a VPC SC access policy." | ||
type = object({ | ||
parent = string | ||
title = string | ||
}) | ||
default = null | ||
} | ||
|
||
variable "custom_domain" { | ||
description = "Custom domain for the Load Balancer." | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "image" { | ||
description = "Container image to deploy." | ||
type = string | ||
default = "us-docker.pkg.dev/cloudrun/container/hello" | ||
} | ||
|
||
variable "ingress_settings" { | ||
description = "Ingress traffic sources allowed to call the service." | ||
type = string | ||
default = "internal" | ||
} | ||
|
||
variable "ip_ranges" { | ||
description = "IPs or IP ranges used by VPCs." | ||
type = map(map(string)) | ||
default = { | ||
main = { | ||
subnet = "10.0.1.0/24" | ||
subnet_proxy = "10.10.0.0/24" | ||
psc_addr = "10.0.0.100" | ||
} | ||
onprem = { | ||
subnet = "172.16.1.0/24" | ||
} | ||
prj1 = { | ||
subnet = "10.0.2.0/24" | ||
psc_addr = "10.0.0.200" | ||
} | ||
} | ||
} | ||
|
||
variable "prj_main_create" { | ||
description = "Parameters for the creation of the main project." | ||
type = object({ | ||
billing_account_id = string | ||
parent = string | ||
}) | ||
default = null | ||
} | ||
|
||
variable "prj_main_id" { | ||
description = "Main Project ID." | ||
type = string | ||
} | ||
|
||
variable "prj_onprem_create" { | ||
description = "Parameters for the creation of an 'onprem' project." | ||
type = object({ | ||
billing_account_id = string | ||
parent = string | ||
}) | ||
default = null | ||
} | ||
|
||
variable "prj_onprem_id" { | ||
description = "Onprem Project ID." | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "prj_prj1_create" { | ||
description = "Parameters for the creation of project 1." | ||
type = object({ | ||
billing_account_id = string | ||
parent = string | ||
}) | ||
default = null | ||
} | ||
|
||
variable "prj_prj1_id" { | ||
description = "Project 1 ID." | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "prj_svc1_create" { | ||
description = "Parameters for the creation of service project 1." | ||
type = object({ | ||
billing_account_id = string | ||
parent = string | ||
}) | ||
default = null | ||
} | ||
|
||
variable "prj_svc1_id" { | ||
description = "Service Project 1 ID." | ||
type = string | ||
default = null | ||
} | ||
|
||
variable "region" { | ||
description = "Cloud region where resource will be deployed." | ||
type = string | ||
default = "europe-west1" | ||
} | ||
|
||
variable "tf_identity" { | ||
description = "Terraform identity to include in VPC SC perimeter." | ||
type = string | ||
default = null | ||
} |