Add data for account templates lis

This commit is contained in:
stSolo
2022-05-27 19:39:49 +03:00
parent 96c4175e74
commit 61b8765c82
6 changed files with 251 additions and 1 deletions

View File

@@ -30,6 +30,7 @@
- account_counsumed_units
- account_counsumed_units_by_type
- account_reserved_units
- account_templates_list
- resources:
- image
- virtual_image

View File

@@ -0,0 +1,38 @@
/*
Пример использования
Получение информации о шаблонах, используемых аккаунтом
*/
#Расскомментируйте этот код,
#и внесите необходимые правки в версию и путь,
#чтобы работать с установленным вручную (не через hashicorp provider registry) провайдером
terraform {
required_providers {
decort = {
version = "1.1"
source = "digitalenergy.online/decort/decort"
}
}
}
provider "decort" {
authenticator = "oauth2"
#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
}
data "decort_account_templates_list" "atl" {
#id аккаунта
#обязательный параметр
#тип - число
account_id = 11111
}
output "test" {
value = data.decort_account_templates_list.atl
}