ocp-power-automation / ocp4-upi-kvm

OCP4 on KVM/Power
Apache License 2.0
17 stars 20 forks source link

Provider "libvirt" not available for installation. #6

Closed krishvoor closed 4 years ago

krishvoor commented 4 years ago

Whilst performing terraform init - Ran into this issue

Krishnas-MacBook-Pro:ocp4-upi-kvm harsha$ terraform init
Initializing modules...
Initializing the backend...
Initializing provider plugins...
- Checking for available provider plugins...
Provider "libvirt" not available for installation.
A provider named "libvirt" could not be found in the Terraform Registry.
This may result from mistyping the provider name, or the given provider may
be a third-party provider that cannot be installed automatically.
In the latter case, the plugin must be installed manually by locating and
downloading a suitable distribution package and placing the plugin's executable
file in the following directory:
    terraform.d/plugins/darwin_amd64
Terraform detects necessary plugins by inspecting the configuration and state.
To view the provider versions requested by each module, run
"terraform providers".
Error: no provider exists with the given name
Krishnas-MacBook-Pro:ocp4-upi-kvm harsha$ 

Which is based on my var.tfvars file https://gist.github.com/krishvoor/f3679d81ee45941de694abf2863c302c

krishvoor commented 4 years ago

I could solve this via -

Krishnas-MacBook-Pro:~ harsha$ go version
go version go1.11.1 darwin/amd64
Krishnas-MacBook-Pro:~ harsha$ go get -u github.com/dmacvicar/terraform-provider-libvirt
Krishnas-MacBook-Pro:~ harsha$ cp $GOPATH/bin/terraform-provider-libvirt ~/.terraform.d/plugins/darwin_amd64/

Validating via terraform init

Krishnas-MacBook-Pro:ocp4-upi-kvm harsha$ terraform init
Initializing modules...

Initializing the backend...

Initializing provider plugins...

The following providers do not have any version constraints in configuration,
so the latest version was installed.

To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.

* provider.ignition: version = "~> 1.2"
* provider.null: version = "~> 2.1"
* provider.random: version = "~> 2.2"

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
Krishnas-MacBook-Pro:ocp4-upi-kvm harsha$ 
krishvoor commented 4 years ago

@bpradipt -- Please help review.

krishvoor commented 4 years ago

New PR - https://github.com/ocp-power-automation/ocp4-upi-kvm/pull/22