mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-09 23:54:17 -06:00
provider/openstack: gophercloud migration: fixing dhcp and gateway configuration
This commit is contained in:
parent
1c6b69e342
commit
17b1787ec2
@ -155,11 +155,14 @@ func resourceNetworkingSubnetV2Create(d *schema.ResourceData, meta interface{})
|
||||
createOpts.GatewayIP = &gatewayIP
|
||||
}
|
||||
|
||||
if v, ok := d.GetOk("enable_dhcp"); ok {
|
||||
enableDHCP := v.(bool)
|
||||
createOpts.EnableDHCP = &enableDHCP
|
||||
if noGateway {
|
||||
disableGateway := ""
|
||||
createOpts.GatewayIP = &disableGateway
|
||||
}
|
||||
|
||||
enableDHCP := d.Get("enable_dhcp").(bool)
|
||||
createOpts.EnableDHCP = &enableDHCP
|
||||
|
||||
if v, ok := d.GetOk("ip_version"); ok {
|
||||
ipVersion := resourceNetworkingSubnetV2DetermineIPVersion(v.(int))
|
||||
createOpts.IPVersion = ipVersion
|
||||
|
Loading…
Reference in New Issue
Block a user