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

cidrnetmask() should error with IPv6 #30680

Closed
laurapacilio opened this issue Mar 15, 2022 · 1 comment · Fixed by #30703
Closed

cidrnetmask() should error with IPv6 #30680

laurapacilio opened this issue Mar 15, 2022 · 1 comment · Fixed by #30703

Comments

@laurapacilio
Copy link
Contributor

laurapacilio commented Mar 15, 2022

Our documentation says that cidrnetmask() only works with IPv4. But a user tried using it with can(cidrnetmask()) and found out that it doesn't actually error with IPv6. For either IPv4 or IPv6, it returns a netmask.

It is technically invalid to create a netmask for IPv6, so we should correct the behavior of this function to return an error as promised.

Terraform Version

Terraform v1.1.7

Expected Behavior

cidrnetmask() should produce an error when trying to create a netmask for IPv6.

Actual Behavior

A user found that for either IPv4 or IPv6, cidrnetmask() returns a netmask.

References

PR where user found this issue and provides additional context: #30660

@laurapacilio laurapacilio added bug new new issue not yet triaged labels Mar 15, 2022
@kmoe kmoe added good first issue and removed new new issue not yet triaged labels Mar 18, 2022
@github-actions
Copy link
Contributor

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 25, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants