Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support cases to okta_resource_set #2006

Open
steveAG opened this issue Jun 11, 2024 · 2 comments
Open

Add support cases to okta_resource_set #2006

steveAG opened this issue Jun 11, 2024 · 2 comments
Labels
enhancement Asking for new behavior or feature triaged Triaged into internal Jira

Comments

@steveAG
Copy link
Contributor

steveAG commented Jun 11, 2024

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

This one is blocked by an API limitation, the recent changes to support access require a resource set to be created that grants an admin with the okta.support.cases.manage permission access to create and manage support cases, as documented here.

This can be done in the UI, and a custom role that grants the permission can be managed with the provider, but the resource set cannot be managed with the API, or by extension the provider.

New or Affected Resource(s)

  • okta_resource_set

Potential Terraform Configuration

resource "okta_resource_set" "owned_support_cases" {
  label       = "Support - Owned Support Cases"
  description = "All Okta support cases owned by this user"
  resources = [<Whatever the resource identifier looks like>]
}

Current API response for a resource set that includes cases:

{
    "id": "<ID>",
    "label": "Support - Owned Support Cases",
    "description": "All Okta support cases owned by this user",
    "created": "2024-06-11T18:46:19.000Z",
    "lastUpdated": "2024-06-11T18:46:19.000Z",
    "_links": {
        "bindings": {
            "href": "<Self Link>/bindings"
        },
        "self": {
            "href": "<Self Link>"
        },
        "resources": {
            "href": "<Self Link>/resources"
        }
    }
}

References

@steveAG steveAG added the enhancement Asking for new behavior or feature label Jun 11, 2024
@exitcode0
Copy link
Contributor

Something like this should work for you
you might still run into this other reported bug #1991

data "okta_org_metadata" "_" {}
locals {
  org_uri        = data.okta_org_metadata._.domains["organization"]
  org_url        = replace(local.org_uri, "https://", "")
  orn_prefix       = "orn:${local.org_url_1}"
  okta_instance_id = data.okta_org_metadata._.id
}
resource "okta_resource_set" "support_cases" {
  label       = "Support Cases"
  description = "Support Cases"
  resources = [
    "${local.orn_prefix}:support:${local.okta_instance_id}:cases"
  ]
}

@duytiennguyen-okta duytiennguyen-okta added the triaged Triaged into internal Jira label Jun 18, 2024
@duytiennguyen-okta
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Asking for new behavior or feature triaged Triaged into internal Jira
Projects
None yet
Development

No branches or pull requests

3 participants