Merge pull request #3091 from berendt/openstack_subnet_ip_default
provider/openstack: use '4' as default for ip_version of subnet
This commit is contained in:
commit
cc2b3677e6
|
@ -69,7 +69,8 @@ func resourceNetworkingSubnetV2() *schema.Resource {
|
||||||
},
|
},
|
||||||
"ip_version": &schema.Schema{
|
"ip_version": &schema.Schema{
|
||||||
Type: schema.TypeInt,
|
Type: schema.TypeInt,
|
||||||
Required: true,
|
Optional: true,
|
||||||
|
Default: 4,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
},
|
},
|
||||||
"enable_dhcp": &schema.Schema{
|
"enable_dhcp": &schema.Schema{
|
||||||
|
|
|
@ -99,7 +99,6 @@ var testAccNetworkingV2Subnet_basic = fmt.Sprintf(`
|
||||||
region = "%s"
|
region = "%s"
|
||||||
network_id = "${openstack_networking_network_v2.network_1.id}"
|
network_id = "${openstack_networking_network_v2.network_1.id}"
|
||||||
cidr = "192.168.199.0/24"
|
cidr = "192.168.199.0/24"
|
||||||
ip_version = 4
|
|
||||||
}`, OS_REGION_NAME, OS_REGION_NAME)
|
}`, OS_REGION_NAME, OS_REGION_NAME)
|
||||||
|
|
||||||
var testAccNetworkingV2Subnet_update = fmt.Sprintf(`
|
var testAccNetworkingV2Subnet_update = fmt.Sprintf(`
|
||||||
|
@ -114,6 +113,5 @@ var testAccNetworkingV2Subnet_update = fmt.Sprintf(`
|
||||||
name = "tf-test-subnet"
|
name = "tf-test-subnet"
|
||||||
network_id = "${openstack_networking_network_v2.network_1.id}"
|
network_id = "${openstack_networking_network_v2.network_1.id}"
|
||||||
cidr = "192.168.199.0/24"
|
cidr = "192.168.199.0/24"
|
||||||
ip_version = 4
|
|
||||||
gateway_ip = "192.168.199.1"
|
gateway_ip = "192.168.199.1"
|
||||||
}`, OS_REGION_NAME, OS_REGION_NAME)
|
}`, OS_REGION_NAME, OS_REGION_NAME)
|
||||||
|
|
|
@ -21,7 +21,6 @@ resource "openstack_networking_network_v2" "network_1" {
|
||||||
resource "openstack_networking_subnet_v2" "subnet_1" {
|
resource "openstack_networking_subnet_v2" "subnet_1" {
|
||||||
network_id = "${openstack_networking_network_v2.network_1.id}"
|
network_id = "${openstack_networking_network_v2.network_1.id}"
|
||||||
cidr = "192.168.199.0/24"
|
cidr = "192.168.199.0/24"
|
||||||
ip_version = 4
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -40,7 +39,7 @@ The following arguments are supported:
|
||||||
* `cidr` - (Required) CIDR representing IP range for this subnet, based on IP
|
* `cidr` - (Required) CIDR representing IP range for this subnet, based on IP
|
||||||
version. Changing this creates a new subnet.
|
version. Changing this creates a new subnet.
|
||||||
|
|
||||||
* `ip_version` - (Required) IP version, either 4 or 6. Changing this creates a
|
* `ip_version` - (Optional) IP version, either 4 (default) or 6. Changing this creates a
|
||||||
new subnet.
|
new subnet.
|
||||||
|
|
||||||
* `name` - (Optional) The name of the subnet. Changing this updates the name of
|
* `name` - (Optional) The name of the subnet. Changing this updates the name of
|
||||||
|
|
Loading…
Reference in New Issue