mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Add a default to Cloud Functions runtime (#3605)
Signed-off-by: Modular Magician <magic-modules@google.com>
This commit is contained in:
parent
3e40eb5014
commit
1ba048535e
@ -185,7 +185,7 @@ func resourceCloudFunctionsFunction() *schema.Resource {
|
|||||||
"runtime": {
|
"runtime": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Computed: true,
|
Default: "nodejs6",
|
||||||
},
|
},
|
||||||
|
|
||||||
"service_account_email": {
|
"service_account_email": {
|
||||||
|
@ -560,6 +560,7 @@ resource "google_pubsub_topic" "sub" {
|
|||||||
|
|
||||||
resource "google_cloudfunctions_function" "function" {
|
resource "google_cloudfunctions_function" "function" {
|
||||||
name = "%s"
|
name = "%s"
|
||||||
|
runtime = "nodejs8"
|
||||||
available_memory_mb = 128
|
available_memory_mb = 128
|
||||||
source_archive_bucket = "${google_storage_bucket.bucket.name}"
|
source_archive_bucket = "${google_storage_bucket.bucket.name}"
|
||||||
source_archive_object = "${google_storage_bucket_object.archive.name}"
|
source_archive_object = "${google_storage_bucket_object.archive.name}"
|
||||||
@ -590,6 +591,7 @@ resource "google_storage_bucket_object" "archive" {
|
|||||||
|
|
||||||
resource "google_cloudfunctions_function" "function" {
|
resource "google_cloudfunctions_function" "function" {
|
||||||
name = "%s"
|
name = "%s"
|
||||||
|
runtime = "nodejs6"
|
||||||
available_memory_mb = 128
|
available_memory_mb = 128
|
||||||
source_archive_bucket = "${google_storage_bucket.bucket.name}"
|
source_archive_bucket = "${google_storage_bucket.bucket.name}"
|
||||||
source_archive_object = "${google_storage_bucket_object.archive.name}"
|
source_archive_object = "${google_storage_bucket_object.archive.name}"
|
||||||
|
@ -29,6 +29,8 @@ resource "google_storage_bucket_object" "archive" {
|
|||||||
resource "google_cloudfunctions_function" "function" {
|
resource "google_cloudfunctions_function" "function" {
|
||||||
name = "function-test"
|
name = "function-test"
|
||||||
description = "My function"
|
description = "My function"
|
||||||
|
runtime = "nodejs10"
|
||||||
|
|
||||||
available_memory_mb = 128
|
available_memory_mb = 128
|
||||||
source_archive_bucket = "${google_storage_bucket.bucket.name}"
|
source_archive_bucket = "${google_storage_bucket.bucket.name}"
|
||||||
source_archive_object = "${google_storage_bucket_object.archive.name}"
|
source_archive_object = "${google_storage_bucket_object.archive.name}"
|
||||||
@ -51,6 +53,11 @@ The following arguments are supported:
|
|||||||
|
|
||||||
* `name` - (Required) A user-defined name of the function. Function names must be unique globally.
|
* `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.
|
||||||
|
|
||||||
- - -
|
- - -
|
||||||
|
|
||||||
* `description` - (Optional) Description of the function.
|
* `description` - (Optional) Description of the function.
|
||||||
@ -67,8 +74,6 @@ The following arguments are supported:
|
|||||||
|
|
||||||
* `labels` - (Optional) A set of key/value label pairs to assign to the function.
|
* `labels` - (Optional) A set of key/value label pairs to assign to the function.
|
||||||
|
|
||||||
* `runtime` - (Optional) The runtime in which the function is going to run. If empty, defaults to `"nodejs6"`.
|
|
||||||
|
|
||||||
* `service_account_email` - (Optional) If provided, the self-provided service account to run the function with.
|
* `service_account_email` - (Optional) If provided, the self-provided service account to run the function with.
|
||||||
|
|
||||||
* `environment_variables` - (Optional) A set of key/value environment variable pairs to assign to the function.
|
* `environment_variables` - (Optional) A set of key/value environment variable pairs to assign to the function.
|
||||||
|
Loading…
Reference in New Issue
Block a user