Skip to content

Commit e952aeb

Browse files
committed
minor cleanup, adjusts for updated okta provider will validate funcionality
1 parent 27b9058 commit e952aeb

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

resources.tf

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
11
resource "okta_app_oauth" "app" {
2-
label = var.label
3-
type = var.type
4-
grant_types = var.grant_types
5-
login_uri = formatlist("%s/oauth2/default", var.urls).0
6-
redirect_uris = concat(formatlist("%s/oauth2/default", var.urls), formatlist("%s/oauth2/callback", var.urls))
7-
status = var.status
8-
auto_key_rotation = var.key_rotation
2+
label = var.label
3+
type = var.type
4+
grant_types = var.grant_types
5+
login_uri = formatlist("%s/oauth2/default", var.urls).0
6+
redirect_uris = concat(formatlist("%s/oauth2/default", var.urls), formatlist("%s/oauth2/callback", var.urls))
7+
status = var.status
8+
auto_key_rotation = var.key_rotation
99
#logo_uri = var.logo_uri # disabled as a recent update seems to disallow this to be set to an empty string
1010
hide_ios = true
1111
hide_web = true
1212
response_types = var.response_types
1313
token_endpoint_auth_method = var.auth_method
14-
users {
15-
username = data.okta_user.user.email
16-
id = data.okta_user.user.id
14+
lifecycle {
15+
ignore_changes = [users]
1716
}
1817
}
1918

19+
resource "okta_app_user" "user" {
20+
app_id = okta_app_oauth.app.id
21+
user_id = data.okta_user.user.id
22+
username = data.okta_user.user.email
23+
}
24+
2025
resource "random_string" "cookie_secret" {
2126
length = 32
2227
special = true

versions.tf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
terraform {
22
required_providers {
3-
okta = {
4-
source = "okta/okta"
5-
}
3+
okta = { source = "okta/okta" }
64
}
75
}
86

0 commit comments

Comments
 (0)