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
258 stars 209 forks source link

Feature Request: okta_admin_role_custom data source #1523

Open sgal-dm opened 1 year ago

sgal-dm commented 1 year ago

Community Note

Description

Add a data source for the okta_admin_role_custom resource so custom role use can be decoupled from creation.

New or Affected Resource(s)

Potential Terraform Configuration

# New date source
data "okta_admin_role_custom" "my_role" {
  label = "MY_ROLE"
}

resource "okta_resource_set" "my_app" {
  label       = "My App Resources"
  description = "Resources associated with My App"
  resources   = [...]
}

resource "okta_group" "my_app_admins" {
  name        = "My App Admins"
  description = "Users with the My Role role for resources associated with My App."
}

resource "okta_admin_role_custom_assignments" "my_app_admins" {
  custom_role_id  = data.okta_admin_role_custom.my_role.id # << Consume new data source.
  members         = ["https://acme.okta.com/api/v1/groups${okta_group.my_app_admins.id}"]
  resource_set_id = okta_resource_set.my_app.id
}

References

monde commented 1 year ago

Thanks @sgal-dm , agreed, the data source for okta_admin_role_custom would be useful for the operator. We'll get this feature enhancement on to our backlog.

monde commented 1 year ago

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

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

tdekoning93 commented 1 year ago

Is there any ETA for this?