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

Fix peerdns attribute #110

Merged
merged 2 commits into from
Mar 25, 2023
Merged

Fix peerdns attribute #110

merged 2 commits into from
Mar 25, 2023

Conversation

joneshf
Copy link
Owner

@joneshf joneshf commented Mar 25, 2023

The way we setup peerdns isn't correct. We don't want to require both
that the proto be "dhcp" and "dhcpv6". That doesn't even make
sense. And the fact that we can say that makes even less sense.

In order to show the failure, we add a failing test. We then implement a
fix by adding a validator that disjoins multiple other validators. The
test is effectively what we want in reality, so it passing here should
give good confidence that we can do what we want.

It's unfortunate that we have to write this validator. Hopefully, it's
an oversight and not intentional. We don't want to maintain this
indefinitely. See
hashicorp/terraform-plugin-framework-validators#122
for the upstream issue.

The way we setup `peerdns` isn't correct. We don't want to require both
that the `proto` be `"dhcp"` and `"dhcpv6"`. That doesn't even make
sense. And the fact that we can say that makes even less sense.

In order to show the failure, we add a failing test. We'll fix this
shortly.
We have to implement this missing validator to disjoin multiple other
validators. Hopefully, that will go away soon.
@joneshf joneshf changed the title Failing peerdns test Fix peerdns attribute Mar 25, 2023
@joneshf joneshf merged commit b74c2e5 into main Mar 25, 2023
@joneshf joneshf deleted the joneshf/failing-peerdns-test branch March 25, 2023 16:17
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.

1 participant