File tree Expand file tree Collapse file tree 5 files changed +58
-0
lines changed Expand file tree Collapse file tree 5 files changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ data "okta_user" "user" { user_id = var. email }
Original file line number Diff line number Diff line change
1
+ output "app" { value = okta_app_oauth. app }
2
+ output "client_id" { value = okta_app_oauth. app . client_id }
3
+ output "client_secret" { value = okta_app_oauth. app . client_secret }
4
+ output "cookie_secret" { value = random_string. cookie_secret . result }
5
+ output "oauth_port" { value = random_integer. port . result }
Original file line number Diff line number Diff line change
1
+ resource "okta_app_oauth" "app" {
2
+ label = var. label
3
+ type = var. type
4
+ grant_types = var. grant_types
5
+ login_uri = formatlist (" %s/*" , var. urls ). 0
6
+ redirect_uris = concat (
7
+ var. urls ,
8
+ formatlist (" %s/oauth2/callback" , var. urls ),
9
+ formatlist (" %s/*" , var. urls )
10
+ )
11
+ status = var. status
12
+ auto_key_rotation = var. key_rotation
13
+ logo_uri = var. logo_uri
14
+ hide_ios = true
15
+ hide_web = true
16
+ response_types = var. response_types
17
+ token_endpoint_auth_method = var. auth_method
18
+ users {
19
+ username = data. okta_user . user . email
20
+ id = data. okta_user . user . id
21
+ }
22
+ }
23
+
24
+ resource "random_string" "cookie_secret" {
25
+ length = 32
26
+ special = true
27
+ }
28
+
29
+ resource "random_integer" "port" {
30
+ max = 50000
31
+ min = 20000
32
+ }
Original file line number Diff line number Diff line change
1
+ variable "auth_method" { default = " client_secret_post" }
2
+ variable "domain" { type = string }
3
+ variable "email" { type = string }
4
+ variable "grant_types" { default = [" authorization_code" , " implicit" ] }
5
+ variable "key_rotation" { default = true }
6
+ variable "label" { type = string }
7
+ variable "logo_uri" { default = " " }
8
+ variable "name" { type = string }
9
+ variable "response_types" { default = [" code" , " id_token" ] }
10
+ variable "status" { default = " ACTIVE" }
11
+ variable "type" { default = " web" }
12
+ variable "urls" { type = list (string ) }
Original file line number Diff line number Diff line change
1
+ terraform {
2
+ required_providers {
3
+ okta = {
4
+ source = " oktadeveloper/okta"
5
+ }
6
+ }
7
+ }
8
+
You can’t perform that action at this time.
0 commit comments