-
Notifications
You must be signed in to change notification settings - Fork 905
feat: add data sources github_actions_remove_token and github_actions_organization_remove_token #2702
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
base: main
Are you sure you want to change the base?
feat: add data sources github_actions_remove_token and github_actions_organization_remove_token #2702
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
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!