Answers: <p>All I had to do to resolve this was migrate to using <a href="https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/networking_floatingip_v2" rel="nofollow noreferrer"><code>openstack_networking_floatingip_v2</code></a> instead of the deprecated <code>openstack_compute_floatingip_v2</code>. This requires an explicit association with <code>openstack_compute_floatingip_associate_v2</code>.</p>
  <pre><code>resource &quot;openstack_networking_floatingip_v2&quot; &quot;myip&quot; {
          pool = &quot;pool_name&quot;
  }
  
  resource &quot;openstack_compute_floatingip_associate_v2&quot; &quot;bridge&quot; {
          floating_ip = &quot;${openstack_networking_floatingip_v2.myip.address}&quot;
          instance_id = &quot;${openstack_compute_instance_v2.test-server.id}&quot;
  }
  </code></pre>
  
Answers: CC BY-SA 4.0
Answers: 2022-02-21T18:29:41.527Z
Answers: 2022-02-21T18:29:41.527Z
Answers: Evan Carroll
Body: <p>When I run terraform I get,</p>
  <pre><code>openstack_compute_floatingip_v2.sandbox: Creating...
  ╷
  │ Error: Error creating openstack_compute_floatingip_v2: Resource not found
  │ 
  │   with openstack_compute_floatingip_v2.sandbox,
  │   on main.tf line 31, in resource &quot;openstack_compute_floatingip_v2&quot; &quot;sandbox&quot;:
  │   31: resource &quot;openstack_compute_floatingip_v2&quot; &quot;sandbox&quot; {
  </code></pre>
  <p>But it does seem that there is a <a href="https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/compute_floatingip_v2" rel="nofollow noreferrer"><code>openstack_compute_floatingip_v2</code> resource</a>. This seems to be the line triggering the error,</p>
  <pre><code>resource &quot;openstack_compute_floatingip_v2&quot; &quot;sandbox&quot; {
          pool = &quot;public&quot;
  }
  </code></pre>
  
Tags: <terraform>
Title: Terraform errors openstack_compute_floatingip_v2: Resource not found
UserDisplayName: Evan Carroll
ThreadText: # Terraform errors openstack_compute_floatingip_v2: Resource not found
  
  (Asked by: username_0 on 2022-02-21)
  
  When I run terraform I get,
  
  ```
  openstack_compute_floatingip_v2.sandbox: Creating...
  ╷
  │ Error: Error creating openstack_compute_floatingip_v2: Resource not found
  │ 
  │   with openstack_compute_floatingip_v2.sandbox,
  │   on main.tf line 31, in resource "openstack_compute_floatingip_v2" "sandbox":
  │   31: resource "openstack_compute_floatingip_v2" "sandbox" {
  
  ```
  
  But it does seem that there is a [`openstack_compute_floatingip_v2` resource](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/compute_floatingip_v2). This seems to be the line triggering the error,
  
  ```
  resource "openstack_compute_floatingip_v2" "sandbox" {
          pool = "public"
  }
  
  ```
  
  **Tags:** terraform
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2022-02-21. Score: 1 | Accepted answer
  
  All I had to do to resolve this was migrate to using [`openstack_networking_floatingip_v2`](https://registry.terraform.io/providers/terraform-provider-openstack/openstack/latest/docs/resources/networking_floatingip_v2) instead of the deprecated `openstack_compute_floatingip_v2`. This requires an explicit association with `openstack_compute_floatingip_associate_v2`.
  
  ```
  resource "openstack_networking_floatingip_v2" "myip" {
          pool = "pool_name"
  }
  
  resource "openstack_compute_floatingip_associate_v2" "bridge" {
          floating_ip = "${openstack_networking_floatingip_v2.myip.address}"
          instance_id = "${openstack_compute_instance_v2.test-server.id}"
  }
  
  ```
  
  
  ---
  
  