Files
terraform-provider-decort/samples/cloudapi/resource_snapshot/main.tf
Nikita Sorokin 294680282e 4.5.0
2023-11-13 00:59:02 +03:00

57 lines
1.5 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
Ресурс позволяет:
1. Создавать snapshot
2. Удалять snapshot
3. Откатывать snapshot
*/
#Расскомментируйте этот код,
#и внесите необходимые правки в версию и путь,
#чтобы работать с установленным вручную (не через hashicorp provider registry) провайдером
/*
terraform {
required_providers {
decort = {
version = "<VERSION>"
source = "basis/decort/decort"
}
}
}
*/
provider "decort" {
authenticator = "decs3o"
#controller_url = <DECORT_CONTROLLER_URL>
controller_url = "https://ds1.digitalenergy.online"
#oauth2_url = <DECORT_SSO_URL>
oauth2_url = "https://sso.digitalenergy.online"
allow_unverified_ssl = true
}
resource "decort_snapshot" "s" {
#обязательный параметр
#id вычислительной мощности
#тип - число
compute_id = 24074
#обязательный параметр
#наименование snapshot
#тип - строка
label = "test_ssht_3"
#опциональный параметр
#флаг отката
#тип - булев тип
#по-уолчанию - false
#если флаг был измеен с false на true, то произойдет откат
#rollback = false
}
output "test" {
value = decort_snapshot.s
}