Установка для Linux
- 1. Скачайте любым доступным способом провайдер по ссылке:
https://terra.inferit.cloud/terraform-provider-openstack - 2. Создайте директорию для хранения внутри terraform.
mkdir -p ~/.terraform.d/plugins/registry.terraform.io/hashicorp/openstack
3. Переместите провайдер и выдайте права на файлы. Права зависят от пользователя и могут иметь более тонкую настройку.
mv terraform-provider-openstack_1.54.1_linux_amd64.zip ~/.terraform.d/plugins/registry.terraform.io/hashicorp/openstack/
chmod 777 -R ~/.terraform.d/plugins/
4. После чего создайте файл terraform, со следующим содержимым:
main. tf
terraform {
required_providers {
openstack = {
source = "terraform-provider-openstack/openstack"
version = "1.54.1"
}
}
}
5. Выполнить инициализацию:
terraform init
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.