Skip to content

Commit 05de2d7

Browse files
committed
add more parameters for OKTA
1 parent c677982 commit 05de2d7

File tree

3 files changed

+47
-9
lines changed

3 files changed

+47
-9
lines changed

main.tf

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ locals {
22
values = {
33
prometheus_image_repository = var.prometheus_image_repository
44
prometheus_image_tag = var.prometheus_image_tag
5+
prometheus_host_url = var.prometheus_host_url
6+
7+
grafana_image_repository = var.grafana_image_repository
8+
grafana_image_tag = var.grafana_image_tag
9+
grafana_admin_password = var.grafana_admin_password
10+
grafana_host_url = var.grafana_host_url
11+
grafana_server_root_url = var.grafana_server_root_url
512

6-
grafana_image_repository = var.grafana_image_repository
7-
grafana_image_tag = var.grafana_image_tag
8-
grafana_admin_password = var.grafana_admin_password
913
grafana_okta_client_id = var.grafana_okta_client_id
1014
grafana_okta_client_secret = var.grafana_okta_client_secret
15+
grafana_okta_auth_url = var.grafana_okta_auth_url
16+
grafana_okta_token_url = var.grafana_okta_token_url
17+
grafana_okta_api_url = var.grafana_okta_api_url
1118

1219
prometheus_operator_image_repository = var.prometheus_operator_image_repository
1320
prometheus_operator_image_tag = var.prometheus_operator_image_tag

templates/values.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ grafana:
738738
# hosts:
739739
# - grafana.domain.com
740740
hosts:
741-
- bt-dev.grafana.platform.sphdigital.com
741+
- ${grafana_host_url}
742742

743743
## Path for grafana ingress
744744
path: /
@@ -755,7 +755,7 @@ grafana:
755755
log:
756756
level: debug
757757
server:
758-
root_url: https://bt-dev.grafana.platform.sphdigital.com
758+
root_url: ${grafana_server_root_url}
759759
auth.okta:
760760
name: Okta
761761
icon: okta
@@ -764,9 +764,9 @@ grafana:
764764
client_id: ${grafana_okta_client_id}
765765
client_secret: ${grafana_okta_client_secret}
766766
scopes: openid profile email groups
767-
auth_url: https://sphmedia.okta.com/oauth2/v1/authorize
768-
token_url: https://sphmedia.okta.com/oauth2/v1/token
769-
api_url: https://sphmedia.okta.com/oauth2/v1/userinfo
767+
auth_url: ${grafana_okta_auth_url}
768+
token_url: ${grafana_okta_token_url}
769+
api_url: ${grafana_okta_api_url}
770770
# allowed_domains:
771771
# allowed_groups:
772772
# role_attribute_path:
@@ -2106,7 +2106,7 @@ prometheus:
21062106
# hosts:
21072107
# - prometheus.domain.com
21082108
hosts:
2109-
- bt-dev.prometheus.platform.sphdigital.com
2109+
- ${prometheus_host_url}
21102110

21112111
## Paths to use for ingress rules - one path should match the prometheusSpec.routePrefix
21122112
##

variables.tf

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,19 @@ variable "grafana_admin_password" {
7474
sensitive = true
7575
}
7676

77+
variable "grafana_host_url" {
78+
description = "Grafana Host URL"
79+
type = string
80+
default = ""
81+
}
82+
83+
variable "grafana_server_root_url" {
84+
description = "Grafana Server Root URL"
85+
type = string
86+
default = ""
87+
}
88+
89+
### OKAT Config of Grafana ###
7790
variable "grafana_okta_client_id" {
7891
description = "OKTA Client ID for Grafana"
7992
type = string
@@ -86,6 +99,24 @@ variable "grafana_okta_client_secret" {
8699
sensitive = true
87100
}
88101

102+
variable "grafana_okta_auth_url" {
103+
description = "OKTA Auth URL for Grafana"
104+
type = string
105+
default = ""
106+
}
107+
108+
variable "grafana_okta_token_url" {
109+
description = "OKTA Token URL for Grafana"
110+
type = string
111+
default = ""
112+
}
113+
114+
variable "grafana_okta_api_url" {
115+
description = "OKTA API URL for Grafana"
116+
type = string
117+
default = ""
118+
}
119+
89120
variable "prometheus_operator_image_repository" {
90121
description = "Prometheus Operator Image repository"
91122
type = string

0 commit comments

Comments
 (0)