Установка провайдера для Linux
- Проверьте доступы до репозитория https://terra.inferit.cloud/ .
- Создайте файл в домашней папке пользователя
~/.terraformrcсо следующим содержимым:
.terraformrc
provider_installation {
network_mirror {
url = "https://terra.inferit.cloud/"
include = ["registry.terraform.io/*/*"]
}
direct {
exclude = ["registry.terraform.io/*/*"]
}
}
Далее, подключите провайдер в файле – main. tf .
main.tf
terraform {
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"
version = "1.54.1" }
}
}
- Проинициализируйте провайдер командой –
terraform init. - Инициализация запускается в папке с проектом, где находится файл – main. tf .
Initializing the backend…
Initializing provider plugins…
- Finding terraform-provider-openstack/openstack versions matching “1.54.1”…
- Installing terraform-provider-openstack/openstack v1.54.1…
- Installed terraform-provider-openstack/openstack v1.54.1 (unauthenticated)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run “terraform init” in the future.
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.
Установка провайдера для Windows
- Проверьте доступы до репозитория https://terra.inferit.cloud/ .
- Создайте файл
terraform.rcв домашней папке пользователя %APPDATA%, она жеC:\Users\my_user\AppData\Roamingсо следующим содержимым:
provider_installation {
network_mirror {
url = "https://terra.inferit.cloud/"
include = ["registry.terraform.io/*/*"]
}
direct {
exclude = ["registry.terraform.io/*/*"]
}
}
- Подключите провайдер в файле – main. tf.
terraform {
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"
version = "1.54.1" }
}
}
- Проинициализируйте провайдер командой –
terraform init. - Инициализация запускается в папке с проектом, где находится файл – main. tf .
Initializing the backend…
Initializing provider plugins…
- Finding terraform-provider-openstack/openstack versions matching “1.54.1”…
- Installing terraform-provider-openstack/openstack v1.54.1…
- Installed terraform-provider-openstack/openstack v1.54.1 (unauthenticated)
Terraform has created a lock file .terraform.lock.hcl to record the provider
selections it made above. Include this file in your version control repository
so that Terraform can guarantee to make the same selections by default when
you run “terraform init” in the future.
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.