Terraform: Difference between revisions

Jump to navigation Jump to search
318 bytes removed ,  5 years ago
Line 250: Line 250:
Error: Error creating OpenStack server: Expected HTTP response code [] when
Error: Error creating OpenStack server: Expected HTTP response code [] when
accessing [POST
accessing [POST
https://graham.cloud.computecanada.ca:8774/v2.1/43b86742c5ee4eaf800a36d7d234d95c/servers],
https://cloud.example.org:8774/v2.1/43b86742c5ee4eaf800a36d7d234d95c/servers],
but got 409 instead
but got 409 instead
{"conflictingRequest": {"message": "Multiple possible networks found, use a
{"conflictingRequest": {"message": "Multiple possible networks found, use a
Line 257: Line 257:
   on nodes.tf line 4, in resource "openstack_compute_instance_v2" "myvm":
   on nodes.tf line 4, in resource "openstack_compute_instance_v2" "myvm":
   4: resource "openstack_compute_instance_v2" "myvm" {</source>
   4: resource "openstack_compute_instance_v2" "myvm" {</source>
Dang. But I can solve this.
This fails in this example. OpenStack projects in Compute Canada have at least two networks defined: one private and one public. Terraform needs to know which one to use.
 
In my particular case, I have two private networks defined in my project and I happen to know one of them is leftover from a Kubernetes cluster I didn’t completely tear back down. That’s not all, though. OpenStack clouds, at least in CCF, will have one default private network and also the external network, which is where floating IPs are assigned. I can’t get rid of those, nor do I want to, so we need to add something to our VM definition.


== Adding a network ==
== Adding a network ==
cc_staff
44

edits

Navigation menu