diff --git a/modules/cloud-function/README.md b/modules/cloud-function/README.md index fdb28ec97..0528f4096 100644 --- a/modules/cloud-function/README.md +++ b/modules/cloud-function/README.md @@ -162,22 +162,22 @@ module "cf-http" { |---|---|:---:|:---:|:---:| | [bucket_name](variables.tf#L26) | Name of the bucket that will be used for the function code. It will be created with prefix prepended if bucket_config is not null. | string | ✓ | | | [bundle_config](variables.tf#L31) | Cloud function source folder and generated zip bundle paths. Output path defaults to '/tmp/bundle.zip' if null. | object({…}) | ✓ | | -| [name](variables.tf#L90) | Name used for cloud function and associated resources. | string | ✓ | | -| [project_id](variables.tf#L101) | Project id used for all resources. | string | ✓ | | +| [name](variables.tf#L88) | Name used for cloud function and associated resources. | string | ✓ | | +| [project_id](variables.tf#L99) | Project id used for all resources. | string | ✓ | | | [bucket_config](variables.tf#L17) | Enable and configure auto-created bucket. Set fields to null to use defaults. | object({…}) | | null | | [description](variables.tf#L40) | Optional description. | string | | "Terraform managed." | | [environment_variables](variables.tf#L46) | Cloud function environment variables. | map(string) | | {} | -| [function_config](variables.tf#L52) | Cloud function configuration. | object({…}) | | {…} | -| [iam](variables.tf#L72) | IAM bindings for topic in {ROLE => [MEMBERS]} format. | map(list(string)) | | {} | -| [ingress_settings](variables.tf#L78) | Control traffic that reaches the cloud function. Allowed values are ALLOW_ALL and ALLOW_INTERNAL_ONLY. | string | | null | -| [labels](variables.tf#L84) | Resource labels | map(string) | | {} | -| [prefix](variables.tf#L95) | Optional prefix used for resource names. | string | | null | -| [region](variables.tf#L106) | Region used for all resources. | string | | "europe-west1" | -| [service_account](variables.tf#L112) | Service account email. Unused if service account is auto-created. | string | | null | -| [service_account_create](variables.tf#L118) | Auto-create service account. | bool | | false | -| [trigger_config](variables.tf#L124) | Function trigger configuration. Leave null for HTTP trigger. | object({…}) | | null | -| [vpc_connector](variables.tf#L134) | VPC connector configuration. Set create to 'true' if a new connector needs to be created | object({…}) | | null | -| [vpc_connector_config](variables.tf#L144) | VPC connector network configuration. Must be provided if new VPC connector is being created | object({…}) | | null | +| [function_config](variables.tf#L52) | Cloud function configuration. | object({…}) | | {…} | +| [iam](variables.tf#L70) | IAM bindings for topic in {ROLE => [MEMBERS]} format. | map(list(string)) | | {} | +| [ingress_settings](variables.tf#L76) | Control traffic that reaches the cloud function. Allowed values are ALLOW_ALL and ALLOW_INTERNAL_ONLY. | string | | null | +| [labels](variables.tf#L82) | Resource labels | map(string) | | {} | +| [prefix](variables.tf#L93) | Optional prefix used for resource names. | string | | null | +| [region](variables.tf#L104) | Region used for all resources. | string | | "europe-west1" | +| [service_account](variables.tf#L110) | Service account email. Unused if service account is auto-created. | string | | null | +| [service_account_create](variables.tf#L116) | Auto-create service account. | bool | | false | +| [trigger_config](variables.tf#L122) | Function trigger configuration. Leave null for HTTP trigger. | object({…}) | | null | +| [vpc_connector](variables.tf#L132) | VPC connector configuration. Set create to 'true' if a new connector needs to be created | object({…}) | | null | +| [vpc_connector_config](variables.tf#L142) | VPC connector network configuration. Must be provided if new VPC connector is being created | object({…}) | | null | ## Outputs diff --git a/modules/cloud-function/variables.tf b/modules/cloud-function/variables.tf index fe5e80abb..9ea767896 100644 --- a/modules/cloud-function/variables.tf +++ b/modules/cloud-function/variables.tf @@ -52,20 +52,18 @@ variable "environment_variables" { variable "function_config" { description = "Cloud function configuration." type = object({ - entry_point = string - ingress_settings = string - instances = number - memory = number - runtime = string - timeout = number + entry_point = string + instances = number + memory = number + runtime = string + timeout = number }) default = { - entry_point = "main" - ingress_settings = null - instances = 1 - memory = 256 - runtime = "python37" - timeout = 180 + entry_point = "main" + instances = 1 + memory = 256 + runtime = "python37" + timeout = 180 } }