diff --git a/templates/inspec/tests/integration/build/gcp-mm.tf b/templates/inspec/tests/integration/build/gcp-mm.tf index 73c6e6791755..e994b7b5098a 100644 --- a/templates/inspec/tests/integration/build/gcp-mm.tf +++ b/templates/inspec/tests/integration/build/gcp-mm.tf @@ -591,7 +591,7 @@ resource "google_cloudfunctions_function" "function" { trigger_http = "${var.cloudfunction["trigger_http"]}" timeout = "${var.cloudfunction["timeout"]}" entry_point = "${var.cloudfunction["entry_point"]}" - runtime = "nodejs6" + runtime = "nodejs8" environment_variables = { MY_ENV_VAR = "${var.cloudfunction["env_var_value"]}" diff --git a/third_party/terraform/resources/resource_cloudfunctions_function.go b/third_party/terraform/resources/resource_cloudfunctions_function.go index 641c50c2f778..04980b59ca42 100644 --- a/third_party/terraform/resources/resource_cloudfunctions_function.go +++ b/third_party/terraform/resources/resource_cloudfunctions_function.go @@ -189,9 +189,8 @@ func resourceCloudFunctionsFunction() *schema.Resource { }, "runtime": { - Type: schema.TypeString, - Optional: true, - Default: "nodejs6", + Type: schema.TypeString, + Required: true, }, "service_account_email": { diff --git a/third_party/terraform/tests/resource_cloudfunctions_function_test.go.erb b/third_party/terraform/tests/resource_cloudfunctions_function_test.go.erb index d0f56257e49e..ec9cf4dbcd04 100644 --- a/third_party/terraform/tests/resource_cloudfunctions_function_test.go.erb +++ b/third_party/terraform/tests/resource_cloudfunctions_function_test.go.erb @@ -524,6 +524,7 @@ resource "google_storage_bucket_object" "archive" { resource "google_cloudfunctions_function" "function" { name = "%s" + runtime = "nodejs8" description = "test function" available_memory_mb = 128 source_archive_bucket = "${google_storage_bucket.bucket.name}" @@ -628,7 +629,7 @@ resource "google_storage_bucket_object" "archive" { resource "google_cloudfunctions_function" "function" { name = "%s" - runtime = "nodejs6" + runtime = "nodejs8" available_memory_mb = 128 source_archive_bucket = "${google_storage_bucket.bucket.name}" source_archive_object = "${google_storage_bucket_object.archive.name}" @@ -659,6 +660,7 @@ resource "google_storage_bucket_object" "archive" { resource "google_cloudfunctions_function" "function" { name = "%s" + runtime = "nodejs8" available_memory_mb = 128 source_archive_bucket = "${google_storage_bucket.bucket.name}" source_archive_object = "${google_storage_bucket_object.archive.name}" @@ -686,6 +688,7 @@ resource "google_storage_bucket_object" "archive" { resource "google_cloudfunctions_function" "function" { name = "%s" + runtime = "nodejs8" available_memory_mb = 128 source_archive_bucket = "${google_storage_bucket.bucket.name}" source_archive_object = "${google_storage_bucket_object.archive.name}" @@ -702,6 +705,7 @@ func testAccCloudFunctionsFunction_sourceRepo(functionName, project string) stri return fmt.Sprintf(` resource "google_cloudfunctions_function" "function" { name = "%s" + runtime = "nodejs8" source_repository { // There isn't yet an API that'll allow us to create a source repository and @@ -733,6 +737,7 @@ data "google_compute_default_service_account" "default" { } resource "google_cloudfunctions_function" "function" { name = "%s" + runtime = "nodejs8" source_archive_bucket = "${google_storage_bucket.bucket.name}" source_archive_object = "${google_storage_bucket_object.archive.name}" @@ -778,6 +783,7 @@ resource "google_storage_bucket_object" "archive" { resource "google_cloudfunctions_function" "function" { name = "%s" + runtime = "nodejs8" provider = "google-beta" description = "test function" diff --git a/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown b/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown index 4a87b69f6b98..39e5dfdeaa16 100644 --- a/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown +++ b/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown @@ -105,10 +105,8 @@ The following arguments are supported: * `name` - (Required) A user-defined name of the function. Function names must be unique globally. -* `runtime` - (Optional) The runtime in which the function is going to run. One -of `"nodejs6"`, `"nodejs8"`, `"nodejs10"`, `"python37"`, `"go111"`. If empty, -defaults to `"nodejs6"`. It's recommended that you override the default, as -`"nodejs6"` is deprecated. +* `runtime` - (Required) The runtime in which the function is going to run. +Eg. `"nodejs8"`, `"nodejs10"`, `"python37"`, `"go111"`. - - - diff --git a/third_party/terraform/website/docs/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/version_3_upgrade.html.markdown index 217b67bec283..767b6250930a 100644 --- a/third_party/terraform/website/docs/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/version_3_upgrade.html.markdown @@ -53,6 +53,7 @@ so Terraform knows to manage them. - [Provider Version Configuration](#provider-version-configuration) - [Data Source: `google_container_engine_versions`](#data-source-google_container_engine_versions) +- [Resource: `google_cloudfunctions_function`](#resource-google_cloudfunctions_function) - [Resource: `google_cloudiot_registry`](#resource-google_cloudiot_registry) - [Resource: `google_compute_forwarding_rule`](#resource-google_compute_forwarding_rule) - [Resource: `google_compute_network`](#resource-google_compute_network) @@ -109,6 +110,13 @@ provider "google" { Use `location` instead. +## Resource: `google_cloudfunctions_function` + +### The `runtime` option `nodejs6` has been deprecated + +`nodejs6` has been deprecated and is no longer the default value for `runtime`. +`runtime` is now required. + ## Resource: `google_cloudiot_registry` ### `event_notification_config` is now removed