From 561a6d493e22b0fe6c8204993e53c1284178f7ee Mon Sep 17 00:00:00 2001 From: Bharath KKB Date: Wed, 31 Jul 2024 13:10:21 -0500 Subject: [PATCH] feat: expose docker registry setting for project cleanup (#250) --- modules/project_cleanup/README.md | 1 + modules/project_cleanup/main.tf | 1 + modules/project_cleanup/variables.tf | 6 ++++++ 3 files changed, 8 insertions(+) diff --git a/modules/project_cleanup/README.md b/modules/project_cleanup/README.md index 7b49a78..20c0ba4 100644 --- a/modules/project_cleanup/README.md +++ b/modules/project_cleanup/README.md @@ -31,6 +31,7 @@ The following services must be enabled on the project housing the cleanup functi | clean\_up\_org\_level\_cai\_feeds | Clean up organization level Cloud Asset Inventory Feeds. | `bool` | `false` | no | | clean\_up\_org\_level\_scc\_notifications | Clean up organization level Security Command Center notifications. | `bool` | `false` | no | | clean\_up\_org\_level\_tag\_keys | Clean up organization level Tag Keys. | `bool` | `false` | 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\_timeout\_s | The amount of time in seconds allotted for the execution of the function. | `number` | `500` | no | | job\_schedule | Cleaner function run frequency, in cron syntax | `string` | `"*/5 * * * *"` | no | | list\_billing\_sinks\_page\_size | The maximum number of Billing Account Log Sinks to return in the call to `BillingAccountsSinksService.List` service. | `number` | `200` | no | diff --git a/modules/project_cleanup/main.tf b/modules/project_cleanup/main.tf index 2873b3e..b03f345 100644 --- a/modules/project_cleanup/main.tf +++ b/modules/project_cleanup/main.tf @@ -59,6 +59,7 @@ module "scheduled_project_cleaner" { function_runtime = "go121" function_service_account_email = google_service_account.project_cleaner_function.email function_timeout_s = var.function_timeout_s + function_docker_registry = var.function_docker_registry function_environment_variables = { TARGET_ORGANIZATION_ID = var.organization_id diff --git a/modules/project_cleanup/variables.tf b/modules/project_cleanup/variables.tf index 8a33ffc..43a9fcc 100644 --- a/modules/project_cleanup/variables.tf +++ b/modules/project_cleanup/variables.tf @@ -148,3 +148,9 @@ variable "target_folder_id" { description = "Folder ID to delete all projects under." default = "" } + +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." +}