feat: add data sources github_actions_remove_token and github_actions_organization_remove_token #2702
feat: add data sources github_actions_remove_token and github_actions_organization_remove_token #2702dankress wants to merge 15 commits into
Conversation
There was a problem hiding this comment.
Thanks for your contribution, @dankress!
Please review the errors from the automatic checks; some can be fixed with go fmt, and there's another issue related to the use of fmt.Errorf. I will do a second review after these are resolved.
EDIT: I'm fixing the issues myself to release this PR this week.
Add github_actions_remove_token data source to retrieve remove tokens for GitHub Actions runners. The data source provides token and expiration time fields for managing runner removal operations.
…st repositories to avoid drift, as vuln alerts are automatically activated for newly created repositories
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com> Right aligning Signed-off-by: Diogenes Fernandes <diofeher@gmail.com> fmt issues Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
574bdca to
25fbc95
Compare
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
diofeher
left a comment
There was a problem hiding this comment.
Following the convention of creating tokens in data sources (as data_source_github_actions_registration_token and data_source_github_app_token), I think it's good to have this one creating tokens as well. Another possibility would be using this one as an ephemeral resource.
|
Thanks for the submission @dankress! We'll be holding this PR for the next v7 release. We will release this one as an ephemeral resource. |
|
Great to see my contribution being put to use, looking forward to the release! |
Resolves #2696
Before the change?
github_actions_remove_tokendidn't existgithub_actions_organization_remove_tokendidn't existgithub_actions_registration_tokendoes not work, because for new repo creationvulnerability_alertsis automatically activated, which is not reflected in tests, leading to immediate driftAfter the change?
github_actions_remove_tokenlets you create a self-hosted runner remove token at the repository levelgithub_actions_organization_remove_tokenlets you create a self-hosted runner remove token at the organization levelgithub_actions_remove_tokenandgithub_actions_organization_remove_tokensimilar to tests forgithub_actions_registration_tokenandgithub_actions_organization_registration_tokengithub_actions_registration_token, by registering of test repo with activated vulnerability alertsgithub_actions_registration_tokenandgithub_actions_organization_registration_tokenPull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!