Skip to main content
selectel_vpc_floatingip_v2
Last update:

selectel_vpc_floatingip_v2

For your information

This instruction is a copy of the Selectel Terraform provider's documentation in the Terraform Registry.

Creates and manages a public IP address using public API v2. For more information about public IP addresses, see the official Selectel documentation.

Example Usage

resource "selectel_vpc_floatingip_v2" "floatingip_1" {
project_id = selectel_vpc_project_v2.project_1.id
region = "ru-1"
}

Argument Reference

  • project_id — (Required) Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel_vpc_project_v2 resource. Learn more about Projects.

  • region — (Required) Pool where the public IP address is located, for example, ru-3. Changing this creates a new public IP address. Learn more about available pools in the Availability matrix.

Attributes Reference

  • port_id — Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.

  • floating_ip_address — Public IP address.

  • fixed_ip_address — Fixed private IP address of the OpenStack port that is associated with the public IP address. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.

  • status — Status of the public IP address.

  • servers — Cloud server that uses the public IP address.

    • id — Unique identifier of the cloud server.

    • name — Name of the cloud server.

    • status — Status of the cloud server.

Import

You can import a public IP address:

export OS_DOMAIN_NAME=<account_id>
export OS_USERNAME=<username>
export OS_PASSWORD=<password>
terraform import selectel_vpc_floatingip_v2.floatingip_1 <public_ip_id>

where:

  • <account_id> — Selectel account ID. The account ID is in the top right corner of the Control panel. Learn more about Registration.

  • <username> — Name of the service user. To get the name, in the Control panel, go to Identity & Access ManagementUser management ⟶ the Service users tab ⟶ copy the name of the required user. Learn more about Service users.

  • <password> — Password of the service user.

  • <public_ip_id> — Unique identifier of the public IP address, for example, 0635d78f-57a7-1a23-bf9d-9e10. To get the public IP address ID, in the Control panel, go to Cloud PlatformNetwork ⟶ the Public IP addresses tab. The ID is under the public IP address. As an alternative, you can use OpenStack CLI command openstack floating ip list and copy ID field.