diff --git a/templates/inspec/tests/integration/build/gcp-mm.tf b/templates/inspec/tests/integration/build/gcp-mm.tf index 94b6f721962e..c150ab5884c7 100644 --- a/templates/inspec/tests/integration/build/gcp-mm.tf +++ b/templates/inspec/tests/integration/build/gcp-mm.tf @@ -612,7 +612,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 236a4068c78b..3f062282ebc2 100644 --- a/third_party/terraform/resources/resource_cloudfunctions_function.go +++ b/third_party/terraform/resources/resource_cloudfunctions_function.go @@ -187,9 +187,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/guides/version_3_upgrade.html.markdown b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown index 4131abe03b01..c9cc31f21e0b 100644 --- a/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown +++ b/third_party/terraform/website/docs/guides/version_3_upgrade.html.markdown @@ -54,6 +54,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_container_cluster`](#resource-google_container_cluster) +- [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) @@ -308,6 +309,13 @@ introducing an incompatibility for users who specify config in JSON instead of HCL or who use `dynamic` blocks. See more details in the [Attributes as Blocks](https://www.terraform.io/docs/configuration/attr-as-blocks.html) documentation. +## 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 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 ffec17d642b0..b7681f5e5ea5 100644 --- a/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown +++ b/third_party/terraform/website/docs/r/cloudfunctions_function.html.markdown @@ -106,10 +106,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"`. - - -