Files
asteam 003e4d656e 1.0.1
2024-08-23 16:55:50 +03:00

44 lines
1.2 KiB
HCL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
Пример использования
Получение данных об snapshot_usage compute (виртуальной машины)
*/
#Раскомментируйте этот код,
#и внесите необходимые правки в версию и путь,
#чтобы работать с установленным вручную (не через hashicorp provider registry) провайдером
/*
terraform {
required_providers {
dynamix = {
source = "basistech.ru/tf/dynamix"
version = "<VERSION>"
}
}
}
*/
provider "dynamix" {
authenticator = "decs3o"
#controller_url = <DYNAMIX_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DYNAMIX_OAUTH2_URL>
oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true
}
data "dynamix_kvmvm_snapshot_usage" "kvmvm_snapshot_usage" {
#id виртуальной машины
#обязательный параметр
#тип - целое число
compute_id = 10154
#лейбл snapshot usage
#необязательный параметр
#тип - строка
label = "some"
}
output "output" {
value = data.dynamix_kvmvm_snapshot_usage.kvmvm_snapshot_usage
}