diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 0000000..6366b9c --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,2 @@ +releaseType: terraform-module +handleGHRelease: true 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 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' diff --git a/examples/automatic-labelling-folder/main.tf b/examples/automatic-labelling-folder/main.tf index cc3e583..2cad993 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" { @@ -23,7 +23,7 @@ provider "archive" { } provider "google" { - version = "~> 2.1" + version = "~> 3.39" } provider "random" { @@ -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 a00c9db..8579468 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" { @@ -23,7 +23,7 @@ provider "archive" { } provider "google" { - version = "~> 2.1" + version = "~> 3.39" } provider "random" { @@ -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 59bcea2..b7e24ae 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" { @@ -23,7 +23,7 @@ provider "archive" { } provider "google" { - version = "~> 2.1" + version = "~> 3.39" } provider "random" { @@ -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/delete-vms-without-cmek/main.tf b/examples/delete-vms-without-cmek/main.tf index 99b89f8..2cb8043 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" { @@ -23,7 +23,7 @@ provider "archive" { } provider "google" { - version = "~> 2.1" + version = "~> 3.39" } provider "random" { 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/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" } diff --git a/test/setup/main.tf b/test/setup/main.tf index e6b3176..2e2fc9c 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 @@ -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", @@ -51,7 +52,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" } 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" }