diff --git a/internal/services/conditionalaccess/conditional_access_policy_resource.go b/internal/services/conditionalaccess/conditional_access_policy_resource.go index 2d8b29f36..16dd71f81 100644 --- a/internal/services/conditionalaccess/conditional_access_policy_resource.go +++ b/internal/services/conditionalaccess/conditional_access_policy_resource.go @@ -77,7 +77,7 @@ func conditionalAccessPolicyResource() *pluginsdk.Resource { "included_applications": { Type: pluginsdk.TypeList, Optional: true, - ExactlyOneOf: []string{"conditions.0.applications.0.included_applications", "conditions.0.applications.0.included_user_actions"}, + ExactlyOneOf: []string{"conditions.0.applications.0.included_applications", "conditions.0.applications.0.included_user_actions", "conditions.0.applications.0.filter"}, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, ValidateDiagFunc: validation.ValidateDiag(validation.StringIsNotEmpty), @@ -96,7 +96,7 @@ func conditionalAccessPolicyResource() *pluginsdk.Resource { "included_user_actions": { Type: pluginsdk.TypeList, Optional: true, - ExactlyOneOf: []string{"conditions.0.applications.0.included_applications", "conditions.0.applications.0.included_user_actions"}, + ExactlyOneOf: []string{"conditions.0.applications.0.included_applications", "conditions.0.applications.0.included_user_actions", "conditions.0.applications.0.filter"}, Elem: &pluginsdk.Schema{ Type: pluginsdk.TypeString, ValidateDiagFunc: validation.ValidateDiag(validation.StringIsNotEmpty), @@ -104,9 +104,10 @@ func conditionalAccessPolicyResource() *pluginsdk.Resource { }, "filter": { - Type: pluginsdk.TypeList, - Optional: true, - MaxItems: 1, + Type: pluginsdk.TypeList, + Optional: true, + ExactlyOneOf: []string{"conditions.0.applications.0.included_applications", "conditions.0.applications.0.included_user_actions", "conditions.0.applications.0.filter"}, + MaxItems: 1, Elem: &pluginsdk.Resource{ Schema: map[string]*pluginsdk.Schema{ "mode": {