Add account computes list

This commit is contained in:
stSolo
2022-05-24 14:02:03 +03:00
parent c5e35b19f9
commit fa748f6e5d
6 changed files with 339 additions and 27 deletions

View File

@@ -0,0 +1,39 @@
/*
Пример использования
Получение списка computes, используемых аккаунтом
*/
#Расскомментируйте этот код,
#и внесите необходимые правки в версию и путь,
#чтобы работать с установленным вручную (не через 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_computes_list" "acl" {
#id аккаунта
#обязательный параметр
#тип - число
account_id = 1111
}
output "test" {
value = data.decort_account_computes_list.acl
}