From 7ec59f7230c9b3928ac1bee9235b0092c353e19d Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 12:52:10 -0500 Subject: [PATCH 1/9] add release please config --- .github/release-please.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/release-please.yml diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 0000000..6fc4afc --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,2 @@ +releaseType: terraform-module +handleGHRelease: true \ No newline at end of file From 02ee1b5965165b15f6e014f5f7dcd375278cf5c0 Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 12:52:54 -0500 Subject: [PATCH 2/9] newline --- .github/release-please.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-please.yml b/.github/release-please.yml index 6fc4afc..6366b9c 100644 --- a/.github/release-please.yml +++ b/.github/release-please.yml @@ -1,2 +1,2 @@ releaseType: terraform-module -handleGHRelease: true \ No newline at end of file +handleGHRelease: true From 7b36a49cb0a50913c59754890f832bcca557a835 Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 13:01:11 -0500 Subject: [PATCH 3/9] update setup --- test/setup/main.tf | 4 ++-- test/setup/versions.tf | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/setup/main.tf b/test/setup/main.tf index e6b3176..a9959dc 100644 --- a/test/setup/main.tf +++ b/test/setup/main.tf @@ -30,7 +30,7 @@ resource "google_folder" "ci_event_func_subfolder" { module "project" { source = "terraform-google-modules/project-factory/google" - version = "~> 3.0" + version = "~> 9.0" name = local.project_name random_project_id = true @@ -51,7 +51,7 @@ module "project" { module "network" { source = "terraform-google-modules/network/google" - version = "~> 1.2" + version = "~> 2.5" project_id = module.project.project_id network_name = "test-network" diff --git a/test/setup/versions.tf b/test/setup/versions.tf index b878b6a..31bd9b8 100644 --- a/test/setup/versions.tf +++ b/test/setup/versions.tf @@ -19,9 +19,9 @@ terraform { } provider "google" { - version = "~> 2.12.0" + version = "~> 3.39.0" } provider "google-beta" { - version = "~> 2.12.0" + version = "~> 3.39.0" } From 0f0b1624e0fc1f17ba4304290651fb8f0195593e Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 13:05:55 -0500 Subject: [PATCH 4/9] relax example TF versions --- examples/automatic-labelling-folder/main.tf | 2 +- examples/automatic-labelling-from-localhost/main.tf | 2 +- examples/automatic-labelling-from-repository/main.tf | 2 +- examples/delete-vms-without-cmek/main.tf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/automatic-labelling-folder/main.tf b/examples/automatic-labelling-folder/main.tf index cc3e583..2dbd6d4 100644 --- a/examples/automatic-labelling-folder/main.tf +++ b/examples/automatic-labelling-folder/main.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = "~> 0.12.0" + required_version = ">= 0.12" } provider "archive" { diff --git a/examples/automatic-labelling-from-localhost/main.tf b/examples/automatic-labelling-from-localhost/main.tf index a00c9db..7045a09 100644 --- a/examples/automatic-labelling-from-localhost/main.tf +++ b/examples/automatic-labelling-from-localhost/main.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = "~> 0.12.0" + required_version = ">= 0.12" } provider "archive" { diff --git a/examples/automatic-labelling-from-repository/main.tf b/examples/automatic-labelling-from-repository/main.tf index 59bcea2..ee26c60 100644 --- a/examples/automatic-labelling-from-repository/main.tf +++ b/examples/automatic-labelling-from-repository/main.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = "~> 0.12.0" + required_version = ">= 0.12" } provider "archive" { diff --git a/examples/delete-vms-without-cmek/main.tf b/examples/delete-vms-without-cmek/main.tf index 99b89f8..7d5c76d 100644 --- a/examples/delete-vms-without-cmek/main.tf +++ b/examples/delete-vms-without-cmek/main.tf @@ -15,7 +15,7 @@ */ terraform { - required_version = "~> 0.12.0" + required_version = ">= 0.12" } provider "archive" { From 6aec41536304c10ac98b1b7243058b2057e836df Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 20:53:32 -0500 Subject: [PATCH 5/9] bump example providers --- examples/automatic-labelling-folder/main.tf | 2 +- examples/automatic-labelling-from-localhost/main.tf | 2 +- examples/automatic-labelling-from-repository/main.tf | 2 +- examples/delete-vms-without-cmek/main.tf | 2 +- examples/dynamic-files/versions.tf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/automatic-labelling-folder/main.tf b/examples/automatic-labelling-folder/main.tf index 2dbd6d4..7ae91a0 100644 --- a/examples/automatic-labelling-folder/main.tf +++ b/examples/automatic-labelling-folder/main.tf @@ -23,7 +23,7 @@ provider "archive" { } provider "google" { - version = "~> 2.1" + version = "~> 3.39" } provider "random" { diff --git a/examples/automatic-labelling-from-localhost/main.tf b/examples/automatic-labelling-from-localhost/main.tf index 7045a09..c2bb54c 100644 --- a/examples/automatic-labelling-from-localhost/main.tf +++ b/examples/automatic-labelling-from-localhost/main.tf @@ -23,7 +23,7 @@ provider "archive" { } provider "google" { - version = "~> 2.1" + version = "~> 3.39" } provider "random" { diff --git a/examples/automatic-labelling-from-repository/main.tf b/examples/automatic-labelling-from-repository/main.tf index ee26c60..ac7b9cc 100644 --- a/examples/automatic-labelling-from-repository/main.tf +++ b/examples/automatic-labelling-from-repository/main.tf @@ -23,7 +23,7 @@ provider "archive" { } provider "google" { - version = "~> 2.1" + version = "~> 3.39" } provider "random" { diff --git a/examples/delete-vms-without-cmek/main.tf b/examples/delete-vms-without-cmek/main.tf index 7d5c76d..2cb8043 100644 --- a/examples/delete-vms-without-cmek/main.tf +++ b/examples/delete-vms-without-cmek/main.tf @@ -23,7 +23,7 @@ provider "archive" { } provider "google" { - version = "~> 2.1" + version = "~> 3.39" } provider "random" { diff --git a/examples/dynamic-files/versions.tf b/examples/dynamic-files/versions.tf index 27ba8fc..2970427 100644 --- a/examples/dynamic-files/versions.tf +++ b/examples/dynamic-files/versions.tf @@ -15,5 +15,5 @@ */ terraform { - required_version = "~> 0.12.6" + required_version = ">= 0.12" } From 5bd4da9a33eab863f698e36c69c41c25a4895042 Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 21:01:24 -0500 Subject: [PATCH 6/9] pin devtools --- build/int.cloudbuild.yaml | 2 +- build/lint.cloudbuild.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/int.cloudbuild.yaml b/build/int.cloudbuild.yaml index 4761162..1243f59 100644 --- a/build/int.cloudbuild.yaml +++ b/build/int.cloudbuild.yaml @@ -38,4 +38,4 @@ tags: - 'integration' substitutions: _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools' - _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0' + _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.0' diff --git a/build/lint.cloudbuild.yaml b/build/lint.cloudbuild.yaml index 0569972..56c6e47 100644 --- a/build/lint.cloudbuild.yaml +++ b/build/lint.cloudbuild.yaml @@ -21,4 +21,4 @@ tags: - 'lint' substitutions: _DOCKER_IMAGE_DEVELOPER_TOOLS: 'cft/developer-tools' - _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0' + _DOCKER_TAG_VERSION_DEVELOPER_TOOLS: '0.12.0' From 09b633f7cde7cd20210a638a5a8c377782cf506e Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 21:52:35 -0500 Subject: [PATCH 7/9] use nodejs10 runtime as nodejs8 is deprecated --- examples/automatic-labelling-folder/main.tf | 2 +- examples/automatic-labelling-from-localhost/main.tf | 2 +- examples/automatic-labelling-from-repository/main.tf | 2 +- examples/dynamic-files/main.tf | 2 +- variables.tf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/automatic-labelling-folder/main.tf b/examples/automatic-labelling-folder/main.tf index 7ae91a0..2cad993 100644 --- a/examples/automatic-labelling-folder/main.tf +++ b/examples/automatic-labelling-folder/main.tf @@ -69,7 +69,7 @@ module "localhost_function" { project_id = var.project_id region = var.region source_directory = "${path.module}/function_source" - runtime = "nodejs8" + runtime = "nodejs10" } resource "null_resource" "wait_for_function" { diff --git a/examples/automatic-labelling-from-localhost/main.tf b/examples/automatic-labelling-from-localhost/main.tf index c2bb54c..8579468 100644 --- a/examples/automatic-labelling-from-localhost/main.tf +++ b/examples/automatic-labelling-from-localhost/main.tf @@ -61,7 +61,7 @@ module "localhost_function" { project_id = var.project_id region = var.region source_directory = "${path.module}/function_source" - runtime = "nodejs8" + runtime = "nodejs10" } resource "null_resource" "wait_for_function" { diff --git a/examples/automatic-labelling-from-repository/main.tf b/examples/automatic-labelling-from-repository/main.tf index ac7b9cc..b7e24ae 100644 --- a/examples/automatic-labelling-from-repository/main.tf +++ b/examples/automatic-labelling-from-repository/main.tf @@ -80,7 +80,7 @@ module "repository_function" { description = "Labels resource with owner information." entry_point = "labelResource" - runtime = "nodejs8" + runtime = "nodejs10" environment_variables = { LABEL_KEY = "principal-email" diff --git a/examples/dynamic-files/main.tf b/examples/dynamic-files/main.tf index 901ce85..7612a3b 100644 --- a/examples/dynamic-files/main.tf +++ b/examples/dynamic-files/main.tf @@ -52,7 +52,7 @@ module "localhost_function" { project_id = var.project_id region = var.region source_directory = "${path.module}/function_source" - runtime = "nodejs8" + runtime = "nodejs10" source_dependent_files = [local_file.file] } diff --git a/variables.tf b/variables.tf index 9871278..deaa688 100644 --- a/variables.tf +++ b/variables.tf @@ -127,5 +127,5 @@ variable "event_trigger_failure_policy_retry" { variable "ingress_settings" { type = string default = "ALLOW_ALL" - description = "Ingress settings for the Cloud Function" + description = "The ingress settings for the function" } From ef89c481a32217a2c8b94473f5cfb169bffa55ab Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 22:01:55 -0500 Subject: [PATCH 8/9] docs --- Makefile | 2 +- README.md | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 86e8882..2caa920 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ # Make will use bash instead of sh SHELL := /usr/bin/env bash -DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0 +DOCKER_TAG_VERSION_DEVELOPER_TOOLS := 0.12.0 DOCKER_IMAGE_DEVELOPER_TOOLS := cft/developer-tools REGISTRY_URL := gcr.io/cloud-foundation-cicd diff --git a/README.md b/README.md index 819448e..c180090 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,7 @@ module "localhost_function" { | environment\_variables | A set of key/value environment variable pairs to assign to the function. | map(string) | `` | no | | event\_trigger | A source that fires events in response to a condition in another service. | map(string) | n/a | yes | | event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. | bool | `"false"` | no | +| ingress\_settings | The ingress settings for the function | string | `"ALLOW_ALL"` | no | | labels | A set of key/value label pairs to assign to the Cloud Function. | map(string) | `` | no | | name | The name to apply to any nameable resources. | string | n/a | yes | | project\_id | The ID of the project to which resources will be applied. | string | n/a | yes | @@ -70,8 +71,6 @@ module "localhost_function" { | source\_dependent\_files | A list of any Terraform created `local_file`s that the module will wait for before creating the archive. | object | `` | no | | source\_directory | The pathname of the directory which contains the function source code. | string | n/a | yes | | timeout\_s | The amount of time in seconds allotted for the execution of the function. | number | `"60"` | no | -| ingress\_settings | The ingress settings for the function | string | `"ALLOW_ALL"` | no | - ## Outputs From dc86f8ba76b7500cebce9daf847cdd165bd7e9fe Mon Sep 17 00:00:00 2001 From: bharathkkb Date: Thu, 17 Sep 2020 22:02:56 -0500 Subject: [PATCH 9/9] fix setup --- test/setup/main.tf | 1 + 1 file changed, 1 insertion(+) diff --git a/test/setup/main.tf b/test/setup/main.tf index a9959dc..2e2fc9c 100644 --- a/test/setup/main.tf +++ b/test/setup/main.tf @@ -42,6 +42,7 @@ module "project" { "cloudresourcemanager.googleapis.com", "storage-api.googleapis.com", "serviceusage.googleapis.com", + "cloudbuild.googleapis.com", "cloudfunctions.googleapis.com", "storage-component.googleapis.com", "sourcerepo.googleapis.com",