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

Update organization security manager resource to use operations that are not deprecated #2533

Merged
merged 3 commits into from
Jan 13, 2025

Conversation

just-joshing
Copy link
Contributor

@just-joshing just-joshing commented Jan 10, 2025

Resolves #2534


As of December 10, 2024 the GitHub organization security manager REST APIs are deprecated in favor of the organization roles REST APIs. You may read more about this change at https://gh.io/security-managers-rest-api-sunset.

This PR updates the organization security manager resource to use the organization roles REST APIs and adds an example for how to use the resource.

Before the change?

  • The organization security manager resource use the deprecated GitHub client operations.

After the change?

  • The organization security manager resource now uses the non-deprecated GitHub client operations.

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
    • I didn't see a need to update the existing tests for these changes. I'm adding an example that I used to validate the changes.
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes
  • No

@just-joshing just-joshing changed the title Change how the organization security manager resource uses the GitHub… Update organization security manager resources to use operations that are not deprecated Jan 10, 2025
@just-joshing just-joshing marked this pull request as ready for review January 10, 2025 23:32
@@ -81,7 +81,7 @@ Setting a `processId` of 0 allows a dropdown to select the process of the provid

0. Add a sleep call (e.g. `time.Sleep(10 * time.Second)`) in the [`func providerConfigure(p *schema.Provider) schema.ConfigureFunc`](https://github.com/integrations/terraform-provider-github/blob/cec7e175c50bb091feecdc96ba117067c35ee351/github/provider.go#L274C1-L274C64) before the immediate `return` call. This will allow time to connect the debugger while the provider is initializing, before any critical logic happens.

0. Build the terraform provider with debug flags enabled and copy it to the appropriate bin folder with a command like `go build -gcflags="all=-N -l" -o ~/go/bin`.
0. Build the terraform provider with debug flags enabled and copy it to the appropriate bin folder with a command like `go build -gcflags="all=-N -l" -o ~/go/bin/`.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To reviewers:

Without the trailing slash, this command creates a binary called bin in the ~/go/ directory. With the trailing slash, the command correctly creates a binary called terraform-provider-github in the ~/go/bin/ directory.

@just-joshing just-joshing changed the title Update organization security manager resources to use operations that are not deprecated Update organization security manager resource to use operations that are not deprecated Jan 11, 2025
Copy link
Member

@kfcampbell kfcampbell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@kfcampbell kfcampbell merged commit dead927 into integrations:main Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[MAINT]: Update the Organization Security Manager resources off of deprecated APIs
2 participants