okta / terraform-provider-okta

A Terraform provider to manage Okta resources, enabling infrastructure-as-code provisioning and management of users, groups, applications, and other Okta objects.
https://registry.terraform.io/providers/okta/okta
Mozilla Public License 2.0
257 stars 208 forks source link

Feature Req: Add support for dynamic IdP routing rules #1531

Open sgal-dm opened 1 year ago

sgal-dm commented 1 year ago

Community Note

Description

Add support for dynamic IdP routing rules. The existing behavior is the provider can only manage specific IdP routing rules, it doesn't appear to monitor the API attributes involved in specifying specific vs dynamic, as a rule can be manually changed to dynamic in the admin console without those changes showing up on plan/apply operations.

New or Affected Resource(s)

Potential Terraform Configuration

data "okta_policy" "idp_discovery_policy" {
  name = "Idp Discovery Policy"
  type = "IDP_DISCOVERY"
}

resource "okta_policy_rule_idp_discovery" "example" {
  policy_id                 = data.okta_policy.idp_discovery_policy.id
  name                      = "Select IdP by login domain"
  selection_type            = "DYNAMIC"
  provider_expression       = "login.identifier.substringAfter('@')" 
  network_connection        = "ANYWHERE"
  priority                  = 1
  status                    = "ACTIVE"
  user_identifier_type      = "ATTRIBUTE"
  user_identifier_attribute = "company"
  user_identifier_patterns {
    match_type = "EQUALS"
    value      = "ACME"
  }

References

monde commented 1 year ago

Thanks @sgal-dm . We'll have to investigate and prioritize this onto our 4.1 and/or 5.0 release plans. Okta internal reference: https://oktainc.atlassian.net/browse/OKTA-601942

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

sgal-dm commented 1 year ago

Not stale.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

sgal-dm commented 1 year ago

Not stale

duytiennguyen-okta commented 11 months ago

@sgal-dm I have the PR ready but it will be a breaking change so it will have to wait for v5

sgal-dm commented 11 months ago

Awesome thanks for the update and the work @duytiennguyen-okta!