Skip to content

Commit

Permalink
Plumb through a deletion protection option. (#544)
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Moore <[email protected]>
  • Loading branch information
mattmoor authored Oct 1, 2024
1 parent d731383 commit 6b3a4ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/app/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ module "this" {
name = var.name
regions = var.regions

deletion_protection = var.deletion_protection

// Only accept traffic coming from GCLB.
ingress = "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"
// This needs to egress in order to talk to Github
Expand Down
6 changes: 6 additions & 0 deletions modules/app/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ variable "regions" {
}))
}

variable "deletion_protection" {
type = bool
description = "Whether to enable delete protection for the service."
default = true
}

variable "private-services" {
description = "The names of the private services this module depends on."
type = object({
Expand Down
2 changes: 2 additions & 0 deletions modules/app/webhook.tf
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module "webhook" {
name = "${var.name}-webhook"
regions = var.regions

deletion_protection = var.deletion_protection

// Only accept traffic coming from GCLB.
ingress = "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER"
// This needs to egress in order to talk to Github
Expand Down

0 comments on commit 6b3a4ba

Please sign in to comment.