Skip to content

Commit

Permalink
fix: Renames secure-cloud-serverless-security module to secure-cloud-…
Browse files Browse the repository at this point in the history
…function-security (#41)

Co-authored-by: Grant Sorbo <gtsorbo@mac.com>
  • Loading branch information
amandakarina and gtsorbo committed Jun 1, 2023
1 parent 787eb14 commit b7cfd69
Show file tree
Hide file tree
Showing 12 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions build/int.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,5 @@ tags:
substitutions:
_DOCKER_IMAGE_DEVELOPER_TOOLS: "cft/developer-tools"
_DOCKER_TAG_VERSION_DEVELOPER_TOOLS: "1.12"
options:
machineType: 'N1_HIGHCPU_8'
2 changes: 1 addition & 1 deletion examples/secure_cloud_function_with_sql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The resources/services/activations/deletions that this example will create/trigg
* Grant Network User role to Cloud Services service account.
* Grant VPC Access User to Cloud Function Service Identity when deploying VPC Access.

* secure-cloud-serverless-security module will apply:
* secure-cloud-function-security module will apply:
* Creates KMS Keyring and Key for [customer managed encryption keys](https://cloud.google.com/run/docs/securing/using-cmek) in the **KMS Project** to be used by Cloud Function (2nd Gen).
* Enables Organization Policies related to Cloud Function (2nd Gen) in the **Serverless Project**.
* Allow Ingress only from internal and Cloud Load Balancing.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ to be used by Cloud Function (2nd Gen).
## Usage

```hcl
module "cloud_serverless_security" {
source = "../secure-cloud-serverless-security"
module "cloud_function_security" {
source = "../secure-cloud-function-security"
kms_project_id = <KMS PROJECT ID>
location = <KMS LOCATION>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ terraform {
}

provider_meta "google" {
module_name = "blueprints/terraform/terraform-google-cloud-functions:secure-cloud-serverless-security/v0.3.0"
module_name = "blueprints/terraform/terraform-google-cloud-functions:secure-cloud-function-security/v0.3.0"
}

provider_meta "google-beta" {
module_name = "blueprints/terraform/terraform-google-cloud-functions:secure-cloud-serverless-security/v0.3.0"
module_name = "blueprints/terraform/terraform-google-cloud-functions:secure-cloud-function-security/v0.3.0"
}
}
4 changes: 2 additions & 2 deletions modules/secure-cloud-function/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Secure Cloud Function

This module handles the deployment required for Cloud Function (2nd Gen) usage. Secure-cloud-function module will call the secure-cloud-function-core, secure-cloud-serverless-net and secure-cloud-serverless-security modules.
This module handles the deployment required for Cloud Function (2nd Gen) usage. Secure-cloud-function module will call the secure-cloud-function-core, secure-cloud-serverless-net and secure-cloud-function-security modules.

When using a Shared VPC, you can chose where to create the VPC Connector.

Expand All @@ -22,7 +22,7 @@ The resources/services/activations/deletions that this module will create/trigge
* Grant Network User role to Cloud Services service account.
* Grant VPC Access User to Cloud Function Service Identity when deploying VPC Access.

* secure-cloud-serverless-security module will apply:
* secure-cloud-function-security module will apply:
* Creates KMS Keyring and Key for [customer managed encryption keys](https://cloud.google.com/run/docs/securing/using-cmek) in the **KMS Project** to be used by Cloud Function (2nd Gen).
* Enables Organization Policies related to Cloud Function (2nd Gen) in the **Serverless Project**.
* Allow Ingress only from internal and Cloud Load Balancing.
Expand Down
6 changes: 3 additions & 3 deletions modules/secure-cloud-function/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ resource "google_project_service_identity" "pubsub_sa" {
service = "pubsub.googleapis.com"
}

module "cloud_serverless_security" {
source = "../secure-cloud-serverless-security"
module "cloud_function_security" {
source = "../secure-cloud-function-security"

kms_project_id = var.kms_project_id
location = var.location
Expand Down Expand Up @@ -127,7 +127,7 @@ module "cloud_function_core" {
build_environment_variables = var.build_environment_variables
event_trigger = var.event_trigger
force_destroy = !var.prevent_destroy
encryption_key = module.cloud_serverless_security.key_self_link
encryption_key = module.cloud_function_security.key_self_link
bucket_lifecycle_rules = var.bucket_lifecycle_rules
bucket_cors = var.bucket_cors

Expand Down
4 changes: 2 additions & 2 deletions modules/secure-cloud-function/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ output "connector_id" {
}

output "keyring_self_link" {
value = module.cloud_serverless_security.keyring_self_link
value = module.cloud_function_security.keyring_self_link
description = "Name of the Cloud KMS keyring."
}

output "key_self_link" {
value = module.cloud_serverless_security.key_self_link
value = module.cloud_function_security.key_self_link
description = "Name of the Cloud KMS crypto key."
}

Expand Down

0 comments on commit b7cfd69

Please sign in to comment.