Skip to content

Commit

Permalink
Merge pull request #4 from bethdevopsbunny/environment_var_configurables
Browse files Browse the repository at this point in the history
Environment var configurables
  • Loading branch information
bethdevopsbunny authored Aug 25, 2023
2 parents 9182939 + 56e810c commit 56c7962
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
2 changes: 1 addition & 1 deletion load_balancer.tf
Original file line number Diff line number Diff line change
@@ -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
}
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
18 changes: 18 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions versions.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ terraform {
source = "hashicorp/google-beta"
version = "~> 4"
}
random = {
source = "hashicorp/random"
version = "~> 3"
}
}
}

0 comments on commit 56c7962

Please sign in to comment.