BL
Size: a a a
BL
Р
BL
BL
BL
BL
ВИ
ВИ
BL
ВИ
BL
BL
BL
AA
terraform {
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
version = "0.6.3"
}
}
backend "pg" {}
}
resource "libvirt_pool" "vm_pool" {
name = "vm_pool"
type = "dir"
path = var.vm_pool_path
}
....init.tf:
module "vm-qw-1" {
source = "./vm-qw-1"
}
terraform init -backend-config="conn_str=postgres ...
Initializing provider plugins...
- Reusing previous version of dmacvicar/libvirt from the dependency lock file
- Reusing previous version of hashicorp/template from the dependency lock file
- Finding latest version of hashicorp/libvirt...
- Using previously-installed dmacvicar/libvirt v0.6.3
- Using previously-installed hashicorp/template v2.2.0
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/libvirt: provider registry registry.terraform.io does not have a provider named
│ registry.terraform.io/hashicorp/libvirt
│
│ Did you intend to use dmacvicar/libvirt? If so, you must specify that source address in each module which requires that provider. To see which modules are currently depending on
│ hashicorp/libvirt, run the following command:
│ terraform providers
terraform providers
Providers required by configuration:
├── provider[registry.terraform.io/hashicorp/libvirt]
└── module.vm-qw-1
├── provider[registry.terraform.io/hashicorp/template]
└── provider[registry.terraform.io/dmacvicar/libvirt] 0.6.3
terraform providers
Providers required by configuration:
├── provider[registry.terraform.io/hashicorp/template]
└── provider[registry.terraform.io/dmacvicar/libvirt] 0.6.3
AA
S
S
AA
# cat init.tf
terraform {
required_providers {
libvirt = {
source = "dmacvicar/libvirt"
version = "0.6.3"
}
}
backend "pg" {}
}
module "vm-qw-1" {
source = "./vm-qw-1"
}
# cat vm-qw-1/libvirt.tf
provider "libvirt" {
uri = "qemu+ssh://root@some-server/system"
alias = "kvm"
}
resource "libvirt_pool" "vm_pool" {
name = "vm_pool"
type = "dir"
path = var.vm_pool_path
}
...
# terraform init -backend-config="conn_str=postgres://
Initializing provider plugins...
- Reusing previous version of hashicorp/template from the dependency lock file
- Reusing previous version of dmacvicar/libvirt from the dependency lock file
- Finding latest version of hashicorp/libvirt...
- Using previously-installed hashicorp/template v2.2.0
- Using previously-installed dmacvicar/libvirt v0.6.3
╷
│ Error: Failed to query available provider packages
│
│ Could not retrieve the list of available versions for provider hashicorp/libvirt: provider registry registry.terraform.io does not have a provider named
│ registry.terraform.io/hashicorp/libvirt
│
│ Did you intend to use dmacvicar/libvirt? If so, you must specify that source address in each module which requires that provider. To see which modules are currently depending on
│ hashicorp/libvirt, run the following command:
│ terraform providers
# terraform providers
Providers required by configuration:
.
├── provider[registry.terraform.io/dmacvicar/libvirt] 0.6.3
└── module.vm-qw-1
├── provider[registry.terraform.io/hashicorp/libvirt]
└── provider[registry.terraform.io/hashicorp/template]
OB
vm-qw-1?AA
vm-qw-1/libvirt.tf - ошибка та же