Skip to content

Latest commit

 

History

History
91 lines (66 loc) · 2.26 KB

File metadata and controls

91 lines (66 loc) · 2.26 KB
page_title subcategory description
twc_floating_ip Resource - Timeweb Cloud
Resource for describing needed floating IP and provides actual information about its status

twc_floating_ip (Resource)

Resource for describing needed floating IP and provides actual information about its status

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

# Creata example floating IP
resource "twc_floating_ip" "example-floating-ip" {
  availability_zone = "spb-3"

  comment = "Some floating IP"
}

# Creata example floating IP with DDoS Guard
resource "twc_floating_ip" "example-floating-ip" {
  availability_zone = "spb-3"
  ddos_guard        = true

  comment = "Some floating IP with DDoS Guard"
}

# Create example floating IP with bounded resource

data "twc_configurator" "example-configurator" {
  location = "ru-1"
}

data "twc_os" "example-os" {
  name    = "ubuntu"
  version = "22.04"
}

resource "twc_server" "example-server" {
  name              = "Example server"
  os_id             = data.twc_os.example-os.id
  availability_zone = "spb-3"

  configuration {
    configurator_id = data.twc_configurator.example-configurator.id
    disk            = 1024 * 10
    cpu             = 1
    ram             = 1024
  }
}

resource "twc_floating_ip" "example-floating-ip" {
  availability_zone = "spb-3"

  comment = "Some floating IP"

  resource {
    type = "server"
    id   = twc_server.example-server.id
  }
}

Schema

Required

  • availability_zone (String) Address of specified floating IP Address

Optional

  • comment (String) Comment of specified floating IP Address
  • ddos_guard (Boolean) Enabled DDoS Guard for specified floating IP Address
  • ptr (String) PTR record in DNS zone of specified floating IP Address
  • resource (Block List, Max: 1) Address of specified floating IP Address (see below for nested schema)

Read-Only

  • id (String) The ID of this resource.
  • ip (String) Address of specified floating IP Address

Nested Schema for resource

Required:

  • id (String) ID of resource that bind with floating IP Address
  • type (String) Type of resource that bind with floating IP Address (server, balancer, database)