From 21fdc3fb6a92ce5a0f7e3c191ae4473c5c7d1a7f Mon Sep 17 00:00:00 2001 From: Tien Nguyen Date: Thu, 31 Oct 2024 12:13:22 -0400 Subject: [PATCH] fix defaults for grant_types on okta_app_oauth not being picked up Signed-off-by: Tien Nguyen --- okta/resource_okta_app_oauth.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/okta/resource_okta_app_oauth.go b/okta/resource_okta_app_oauth.go index 0cbb2ba6c..642cf806f 100644 --- a/okta/resource_okta_app_oauth.go +++ b/okta/resource_okta_app_oauth.go @@ -920,6 +920,10 @@ func buildAppOAuth(d *schema.ResourceData, isNew bool) *sdk.OpenIdConnectApplica func validateGrantTypes(d *schema.ResourceData) error { grantTypeList := convertInterfaceToStringSet(d.Get("grant_types")) + // If grant_types are not set, we default to the bare minimum in func buildAppOAuth + if len(grantTypeList) < 1 { + return nil + } appType := d.Get("type").(string) appMap, ok := appRequirementsByType[appType] if !ok {