forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
virtualnetwork: allow address_prefix to be null
The azure subnet resource allows for multiple address prefixes using the address_prefixes argument. The virtual network resource allows inline subnets, but does not currently support this argument. When the address_prefixes argument is used, address_prefix will be null when terraform refreshes its state causing terraform to panic. This code updates the virtual network resource to allow address_prefixes to be used and for address_prefix to be null. Tests have been added to test the multiple prefixes. The magic number in the new tests is the same magic number used in the other VNet tests. I'm not 100% clear on this number, but it appears to be a known ID. It's origin is documented (not very well) here: hashicorp#1913 This fix addresses the following bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1805251 https://bugzilla.redhat.com/show_bug.cgi?id=1808973 https://bugzilla.redhat.com/show_bug.cgi?id=1805936 https://bugzilla.redhat.com/show_bug.cgi?id=1808969
- Loading branch information
Showing
3 changed files
with
149 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters