-
Notifications
You must be signed in to change notification settings - Fork 320
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
Allow full_path
in addition to id
in gitlab_project data source
#532
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 the contribution. A better fix would be to change the type for id
into string
in the resource schema (this is a backward compatible change) and update the documentation to mention that id can be an int or string. I don't think full_path
is the standard name for this field in the GitLab API, nor is it used anywhere else in this plugin.
It's used here: terraform-provider-gitlab/gitlab/data_source_gitlab_group.go Lines 23 to 30 in f821d59
|
Ahh, good point. However, I would still rather stick to the official GitLab API field names, as I see this as API debt. See the API fields names for GET Project: https://docs.gitlab.com/ee/api/projects.html#get-single-project See the HashiCorp guidance on this subject: https://www.terraform.io/docs/extend/hashicorp-provider-design-principles.html#resource-and-attribute-schema-should-closely-match-the-underlying-api |
OK, I'll change the type of |
Yep, going from int -> string is fine. Terraform will update the type in the state on the next apply, and users can even continue to set this field to a number in their config. |
@armsnyder Done in 55a5f54. |
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.
Great! One final note.
Fixes #140. Signed-off-by: Sune Keller <[email protected]>
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!
Fixes #140.