page_title | subcategory | description |
---|---|---|
twc_floating_ip Resource - Timeweb Cloud |
Resource for describing needed floating IP and provides actual information about its status |
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
}
}
availability_zone
(String) Address of specified floating IP Address
comment
(String) Comment of specified floating IP Addressddos_guard
(Boolean) Enabled DDoS Guard for specified floating IP Addressptr
(String) PTR record in DNS zone of specified floating IP Addressresource
(Block List, Max: 1) Address of specified floating IP Address (see below for nested schema)
id
(String) The ID of this resource.ip
(String) Address of specified floating IP Address
Required:
id
(String) ID of resource that bind with floating IP Addresstype
(String) Type of resource that bind with floating IP Address (server
,balancer
,dbaas
)
Import is supported using the following syntax:
# Floating IP can be imported by specifying the identifier (from URL)
terraform import twc_server.example 968769c4-06ac-4b37-8e21-1fc8ff6c5a9b