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 for deleting an enterprise organization #1669

Merged
merged 2 commits into from
May 1, 2023

Conversation

tjcorr
Copy link
Contributor

@tjcorr tjcorr commented Apr 26, 2023

With the new addition of a rest API to delete organizations within a GitHub Enterprise (see changelog and go sdk) this PR adds support to delete a github_enterprise_organization.

Resolves #872


Behavior

Before the change?

Previously organizations had be deleted through the GitHub UI and then remove from the state file manually using terraform state rm.

After the change?

Organizations can be removed with a terraform destroy.

Other information


Additional info

Pull request checklist

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
  • Added the appropriate label for the given change

Does this introduce a breaking change?

Please see our docs on breaking changes to help!

  • Yes (Please add the Type: Breaking change label)
  • No

If Yes, what's the impact:

  • N/A

Pull request type

Please add the corresponding label for change this PR introduces:

  • Bugfix: Type: Bug
  • Feature/model/API additions: Type: Feature
  • Updates to docs or samples: Type: Documentation
  • Dependencies/code cleanup: Type: Maintenance

@tjcorr
Copy link
Contributor Author

tjcorr commented Apr 26, 2023

Note: I did write a test that exercises the full lifecycle of an enterprise organization and ran it successfully locally. I don't believe the CI jobs test out the enterprise functionality though. This might require @kfcampbell or another maintainer to update the PAT used in the tests to have enterprise admin permissions. I wasn't sure how you would want to handle that.

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.

Integration tests are passing for me locally as well. You are correct that integration tests are not exercised on CI, which is obnoxious and unfortunate. #1414 contains a little bit more information about this situation.

@kfcampbell kfcampbell merged commit 872e253 into integrations:main May 1, 2023
3 checks passed
avidspartan1 pushed a commit to avidspartan1/terraform-provider-github that referenced this pull request Feb 5, 2024
Co-authored-by: Keegan Campbell <me@kfcampbell.com>
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.

Manage Github organization
2 participants