3forges / packman

A Recipe to Terraform a Virtualbox VM, with Docker, Docker Compose on Debian
2 stars 2 forks source link

Configure local terraform provider #9

Closed CyraxNova closed 3 months ago

CyraxNova commented 3 months ago

In https://github.com/3forges/packman/blob/master/terraform/README.md you use

provider_installation {
    dev_overrides {
      "terra-farm/virtualbox" = "./.terraform.d/customised-providers/terraform-provider-virtualbox/bidule"
    }
}

Alternative way it's copy terraform-provider-virtualbox_v5.0.0.exe to %USERPROFILE%\AppData\Roaming\terraform.d\plugins\registry.local\local\virtualbox\5.0.0\windows_amd64\terraform-provider-virtualbox_v5.0.0.exe

And edit main.tf

terraform {
  required_providers {
    virtualbox = {
      source = "registry.local/local/virtualbox",
      version = "5.0.0"
    }
  }
}

See https://github.com/terra-farm/terraform-provider-virtualbox/blob/main/CONTRIBUTING.md

Jean-Baptiste-Lasselle commented 3 months ago

In https://github.com/3forges/packman/blob/master/terraform/README.md you use

provider_installation {
    dev_overrides {
      "terra-farm/virtualbox" = "./.terraform.d/customised-providers/terraform-provider-virtualbox/bidule"
    }
}

Alternative way it's copy terraform-provider-virtualbox_v5.0.0.exe to %USERPROFILE%\AppData\Roaming\terraform.d\plugins\registry.local\local\virtualbox\5.0.0\windows_amd64\terraform-provider-virtualbox_v5.0.0.exe

And edit main.tf

terraform {
  required_providers {
    virtualbox = {
      source = "registry.local/local/virtualbox",
      version = "5.0.0"
    }
  }
}

See https://github.com/terra-farm/terraform-provider-virtualbox/blob/main/CONTRIBUTING.md

Hum, thank you for the note, I have now another way to buildfrom source locally a teraform provider, and test it on the fly.

Is it any issue That I still leave my first dev_overrides approach in the code: Is my packman repository of any use for anyone, except to reproduce the facts I state in my analysis ?

I will wait you tell me @CyraxNova , before closing this issue.

CyraxNova commented 3 months ago

Is it any issue That I still leave my first dev_overrides approach in the code: Is my packman repository of any use for anyone, except to reproduce the facts I state in my analysis ?

This is not a problem. Additional information. The packmanrepository is very useful.