Skip to content
Snippets Groups Projects
Commit 3afc4ba1 authored by Max Cherris's avatar Max Cherris
Browse files

Fix problem with unassigned Floating IP. Test site works

parent febbd457
No related branches found
No related tags found
No related merge requests found
...@@ -121,7 +121,7 @@ resource "openstack_networking_port_v2" "port_1" { ...@@ -121,7 +121,7 @@ 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 = [] security_group_ids = [openstack_networking_secgroup_v2.terraform-secgroup.id]
fixed_ip { fixed_ip {
subnet_id = openstack_networking_subnet_v2.terraform-subnet-1.id subnet_id = openstack_networking_subnet_v2.terraform-subnet-1.id
...@@ -155,7 +155,8 @@ resource "openstack_compute_instance_v2" "terraform-instance-1" { ...@@ -155,7 +155,8 @@ resource "openstack_compute_instance_v2" "terraform-instance-1" {
depends_on = [openstack_networking_subnet_v2.terraform-subnet-1] depends_on = [openstack_networking_subnet_v2.terraform-subnet-1]
network { network {
uuid = openstack_networking_network_v2.terraform-network-1.id #uuid = openstack_networking_network_v2.terraform-network-1.id
port = openstack_networking_port_v2.port_1.id
} }
user_data = <<-EOF user_data = <<-EOF
...@@ -191,6 +192,7 @@ resource "openstack_networking_floatingip_v2" "fip_1" { ...@@ -191,6 +192,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 = openstack_networking_port_v2.port_1.id 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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment