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

making bind_name optional when bind_type is management #330

Merged
merged 3 commits into from
Jun 6, 2023

Conversation

regner
Copy link
Contributor

@regner regner commented Jun 5, 2023

When creating a ACL binding rule, the bind name must not be defined but only when the bind_type is set to management.

https://developer.hashicorp.com/nomad/docs/commands/acl/binding-rule/create

Fixes #324

Copy link

@pkazmierczak pkazmierczak left a comment

Choose a reason for hiding this comment

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

Hey @regner, thanks for the PR!
LGTM!

Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

Minor nit-picking in the validation check, but not a blocker. Thanks for fixing this! 🙂

nomad/resource_acl_binding_rule.go Outdated Show resolved Hide resolved
@regner
Copy link
Contributor Author

regner commented Jun 5, 2023

Adjusted the validateNomadACLBindingRule formatting based on @lgfa29 feedback. I am definitely not used to reaching for switch statements so they don't come to my mind first, and I personally find it a bit harder to read, but I think that's just because I so rarely use them.

Thank you for the suggestion. I can definitely see how it would be easier to read once I train my brain a bit more.

@lgfa29 lgfa29 merged commit 8d2ea28 into hashicorp:main Jun 6, 2023
1 check passed
@regner regner deleted the fix-acl-binding-rule branch June 6, 2023 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

nomad_acl_binding_rule requires bind_name when it should not
3 participants