Skip to content

[DOCS]: how to grant security admin role with role_team #2981

Closed

Description

@KyriosGN0

Describe the need

when using the latest version of the provider, we get the deprecation warning for the github_organization_security_manager resource, which states that we should move to the github_organization_role_team resource, when using github enterprise cloud, i don't have anyway to get the role id of the security manager role, which means i can't migrate

SDK Version

No response

API Version

No response

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

  1. added
    Type: Documentation
    Status: Triage
    on Dec 8, 2025
  2. github-actions commented on Dec 8, 2025

    @github-actions

    👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labeled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀

  3. stevehipwell commented on Dec 8, 2025

    @stevehipwell
    Collaborator

    @KyriosGN0 can't you use the github_organization_roles data source? Also I'm not sure if this is documented anywhere, but AFAIK the role ID for the security manager is always 138.

  4. removed
    Status: Triage
    on Dec 8, 2025
  5. self-assigned this
    on Dec 8, 2025
  6. KyriosGN0 commented on Dec 14, 2025

    @KyriosGN0
    ContributorAuthor

    @stevehipwell the problem is that it returns a list of roles, so i basically need to use a magic number (index in the list) to get the security_manager role.

  7. stevehipwell commented on Dec 14, 2025

    @stevehipwell
    Collaborator

    @KyriosGN0 as I already said, the ID is magic (that's how the old deprecated API worked). But as long as you know the name you can get the ID by iteration instead.

    security_manager_id = one([for x in data.github_organization_roles.default : x.role_id if x.name == "Security Manager"][*])
  8. KyriosGN0 commented on Dec 14, 2025

    @KyriosGN0
    ContributorAuthor

    @KyriosGN0 as I already said, the ID is magic (that's how the old deprecated API worked). But as long as you know the name you can get the ID by iteration instead.

    security_manager_id = one([for x in data.github_organization_roles.default : x.role_id if x.name == "Security Manager"][*])

    imho this is bad UX, would it be possible to keep those resources ? (as they nicely abstract logic end users have no why to figure out)
    alternatively I think that adding this code to the docs is also acceptable experience for people upgrading to newer version

  9. stevehipwell commented on Dec 31, 2025

    @stevehipwell
    Collaborator

    @KyriosGN0 Keping the resources would add additional complexity and require additonal maintenance; given that this pattern doesn't scale I can't see a benefit for doing this. We'd be verry happy to accept a PR to improve the docs and may be able to provide a pattern to help with lookups in the future.

  10. KyriosGN0 commented on Dec 31, 2025

    @KyriosGN0
    ContributorAuthor

    @KyriosGN0 Keping the resources would add additional complexity and require additonal maintenance; given that this pattern doesn't scale I can't see a benefit for doing this. We'd be verry happy to accept a PR to improve the docs and may be able to provide a pattern to help with lookups in the future.

    No probs, i will submit a docs PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type: Documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions