Files
asteam 60e23338ad 1.2.0
2025-01-21 12:16:49 +03:00

59 lines
1.7 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.

/*
Пример использования
Ресурса vins static routes
Ресурс позволяет:
1. Создавать static routes
2. Удалять static routes
3. Предоставлять доступ виртуальным машинам к static routes
4. Удалять доступ виртуальным машинам к static routes
*/
#Раскомментируйте этот код,
#и внесите необходимые правки в версию и путь,
#чтобы работать с установленным вручную (не через 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
}
resource "dynamix_vins_static_route" "sr" {
#id Vins
#обязательный параметр
#тип - целое число
vins_id = 1111
#destination network
#обязательный параметр
#тип - строка
destination = "192.168.201.0"
#destination network mask
#обязательный параметр
#тип - строка
netmask = "255.255.255.255"
#ip-адрес из пула свободных IP-адресов ViNS ID
#обязательный параметр
#тип - строка
gateway = "192.168.201.40"
}
output "sr" {
value = dynamix_vins_static_route.sr
}