Floating IP
platform_floating_ip allocates a floating IP. Set instance_id to associate
it. Changing instance_id disassociates and/or associates in place. type
and region force replacement.
resource "platform_floating_ip" "web" { name = "web-public" type = "ipv4"}Associate at create (or later) with an instance id:
resource "platform_floating_ip" "web" { name = "web-public" type = "ipv4" instance_id = platform_instance.web.id}Arguments
Section titled “Arguments”| Name | Required | Notes |
|---|---|---|
name | no | Display name |
type | no | For example ipv4. Computed if omitted. Forces replacement |
region | no | Computed if omitted. Forces replacement |
instance_id | no | Associate to this instance. Updated in place |
Attributes
Section titled “Attributes”| Name | Notes |
|---|---|
id | Platform id |
address | Allocated address |
Destroy releases the address.
Import
Section titled “Import”terraform import platform_floating_ip.web fip_…Read maps the current association back onto instance_id.