Skip to content

Commit

Permalink
update tf test file
Browse files Browse the repository at this point in the history
  • Loading branch information
duytiennguyen-okta committed Jan 31, 2024
1 parent 72d0c3d commit e779fbe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 27 deletions.
18 changes: 5 additions & 13 deletions examples/resources/okta_app_oauth/federation_broker_off.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ resource "okta_group" "group" {
}

resource "okta_user" "user" {
admin_roles = ["APP_ADMIN", "USER_ADMIN"]
first_name = "TestAcc"
last_name = "blah"
login = "test-acc-replace_with_uuid@example.com"
email = "test-acc-replace_with_uuid@example.com"
status = "ACTIVE"
first_name = "TestAcc"
last_name = "blah"
login = "test-acc-replace_with_uuid@example.com"
email = "test-acc-replace_with_uuid@example.com"
status = "ACTIVE"
}

resource "okta_app_oauth" "test" {
Expand All @@ -21,11 +20,4 @@ resource "okta_app_oauth" "test" {
response_types = ["code", "token", "id_token"]
consent_method = "TRUSTED"
implicit_assignment = false

users {
id = okta_user.user.id
username = okta_user.user.email
}

groups = [okta_group.group.id]
}
18 changes: 5 additions & 13 deletions examples/resources/okta_app_oauth/groups_and_users.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ resource "okta_group" "group" {
}

resource "okta_user" "user" {
admin_roles = ["APP_ADMIN", "USER_ADMIN"]
first_name = "TestAcc"
last_name = "blah"
login = "testAcc-replace_with_uuid@example.com"
email = "testAcc-replace_with_uuid@example.com"
status = "ACTIVE"
first_name = "TestAcc"
last_name = "blah"
login = "testAcc-replace_with_uuid@example.com"
email = "testAcc-replace_with_uuid@example.com"
status = "ACTIVE"
}

resource "okta_app_oauth" "test" {
Expand All @@ -19,11 +18,4 @@ resource "okta_app_oauth" "test" {
post_logout_redirect_uris = ["http://d.com/post"]
login_uri = "http://test.com"
response_types = ["code", "token", "id_token"]

users {
id = okta_user.user.id
username = okta_user.user.email
}

groups = [okta_group.group.id]
}
2 changes: 1 addition & 1 deletion okta/resource_okta_app_oauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ func resourceAppOAuthUpdate(ctx context.Context, d *schema.ResourceData, m inter
return diag.Errorf("failed to create OAuth application: %v", err)
}

app := buildAppOAuth(d)
app := buildAppOAuth(d, false)
// When omit_secret is true on update, we make sure that do not include
// the client secret value in the api call.
// This is to ensure that when this is "toggled on", the apply which this occurs also does
Expand Down

0 comments on commit e779fbe

Please sign in to comment.