terraform-provider-okta icon indicating copy to clipboard operation
terraform-provider-okta copied to clipboard

New DataSource - Policy Simulation Operations

Open exitcode0 opened this issue 1 year ago • 1 comments

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

Having a data source for the policy-simulation-operations APIs could be valuable to the provider

The first uses-cases that comes to mind is for smoke-testing policy changes by testing if a given user can still do something simple like accessing a given application The second use-case that comes to mind is the new testing features released in terraform v1.6.0 though I don't yet have a use-case for this just yet

New or Affected Resource(s)

  • okta_???

Potential Terraform Configuration

data "okta_policy_simulation" "exmaple" {
    policy_types = [
        "OKTA_SIGN_ON",
        "MFA_ENROLL",
    ]
    app_instance = "<AppID1>"
    users = [
        "<UserID1>",
    ]
    groups = [
        "<GroupID1>", 
        "<GroupID2>",
    ]
    risk_level = "LOW"
    zone_ids = [
        "<ZoneID1>",
    ]
    device {
        platform = "IOS"
        registered = true
        managed = true
    }

    depends_on = [
        okta_policy.example,
        okta_policy.example2,
    ]
}

References

exitcode0 avatar Jan 30 '24 13:01 exitcode0

OKTA internal reference https://oktainc.atlassian.net/browse/OKTA-690463

duytiennguyen-okta avatar Jan 30 '24 16:01 duytiennguyen-okta