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 gitlab_runner Resource #1049

Merged
merged 4 commits into from
May 8, 2022
Merged

Add gitlab_runner Resource #1049

merged 4 commits into from
May 8, 2022

Conversation

RicePatrick
Copy link
Collaborator

@RicePatrick RicePatrick commented Apr 30, 2022

Description

This PR adds support for registering runners using a gitlab_runner resource.

Closes #49

PR Checklist Acknowledgement

  • I acknowledge that all of the following items are true, where applicable:
    • Resource attributes match 1:1 the names and structure of the API resource in the GitLab API documentation.
    • Examples are updated with:
      • A *.tf file for the resource/s with at least one usage example
      • A *.sh file for the resource/s with an import example (if applicable)
    • New resources have at minimum a basic test with three steps:
      • Create the resource
      • Update the attributes
      • Import the resource
    • No new //lintignore comments were copied from existing code. (Linter rules are meant to be enforced on new code.)

@RicePatrick
Copy link
Collaborator Author

unfortunately, there are a couple new lintignore issues since there are boolean values here which require the use of GetOkExists, which is a deprecated method ☹️

@RicePatrick RicePatrick self-assigned this Apr 30, 2022
@RicePatrick
Copy link
Collaborator Author

@armsnyder | @timofurrer - This is ready for review/merger.

@timofurrer timofurrer self-requested a review May 1, 2022 14:02
Copy link
Member

@timofurrer timofurrer left a comment

Choose a reason for hiding this comment

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

@PatrickRice-KSC looks pretty solid already, thanks!

There are a few copy & paste mistakes, nitpicks / styling stuff and other minor things.

Regarding the GetOkExists() - that's not a problem at all - IMHO it's still the best option we have with the current SDK and there will be a replacement before they delete it, thus all good.

Back to you 🏓

internal/provider/resource_gitlab_runner.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_runner.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_runner.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_runner.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_runner.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_runner.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_runner.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_runner_test.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_runner_test.go Outdated Show resolved Hide resolved
@RicePatrick RicePatrick mentioned this pull request May 4, 2022
1 task
@timofurrer timofurrer added this to the v3.15.0 milestone May 4, 2022
@RicePatrick RicePatrick requested a review from timofurrer May 7, 2022 00:59
Copy link
Member

@timofurrer timofurrer left a comment

Choose a reason for hiding this comment

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

Thanks for the good work @PatrickRice-KSC once again!

LGTM 🎉

@timofurrer timofurrer merged commit d19ee24 into gitlabhq:main May 8, 2022
@RicePatrick RicePatrick deleted the add-gitlab-runner-resource branch May 9, 2022 02:06
@github-actions
Copy link

This functionality has been released in v3.15.0 of the Terraform GitLab Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue. Thank you!

@github-actions github-actions bot locked and limited conversation to collaborators Nov 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

3 participants