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

azurerm_public_ip_prefix: Update prefix_length validation to accept all valid IPv4 address ranges #6589

Merged
merged 5 commits into from
Apr 23, 2020

Conversation

WodansSon
Copy link
Collaborator

@WodansSon WodansSon commented Apr 23, 2020

Feb 11, 2020 there was a change to the resource to restrict the range to be between 28 and 31 due to the product documentation which states that by default /28 is the maximum limit, however also in the documentation it states that you should contact customer support to change the default limit of /28.

Since there is no way for terraform to know the approved range for a given subscription I have opened up the validation to check that the passed value is between 0 and 31, which should cover all possible IPv4 scenarios.

@WodansSon WodansSon added this to the v2.7.0 milestone Apr 23, 2020
@WodansSon WodansSon requested a review from katbyte April 23, 2020 01:16
@ghost ghost added the size/XS label Apr 23, 2020
@ghost ghost added the documentation label Apr 23, 2020
@ghost ghost added size/S and removed size/XS labels Apr 23, 2020
@ghost ghost added size/M and removed size/S labels Apr 23, 2020
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@WodansSon
Copy link
Collaborator Author

New test failed as expected due to subscription public ip limits
image

@WodansSon WodansSon merged commit 43f7b03 into master Apr 23, 2020
@WodansSon WodansSon deleted the fr_ip_range branch April 23, 2020 05:12
WodansSon added a commit that referenced this pull request Apr 23, 2020
@ghost
Copy link

ghost commented Apr 23, 2020

This has been released in version 2.7.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 2.7.0"
}
# ... other configuration ...

neil-yechenwei pushed a commit to neil-yechenwei/terraform-provider-azurerm that referenced this pull request Apr 26, 2020
…pt all valid IPv4 address ranges (hashicorp#6589)

* Update prefix length validation

* Updated documentation for new ranges

* Add test and change upper limit to 31

* Update error msgs to be go compliant

* Add note to test case about subscription config
neil-yechenwei pushed a commit to neil-yechenwei/terraform-provider-azurerm that referenced this pull request Apr 26, 2020
@ghost
Copy link

ghost commented May 23, 2020

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants