Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(TPG >=4.23)!: Add function_docker_registry variables and use them in terraform-google-event-function module #150

Merged
merged 7 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,12 @@ Then perform the following commands on the root folder:
| bucket\_name | The name to apply to the bucket. Will default to a string of <project-id>-scheduled-function-XXXX> with XXXX being random characters. | `string` | `""` | no |
| function\_available\_memory\_mb | The amount of memory in megabytes allotted for the function to use. | `number` | `256` | no |
| function\_description | The description of the function. | `string` | `"Processes log export events provided through a Pub/Sub topic subscription."` | no |
| function\_docker\_registry | Docker Registry to use for storing the function's Docker images. Allowed values are CONTAINER\_REGISTRY (default) and ARTIFACT\_REGISTRY. | `string` | `null` | no |
| function\_docker\_repository | User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry. | `string` | `null` | no |
| function\_entry\_point | The name of a method in the function source which will be invoked when the function is executed. | `string` | n/a | yes |
| function\_environment\_variables | A set of key/value environment variable pairs to assign to the function. | `map(string)` | `{}` | no |
| function\_event\_trigger\_failure\_policy\_retry | A toggle to determine if the function should be retried on failure. | `bool` | `false` | no |
| function\_kms\_key\_name | Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources. | `string` | `null` | no |
| function\_labels | A set of key/value label pairs to assign to the function. | `map(string)` | `{}` | no |
| function\_max\_instances | The maximum number of parallel executions of the function. | `number` | `null` | no |
| function\_name | The name to apply to the function | `string` | n/a | yes |
Expand Down
3 changes: 3 additions & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,9 @@ module "main" {
timeout_s = var.function_timeout_s
max_instances = var.function_max_instances
ingress_settings = var.ingress_settings
docker_registry = var.function_docker_registry
docker_repository = var.function_docker_repository
kms_key_name = var.function_kms_key_name
vpc_connector = var.vpc_connector
vpc_connector_egress_settings = var.vpc_connector_egress_settings
}
18 changes: 18 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,24 @@ variable "ingress_settings" {
description = "The ingress settings for the function. Allowed values are ALLOW_ALL, ALLOW_INTERNAL_AND_GCLB and ALLOW_INTERNAL_ONLY. Changes to this field will recreate the cloud function."
}

variable "function_docker_registry" {
type = string
default = null
description = "Docker Registry to use for storing the function's Docker images. Allowed values are CONTAINER_REGISTRY (default) and ARTIFACT_REGISTRY."
}

variable "function_docker_repository" {
type = string
default = null
description = "User managed repository created in Artifact Registry optionally with a customer managed encryption key. If specified, deployments will use Artifact Registry."
}

variable "function_kms_key_name" {
type = string
default = null
description = "Resource name of a KMS crypto key (managed by the user) used to encrypt/decrypt function resources."
}

variable "vpc_connector" {
type = string
default = null
Expand Down
2 changes: 1 addition & 1 deletion versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = ">= 3.53, < 6"
version = ">= 4.23, < 6"
}
random = {
source = "hashicorp/random"
Expand Down