provider/openstack: Decprecating Instance Floating IP attribute (#13063)
This commit deprecates the floating_ip attributes from the openstack_compute_instance_v2 resource. It is recommended to use either the openstack_compute_floatingip_associate resource or configure an openstack_networking_port_v2 resource with a floating IP.
This commit is contained in:
parent
a097a2ef5b
commit
de255d43d6
|
@ -82,6 +82,7 @@ func resourceComputeInstanceV2() *schema.Resource {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
ForceNew: false,
|
ForceNew: false,
|
||||||
|
Deprecated: "Use the openstack_compute_floatingip_associate_v2 resource instead",
|
||||||
},
|
},
|
||||||
"user_data": &schema.Schema{
|
"user_data": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
@ -153,6 +154,7 @@ func resourceComputeInstanceV2() *schema.Resource {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
|
Deprecated: "Use the openstack_compute_floatingip_associate_v2 resource instead",
|
||||||
},
|
},
|
||||||
"mac": &schema.Schema{
|
"mac": &schema.Schema{
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
|
|
|
@ -175,7 +175,7 @@ resource "openstack_compute_instance_v2" "instance_1" {
|
||||||
### Instance With Multiple Networks
|
### Instance With Multiple Networks
|
||||||
|
|
||||||
```
|
```
|
||||||
resource "openstack_compute_floatingip_v2" "myip" {
|
resource "openstack_networking_floatingip_v2" "myip" {
|
||||||
pool = "my_pool"
|
pool = "my_pool"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -192,12 +192,14 @@ resource "openstack_compute_instance_v2" "multi-net" {
|
||||||
|
|
||||||
network {
|
network {
|
||||||
name = "my_second_network"
|
name = "my_second_network"
|
||||||
floating_ip = "${openstack_compute_floatingip_v2.myip.address}"
|
|
||||||
|
|
||||||
# Terraform will use this network for provisioning
|
|
||||||
access_network = true
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
resource "openstack_compute_floatingip_associate_v2" "myip" {
|
||||||
|
floating_ip = "${openstack_networking_floatingip_v2.myip.address}"
|
||||||
|
instance_id = "${openstack_compute_instance_v2.multi-net.id}"
|
||||||
|
fixed_ip = "${openstack_compute_instance_v2.multi-net.network.1.fixed_ip_v4}"
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
### Instance With Personality
|
### Instance With Personality
|
||||||
|
@ -281,7 +283,7 @@ The following arguments are supported:
|
||||||
* `flavor_name` - (Optional; Required if `flavor_id` is empty) The name of the
|
* `flavor_name` - (Optional; Required if `flavor_id` is empty) The name of the
|
||||||
desired flavor for the server. Changing this resizes the existing server.
|
desired flavor for the server. Changing this resizes the existing server.
|
||||||
|
|
||||||
* `floating_ip` - (Optional) A *Compute* Floating IP that will be associated
|
* `floating_ip` - (Deprecated) A *Compute* Floating IP that will be associated
|
||||||
with the Instance. The Floating IP must be provisioned already. See *Notes*
|
with the Instance. The Floating IP must be provisioned already. See *Notes*
|
||||||
for more information about Floating IPs.
|
for more information about Floating IPs.
|
||||||
|
|
||||||
|
@ -360,7 +362,7 @@ The `network` block supports:
|
||||||
* `fixed_ip_v6` - (Optional) Specifies a fixed IPv6 address to be used on this
|
* `fixed_ip_v6` - (Optional) Specifies a fixed IPv6 address to be used on this
|
||||||
network. Changing this creates a new server.
|
network. Changing this creates a new server.
|
||||||
|
|
||||||
* `floating_ip` - (Optional) Specifies a floating IP address to be associated
|
* `floating_ip` - (Deprecated) Specifies a floating IP address to be associated
|
||||||
with this network. Cannot be combined with a top-level floating IP. See
|
with this network. Cannot be combined with a top-level floating IP. See
|
||||||
*Notes* for more information about Floating IPs.
|
*Notes* for more information about Floating IPs.
|
||||||
|
|
||||||
|
@ -452,6 +454,10 @@ The following attributes are exported:
|
||||||
|
|
||||||
### Floating IPs
|
### Floating IPs
|
||||||
|
|
||||||
|
Specifying Floating IPs within the instance is now deprecated. Please use
|
||||||
|
either the `openstack_compute_floatingip_associate_v2` resource or attach
|
||||||
|
the floating IP to an `openstack_networking_port_v2` resource.
|
||||||
|
|
||||||
Floating IPs can be associated in one of two ways:
|
Floating IPs can be associated in one of two ways:
|
||||||
|
|
||||||
* You can specify a Floating IP address by using the top-level `floating_ip`
|
* You can specify a Floating IP address by using the top-level `floating_ip`
|
||||||
|
|
Loading…
Reference in New Issue