Skip to content

Latest commit

 

History

History
90 lines (67 loc) · 1.75 KB

File metadata and controls

90 lines (67 loc) · 1.75 KB
page_title subcategory description
twc_firewall Resource - Timeweb Cloud
Resource for describing needed firewall and provides actual information about its status

twc_firewall (Resource)

Resource for describing needed firewall and provides actual information about its status

Примеры использования

// Create example firewall that linked to two different servers
resource "twc_firewall" "example-firewall" {
  name = "example-firewall"
  description = "Some example firewall"

  link {
    id = resource.twc_server.vds-with-preset.id
    type = "server"
  }

  link {
    id = resource.twc_server.vds-with-preset-2.id
    type = "server"
  }
}

data "twc_os" "os" {
  family = "linux"
  name = "ubuntu"
  version = "22.04"
}

data "twc_presets" "preset" {
  location = "ru-1"
  disk_type = "nvme"
  cpu_frequency = "3.3"
  cpu = 1
  ram = 2048
  disk = 30720
  bandwidth = 200
  description_short = "Cloud 30"

  price_filter {
    from = 300
    to = 400
  }
}

resource "twc_server" "vds-with-preset" {
  name = "Some server with preset"
  os_id = data.twc_os.os.id

  preset_id = data.twc_presets.preset.id
}

resource "twc_server" "vds-with-preset-2" {
  name = "Some server with preset 2"
  os_id = data.twc_os.os.id

  preset_id = data.twc_presets.preset.id
}

Schema

Required

  • name (String) Name for firewall

Optional

Read-Only

  • id (String) The ID of this resource.

Nested Schema for link

Required:

  • id (String) Resource ID
  • type (String) Resource type [server, dbaas, balancer]