You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
terraform-provider-decort/samples/cloudapi/resource_pfw/main.tf

54 lines
1.4 KiB

3 years ago
#Расскомментируйте этот код,
#и внесите необходимые правки в версию и путь,
#чтобы работать с установленным вручную (не через hashicorp provider registry) провайдером
/*
terraform {
required_providers {
decort = {
source = "basis/decort/decort"
version = "<VERSION>"
}
}
}
*/
provider "decort" {
2 years ago
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
3 years ago
}
resource "decort_pfw" "pfw" {
# ID виртуальной машины
# Обязательный параметр
# int
compute_id = 11269
# Начальный порт правила
# Обязательный параметр
# int
public_port_start = 200
# Внутренний порт
# Обязательный параметр
# int
local_base_port = 22
# Протокол соединения (tcp / udp)
# Обязательный параметр
# string
proto = "tcp"
# Конечный порт (включительно)
# Опциональный параметр
# int
public_port_end = 21321
}
output "pfw_out" {
value = decort_pfw.pfw
}