Browse Source

Fix problem with unassigned Floating IP. Test site works

master
Max Cherris 7 months ago
parent
commit
3afc4ba16c
  1. 6
      terraform/lab1/lab1.tf

6
terraform/lab1/lab1.tf

@ -121,7 +121,7 @@ resource "openstack_networking_port_v2" "port_1" {
name = "port_1"
network_id = openstack_networking_network_v2.terraform-network-1.id
admin_state_up = "true"
security_group_ids = []
security_group_ids = [openstack_networking_secgroup_v2.terraform-secgroup.id]
fixed_ip {
subnet_id = openstack_networking_subnet_v2.terraform-subnet-1.id
@ -155,7 +155,8 @@ resource "openstack_compute_instance_v2" "terraform-instance-1" {
depends_on = [openstack_networking_subnet_v2.terraform-subnet-1]
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
@ -191,6 +192,7 @@ resource "openstack_networking_floatingip_v2" "fip_1" {
resource "openstack_networking_floatingip_associate_v2" "terraform-instance-1-ip" {
floating_ip = openstack_networking_floatingip_v2.fip_1.address
port_id = openstack_networking_port_v2.port_1.id
}
# does work, though openstack_compute_floatingip_associate_v2 is deprecated,

Loading…
Cancel
Save