# New with terraform in opennebula

**URL:** <https://forum.opennebula.io/t/new-with-terraform-in-opennebula/10103>\
**Category:** Installation & Configuration\
**Created:** [November 8, 2021, 12:15pm UTC](https://forum.opennebula.io/t/new-with-terraform-in-opennebula/10103 "2021-11-08T12:15:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gliese](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Gliese](https://forum.opennebula.io/u/Gliese)\
**Post date:** [November 8, 2021, 12:15pm UTC](https://forum.opennebula.io/t/new-with-terraform-in-opennebula/10103/1 "2021-11-08T12:15:25Z")

</div>

Hi all,  
First thanks a lot for reading this email I’m completely new with terraform and I was trying to install the opennebula official provider to test how it works. I have created a small example but when I tried to execute terraform init appears:  
Initializing provider plugins…

- Finding latest version of hashicorp/opennebula…
- Finding latest version of hashicorp/template…
- Installing hashicorp/template v2.2.0…
- Installed hashicorp/template v2.2.0 (signed by HashiCorp)  
╷  
│ Error: Failed to query available provider packages  
│  
│ Could not retrieve the list of available versions for provider hashicorp/opennebula: provider registry  
│ [registry.terraform.io](http://registry.terraform.io) does not have a provider named [Terraform Registry](http://registry.terraform.io/hashicorp/opennebula)  
│  
│ Did you intend to use opennebula/opennebula? If so, you must specify that source address in each module which requires  
│ that provider. To see which mo…

I have store my terraform-provider-opennebula in /usr/local/bin and set in my home the .terraformrc with the content:  
providers {  
opennebula = “/usr/local/bin/terraform-provider-opennebula”  
}

Can someone please tell me what im doing wrong? Seems like it is not using the provider i have set and tried to find it in hashicorp. Am I right ?

Thanks again  
Francisco

---

<div class="post-metadata">

**Author:** ![cgonzalez](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cgonzalez/32/7096_2.png) [@cgonzalez](https://forum.opennebula.io/u/cgonzalez)\
**Post date:** [November 12, 2021, 8:31am UTC](https://forum.opennebula.io/t/new-with-terraform-in-opennebula/10103/2 "2021-11-12T08:31:15Z")

</div>

Hi @Gliese,

Are you using some modified version of the provider? If not, could you just try to use the following configuration (as suggested in the provider [page](https://registry.terraform.io/providers/OpenNebula/opennebula/latest)):

```auto
terraform {
  required_providers {
    opennebula = {
      source = "OpenNebula/opennebula"
      version = "0.3.0"
    }
  }
}

provider "opennebula" {
  # Configuration options
}

```

---

<div class="post-metadata">

**Author:** ![Gliese](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Gliese](https://forum.opennebula.io/u/Gliese)\
**Post date:** [November 12, 2021, 10:49am UTC](https://forum.opennebula.io/t/new-with-terraform-in-opennebula/10103/3 "2021-11-12T10:49:01Z")

</div>

Hi,  
Thanks for your answer. No, I’m using the official one. And I have already check with that configuration and didn’t work.  
Here is my .terraformrc

terraform {  
required\_providers {  
opennebula = {  
source = “OpenNebula/opennebula”  
version = “0.3.0”  
}  
}  
}

provider “opennebula” {  
opennebula = “/usr/local/bin/terraform-provider-opennebula”  
}

As you can see is the standard one.

Cheers,  
F.

---

<div class="post-metadata">

**Author:** ![Gliese](https://avatars.discourse-cdn.com/v4/letter/g/e5b9ba/32.png) [@Gliese](https://forum.opennebula.io/u/Gliese)\
**Post date:** [November 12, 2021, 11:19am UTC](https://forum.opennebula.io/t/new-with-terraform-in-opennebula/10103/4 "2021-11-12T11:19:45Z")

</div>

HI! I found the error. The file was wrong because the provider was called two times. Now it works 🙂

Thanks.
