diff --git a/okta/app.go b/okta/app.go index accbba5a1..bb1175dea 100644 --- a/okta/app.go +++ b/okta/app.go @@ -89,6 +89,23 @@ var ( }, } + skipUsersAndGroupsSchema = map[string]*schema.Schema{ + "skip_users": { + Type: schema.TypeBool, + Optional: true, + Description: "Ignore users sync. This is a temporary solution until 'users' field is supported in all the app-like resources", + Default: false, + Deprecated: "Because users has been removed, this attribute is a no op and will be removed", + }, + "skip_groups": { + Type: schema.TypeBool, + Optional: true, + Description: "Ignore groups sync. This is a temporary solution until 'groups' field is supported in all the app-like resources", + Default: false, + Deprecated: "Because groups has been removed, this attribute is a no op and will be removed", + }, + } + appVisibilitySchema = map[string]*schema.Schema{ "auto_submit_toolbar": { Type: schema.TypeBool, diff --git a/okta/data_source_okta_app.go b/okta/data_source_okta_app.go index 3e3baa55e..1ff47ffc1 100644 --- a/okta/data_source_okta_app.go +++ b/okta/data_source_okta_app.go @@ -12,7 +12,7 @@ import ( func dataSourceApp() *schema.Resource { return &schema.Resource{ ReadContext: dataSourceAppRead, - Schema: map[string]*schema.Schema{ + Schema: buildSchema(skipUsersAndGroupsSchema, map[string]*schema.Schema{ "id": { Type: schema.TypeString, Optional: true, @@ -61,7 +61,7 @@ func dataSourceApp() *schema.Resource { Description: "Users associated with the application", Deprecated: "The `users` field is now deprecated for the data source `okta_app`, please replace all uses of this with: `okta_app_user_assignments`", }, - }, + }), } } diff --git a/okta/data_source_okta_app_oauth.go b/okta/data_source_okta_app_oauth.go index f5832bab0..de9800b57 100644 --- a/okta/data_source_okta_app_oauth.go +++ b/okta/data_source_okta_app_oauth.go @@ -15,7 +15,7 @@ import ( func dataSourceAppOauth() *schema.Resource { return &schema.Resource{ ReadContext: dataSourceAppOauthRead, - Schema: map[string]*schema.Schema{ + Schema: buildSchema(skipUsersAndGroupsSchema, map[string]*schema.Schema{ "id": { Type: schema.TypeString, Optional: true, @@ -140,7 +140,7 @@ func dataSourceAppOauth() *schema.Resource { Computed: true, Description: "Indicates if the client is allowed to use wildcard matching of redirect_uris", }, - }, + }), } } diff --git a/okta/data_source_okta_app_saml.go b/okta/data_source_okta_app_saml.go index adc9aa6d2..b4e007dee 100644 --- a/okta/data_source_okta_app_saml.go +++ b/okta/data_source_okta_app_saml.go @@ -15,7 +15,7 @@ import ( func dataSourceAppSaml() *schema.Resource { return &schema.Resource{ ReadContext: dataSourceAppSamlRead, - Schema: map[string]*schema.Schema{ + Schema: buildSchema(skipUsersAndGroupsSchema, map[string]*schema.Schema{ "id": { Type: schema.TypeString, Optional: true, @@ -279,7 +279,7 @@ func dataSourceAppSaml() *schema.Resource { Computed: true, Description: "SAML Signed Request enabled", }, - }, + }), } } diff --git a/okta/resource_okta_group.go b/okta/resource_okta_group.go index 06e906a94..661dece9b 100644 --- a/okta/resource_okta_group.go +++ b/okta/resource_okta_group.go @@ -46,6 +46,13 @@ func resourceGroup() *schema.Resource { Optional: true, Description: "Group description", }, + "skip_users": { + Type: schema.TypeBool, + Optional: true, + Description: "Ignore users sync. This is a temporary solution until 'users' field is supported in all the app-like resources", + Default: false, + Deprecated: "Because users has been removed, this attribute is a no op and will be removed", + }, "custom_profile_attributes": { Type: schema.TypeString, Optional: true, diff --git a/okta/resource_okta_policy_rule_idp_discovery_test.go b/okta/resource_okta_policy_rule_idp_discovery_test.go index 7a26c1013..3d6b2b341 100644 --- a/okta/resource_okta_policy_rule_idp_discovery_test.go +++ b/okta/resource_okta_policy_rule_idp_discovery_test.go @@ -7,7 +7,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" ) -// TODU func TestAccOktaPolicyRuleIdpDiscovery_crud(t *testing.T) { mgr := newFixtureManager(policyRuleIdpDiscovery, t.Name()) config := mgr.GetFixtures("basic.tf", t) diff --git a/okta/resource_okta_user.go b/okta/resource_okta_user.go index 16f8568fb..2eca718ee 100644 --- a/okta/resource_okta_user.go +++ b/okta/resource_okta_user.go @@ -71,6 +71,13 @@ func resourceUser() *schema.Resource { }, }, Schema: map[string]*schema.Schema{ + "skip_roles": { + Type: schema.TypeBool, + Optional: true, + Default: false, + Description: "Do not populate user roles information (prevents additional API call)", + Deprecated: "Because admin_roles has been removed, this attribute is a no op and will be removed", + }, "city": { Type: schema.TypeString, Optional: true, diff --git a/okta/resource_okta_user_test.go b/okta/resource_okta_user_test.go index 77b8aba23..e3b306c50 100644 --- a/okta/resource_okta_user_test.go +++ b/okta/resource_okta_user_test.go @@ -15,7 +15,6 @@ import ( "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" ) -// TODU func TestAccOktaUser_customProfileAttributes(t *testing.T) { mgr := newFixtureManager(user, t.Name()) config := mgr.GetFixtures("custom_attributes.tf", t)