-
Notifications
You must be signed in to change notification settings - Fork 903
feat: add organization custom property resource #2661
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
feat: add organization custom property resource #2661
Conversation
| "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
| ) | ||
|
|
||
| func TestAccGithubOrganizationCustomProperty_CustomizeDiff_Validations(t *testing.T) { |
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.
Have you run these tests? They do not pass for me. Example errors:
Error: default_value must contain zero or one item when type is SINGLE_SELECT or STRING
with github_organization_custom_property.test,
on terraform_plugin_test.tf line 3, in resource "github_organization_custom_property" "test":
3: resource "github_organization_custom_property" "test" {
Error: default_value must be a subset of allowed_values
with github_organization_custom_property.test,
on terraform_plugin_test.tf line 3, in resource "github_organization_custom_property" "test":
3: resource "github_organization_custom_property" "test" {
| Error: default_value must be either "true" or "false" when type is TRUE_FALSE
|
| with github_organization_custom_property.test,
| on terraform_plugin_test.tf line 3, in resource "github_organization_custom_property" "test":
| 3: resource "github_organization_custom_property" "test" {
|
|
@nickfloyd I think this might be a duplicate of: https://github.com/integrations/terraform-provider-github/blob/main/github/resource_github_organization_custom_properties.go |
@deiga It looks like you're correct. It's unfortunate that the implemented one uses the plural naming scheme. The general pattern has been to use plural on collections and singular on single resource operations. For instance, repository collaborators (single, collection) implements this approach. I missed this one because we already had a plural named - single implementation 😬. Thats another thing that needs documentation - how to properly handle single operations verses plural ones. I'm closing this and have added an issue to address this. @oscarbc96 if you feel like this has been closed in error please @ me here an we can discuss. Thank you for the work you put in here. |
Resolves #ISSUE_NUMBER
Before the change?
github_organization_custom_propertyresource did not exist.After the change?
github_organization_custom_propertyresource.CustomizeDiffto ensure consistent and correct configurations.default_valueto be a string, list, or null depending on the property type.Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!