Browse Source

Fix deprecation final version, need review

master
Max Cherris 6 months ago
parent
commit
febbd457af
  1. 4
      terraform/lab1/lab1.tf

4
terraform/lab1/lab1.tf

@ -116,10 +116,12 @@ resource "openstack_networking_subnet_v2" "terraform-subnet-1" {
dns_nameservers = local.dns_nameservers dns_nameservers = local.dns_nameservers
} }
#new ressource here:
resource "openstack_networking_port_v2" "port_1" { resource "openstack_networking_port_v2" "port_1" {
name = "port_1" name = "port_1"
network_id = openstack_networking_network_v2.terraform-network-1.id network_id = openstack_networking_network_v2.terraform-network-1.id
admin_state_up = "true" admin_state_up = "true"
security_group_ids = []
fixed_ip { fixed_ip {
subnet_id = openstack_networking_subnet_v2.terraform-subnet-1.id subnet_id = openstack_networking_subnet_v2.terraform-subnet-1.id
@ -188,7 +190,7 @@ resource "openstack_networking_floatingip_v2" "fip_1" {
resource "openstack_networking_floatingip_associate_v2" "terraform-instance-1-ip" { resource "openstack_networking_floatingip_associate_v2" "terraform-instance-1-ip" {
floating_ip = openstack_networking_floatingip_v2.fip_1.address floating_ip = openstack_networking_floatingip_v2.fip_1.address
port_id = "port_1"
port_id = openstack_networking_port_v2.port_1.id
} }
# does work, though openstack_compute_floatingip_associate_v2 is deprecated, # does work, though openstack_compute_floatingip_associate_v2 is deprecated,

Loading…
Cancel
Save