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: expose docker registry setting for project cleanup #250

Merged
merged 1 commit into from
Jul 31, 2024
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
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."
}
Loading