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

Added gitlab_project_tag as a resource and data source #910

Merged
merged 3 commits into from
Mar 7, 2022
Merged

Added gitlab_project_tag as a resource and data source #910

merged 3 commits into from
Mar 7, 2022

Conversation

Moon1706
Copy link
Contributor

@Moon1706 Moon1706 commented Mar 2, 2022

Description

Add resource for creation and management Gitlab tags.

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.)

@github-actions github-actions bot added data-source Adds or modifies a data-source documentation provider resource Adds or modifies a resource tests size/L labels Mar 2, 2022
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 contribution. In general it looks good, I've placed a few things here and there.

Regarding the naming: we usually call resources / data sources belonging to a project like gitlab_project_*. Therefore, maybe this should be called gitlab_project_tag.
@armsnyder what do you think? However, there is also gitlab_tag_protection resource not following this pattern. So, it's not a show stopper calling it gitlab_tag - just to make the decision deliberately ..

internal/provider/resource_gitlab_tag.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_tag.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_tag.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_tag.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_tag.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_tag_test.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_tag_test.go Outdated Show resolved Hide resolved
internal/provider/data_source_gitlab_tag_test.go Outdated Show resolved Hide resolved
internal/provider/data_source_gitlab_tag.go Outdated Show resolved Hide resolved
internal/provider/data_source_gitlab_tag.go Outdated Show resolved Hide resolved
@Moon1706
Copy link
Contributor Author

Moon1706 commented Mar 4, 2022

@timofurrer Check, please. Maybe I forget something.

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.

Looks pretty good, one small things regarding the docs.

internal/provider/resource_gitlab_tag.go Outdated Show resolved Hide resolved
internal/provider/resource_gitlab_tag.go Outdated Show resolved Hide resolved
@github-actions github-actions bot added the merge-conflict PR cannot be merged due to a merge conflict label Mar 5, 2022
@github-actions
Copy link

github-actions bot commented Mar 5, 2022

This pull request has merge conflicts. Please rebase your branch onto main.

@timofurrer timofurrer added this to the v3.12.0 milestone Mar 5, 2022
@armsnyder
Copy link
Collaborator

armsnyder commented Mar 6, 2022

Yes, please rename this resource to gitlab_project_tag. It's best if we name the resources similarly to the API path, in order to avoid naming collisions.

@Moon1706 Moon1706 changed the title Added gitlab_tag as a resource and data source Added gitlab_project_tag as a resource and data source Mar 6, 2022
@github-actions github-actions bot removed the merge-conflict PR cannot be merged due to a merge conflict label Mar 6, 2022
@github-actions
Copy link

github-actions bot commented Mar 6, 2022

Conflicts are resolved. Thank you! 😀

@Moon1706
Copy link
Contributor Author

Moon1706 commented Mar 6, 2022

@armsnyder Done

@timofurrer timofurrer self-requested a review March 6, 2022 10:02
timofurrer
timofurrer previously approved these changes Mar 6, 2022
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.

I've addressed my own comments quickly.

I think this is ready for a merge 🎉

Thanks @Moon1705!

@timofurrer timofurrer merged commit 8612bf7 into gitlabhq:main Mar 7, 2022
@github-actions
Copy link

github-actions bot commented Mar 8, 2022

This functionality has been released in v3.12.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.
Labels
data-source Adds or modifies a data-source dependencies documentation provider resource Adds or modifies a resource size/L tests
Development

Successfully merging this pull request may close these issues.

4 participants