diff --git a/load_balancer.tf b/load_balancer.tf index 9b4ddea..84fc7bd 100644 --- a/load_balancer.tf +++ b/load_balancer.tf @@ -1,5 +1,5 @@ # sets global address name - resource "google_compute_global_address" "default" { +resource "google_compute_global_address" "default" { project = local.deployment_project name = var.application_name } diff --git a/main.tf b/main.tf index 9188bd3..7168f5b 100644 --- a/main.tf +++ b/main.tf @@ -42,15 +42,15 @@ resource "google_cloud_run_service" "default" { } env { name = "ACTIVATION_TIMEOUT" - value = "60" + value = var.maximum_duration } env { name = "JUSTIFICATION_HINT" - value = "Bug or case number" + value = var.justification_hint } env { name = "JUSTIFICATION_PATTERN" - value = ".*" + value = var.justification_pattern } env { name = "IAP_BACKEND_SERVICE_ID" diff --git a/variables.tf b/variables.tf index 65bea86..65628f6 100644 --- a/variables.tf +++ b/variables.tf @@ -56,6 +56,24 @@ variable "allow_unauthenticated_invocations" { default = false } +variable "maximum_duration" { + type = number + description = "Sets the longest duration that a user can request" + default = 60 +} + +variable "justification_hint" { + type = string + description = "Hint provided to the user when selecting why they are asking for the role" + default = "Bug or case number" +} + +variable "justification_pattern" { + type = string + description = "Regex pattern that justification must match" + default = ".*" +} + ## Scope Variables variable "scope_type" { type = string diff --git a/versions.tf b/versions.tf index ae7381c..99082cb 100644 --- a/versions.tf +++ b/versions.tf @@ -10,5 +10,9 @@ terraform { source = "hashicorp/google-beta" version = "~> 4" } + random = { + source = "hashicorp/random" + version = "~> 3" + } } }