Skip to content

Commit

Permalink
feat: expose docker registry setting for project cleanup (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
bharathkkb authored Jul 31, 2024
1 parent 201c46c commit 561a6d4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/project_cleanup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
1 change: 1 addition & 0 deletions modules/project_cleanup/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions modules/project_cleanup/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}

0 comments on commit 561a6d4

Please sign in to comment.