mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
Add Terraform-formatted configuration. Add JSON-formatted configuration. Add README with instructions on using these configurations.
71 lines
No EOL
1.4 KiB
JSON
71 lines
No EOL
1.4 KiB
JSON
{
|
|
"resource": {
|
|
"openstack_networking_network_v2": {
|
|
"tf-net": {
|
|
"name": "tf-net",
|
|
"admin_state_up": "true"
|
|
}
|
|
}
|
|
},
|
|
|
|
"resource": {
|
|
"openstack_networking_subnet_v2": {
|
|
"tf-subnet": {
|
|
"name": "tf-subnet",
|
|
"network_id": "${openstack_networking_network_v2.tf-net.id}",
|
|
"cidr": "192.168.200.0/24",
|
|
"ip_version": 4,
|
|
"dns_nameservers": [
|
|
"8.8.8.8",
|
|
"8.8.4.4"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
|
|
"resource": {
|
|
"openstack_networking_router_v2": {
|
|
"tf-router": {
|
|
"name": "tf-router",
|
|
"admin_state_up": "true",
|
|
"external_gateway": "${var.external_gateway}"
|
|
}
|
|
}
|
|
},
|
|
|
|
"resource": {
|
|
"openstack_networking_router_interface_v2": {
|
|
"tf-router-iface": {
|
|
"router_id": "${openstack_networking_router_v2.tf-router.id}",
|
|
"subnet_id": "${openstack_networking_subnet_v2.tf-subnet.id}"
|
|
}
|
|
}
|
|
},
|
|
|
|
"resource": {
|
|
"openstack_compute_floatingip_v2": {
|
|
"tf-fip": {
|
|
"pool": "${var.pool}",
|
|
"depends_on": [
|
|
"openstack_networking_router_interface_v2.tf-router-iface"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
|
|
"resource": {
|
|
"openstack_compute_instance_v2": {
|
|
"tf-instance": {
|
|
"name": "tf-instance",
|
|
"image_name": "${var.image}",
|
|
"flavor_name": "${var.flavor}",
|
|
"key_pair": "${var.key_pair}",
|
|
"floating_ip": "${openstack_compute_floatingip_v2.tf-fip.address}",
|
|
"security_groups": ["default"],
|
|
"network": {
|
|
"uuid": "${openstack_networking_network_v2.tf-net.id}"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |