1. Packages
  2. Selectel Provider
  3. API Docs
  4. VpcFloatingipV2
selectel 6.4.0 published on Monday, Apr 14, 2025 by selectel

selectel.VpcFloatingipV2

Explore with Pulumi AI

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

import * as pulumi from "@pulumi/pulumi";
import * as selectel from "@pulumi/selectel";

const floatingip1 = new selectel.VpcFloatingipV2("floatingip1", {
    projectId: selectel_vpc_project_v2.project_1.id,
    region: "ru-1",
});
Copy
import pulumi
import pulumi_selectel as selectel

floatingip1 = selectel.VpcFloatingipV2("floatingip1",
    project_id=selectel_vpc_project_v2["project_1"]["id"],
    region="ru-1")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/selectel/v6/selectel"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := selectel.NewVpcFloatingipV2(ctx, "floatingip1", &selectel.VpcFloatingipV2Args{
			ProjectId: pulumi.Any(selectel_vpc_project_v2.Project_1.Id),
			Region:    pulumi.String("ru-1"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Selectel = Pulumi.Selectel;

return await Deployment.RunAsync(() => 
{
    var floatingip1 = new Selectel.VpcFloatingipV2("floatingip1", new()
    {
        ProjectId = selectel_vpc_project_v2.Project_1.Id,
        Region = "ru-1",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.selectel.VpcFloatingipV2;
import com.pulumi.selectel.VpcFloatingipV2Args;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var floatingip1 = new VpcFloatingipV2("floatingip1", VpcFloatingipV2Args.builder()
            .projectId(selectel_vpc_project_v2.project_1().id())
            .region("ru-1")
            .build());

    }
}
Copy
resources:
  floatingip1:
    type: selectel:VpcFloatingipV2
    properties:
      projectId: ${selectel_vpc_project_v2.project_1.id}
      region: ru-1
Copy

Create VpcFloatingipV2 Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new VpcFloatingipV2(name: string, args: VpcFloatingipV2Args, opts?: CustomResourceOptions);
@overload
def VpcFloatingipV2(resource_name: str,
                    args: VpcFloatingipV2Args,
                    opts: Optional[ResourceOptions] = None)

@overload
def VpcFloatingipV2(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    project_id: Optional[str] = None,
                    region: Optional[str] = None,
                    vpc_floatingip_v2_id: Optional[str] = None)
func NewVpcFloatingipV2(ctx *Context, name string, args VpcFloatingipV2Args, opts ...ResourceOption) (*VpcFloatingipV2, error)
public VpcFloatingipV2(string name, VpcFloatingipV2Args args, CustomResourceOptions? opts = null)
public VpcFloatingipV2(String name, VpcFloatingipV2Args args)
public VpcFloatingipV2(String name, VpcFloatingipV2Args args, CustomResourceOptions options)
type: selectel:VpcFloatingipV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. VpcFloatingipV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. VpcFloatingipV2Args
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. VpcFloatingipV2Args
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. VpcFloatingipV2Args
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. VpcFloatingipV2Args
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var vpcFloatingipV2Resource = new Selectel.VpcFloatingipV2("vpcFloatingipV2Resource", new()
{
    ProjectId = "string",
    Region = "string",
    VpcFloatingipV2Id = "string",
});
Copy
example, err := selectel.NewVpcFloatingipV2(ctx, "vpcFloatingipV2Resource", &selectel.VpcFloatingipV2Args{
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
VpcFloatingipV2Id: pulumi.String("string"),
})
Copy
var vpcFloatingipV2Resource = new VpcFloatingipV2("vpcFloatingipV2Resource", VpcFloatingipV2Args.builder()
    .projectId("string")
    .region("string")
    .vpcFloatingipV2Id("string")
    .build());
Copy
vpc_floatingip_v2_resource = selectel.VpcFloatingipV2("vpcFloatingipV2Resource",
    project_id="string",
    region="string",
    vpc_floatingip_v2_id="string")
Copy
const vpcFloatingipV2Resource = new selectel.VpcFloatingipV2("vpcFloatingipV2Resource", {
    projectId: "string",
    region: "string",
    vpcFloatingipV2Id: "string",
});
Copy
type: selectel:VpcFloatingipV2
properties:
    projectId: string
    region: string
    vpcFloatingipV2Id: string
Copy

VpcFloatingipV2 Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The VpcFloatingipV2 resource accepts the following input properties:

ProjectId This property is required. string
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
Region This property is required. string
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.
VpcFloatingipV2Id string
Unique identifier of the cloud server.
ProjectId This property is required. string
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
Region This property is required. string
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.
VpcFloatingipV2Id string
Unique identifier of the cloud server.
projectId This property is required. String
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
region This property is required. String
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.
vpcFloatingipV2Id String
Unique identifier of the cloud server.
projectId This property is required. string
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
region This property is required. string
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.
vpcFloatingipV2Id string
Unique identifier of the cloud server.
project_id This property is required. str
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
region This property is required. str
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.
vpc_floatingip_v2_id str
Unique identifier of the cloud server.
projectId This property is required. String
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
region This property is required. String
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.
vpcFloatingipV2Id String
Unique identifier of the cloud server.

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcFloatingipV2 resource produces the following output properties:

FixedIpAddress string
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.
FloatingIpAddress string
Public IP address.
Id string
The provider-assigned unique ID for this managed resource.
PortId string
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
Servers List<VpcFloatingipV2Server>
Cloud server that use the public IP address.
Status string
Status of the cloud server.
FixedIpAddress string
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.
FloatingIpAddress string
Public IP address.
Id string
The provider-assigned unique ID for this managed resource.
PortId string
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
Servers []VpcFloatingipV2Server
Cloud server that use the public IP address.
Status string
Status of the cloud server.
fixedIpAddress String
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.
floatingIpAddress String
Public IP address.
id String
The provider-assigned unique ID for this managed resource.
portId String
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
servers List<VpcFloatingipV2Server>
Cloud server that use the public IP address.
status String
Status of the cloud server.
fixedIpAddress string
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.
floatingIpAddress string
Public IP address.
id string
The provider-assigned unique ID for this managed resource.
portId string
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
servers VpcFloatingipV2Server[]
Cloud server that use the public IP address.
status string
Status of the cloud server.
fixed_ip_address str
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.
floating_ip_address str
Public IP address.
id str
The provider-assigned unique ID for this managed resource.
port_id str
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
servers Sequence[VpcFloatingipV2Server]
Cloud server that use the public IP address.
status str
Status of the cloud server.
fixedIpAddress String
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.
floatingIpAddress String
Public IP address.
id String
The provider-assigned unique ID for this managed resource.
portId String
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
servers List<Property Map>
Cloud server that use the public IP address.
status String
Status of the cloud server.

Look up Existing VpcFloatingipV2 Resource

Get an existing VpcFloatingipV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: VpcFloatingipV2State, opts?: CustomResourceOptions): VpcFloatingipV2
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        fixed_ip_address: Optional[str] = None,
        floating_ip_address: Optional[str] = None,
        port_id: Optional[str] = None,
        project_id: Optional[str] = None,
        region: Optional[str] = None,
        servers: Optional[Sequence[VpcFloatingipV2ServerArgs]] = None,
        status: Optional[str] = None,
        vpc_floatingip_v2_id: Optional[str] = None) -> VpcFloatingipV2
func GetVpcFloatingipV2(ctx *Context, name string, id IDInput, state *VpcFloatingipV2State, opts ...ResourceOption) (*VpcFloatingipV2, error)
public static VpcFloatingipV2 Get(string name, Input<string> id, VpcFloatingipV2State? state, CustomResourceOptions? opts = null)
public static VpcFloatingipV2 get(String name, Output<String> id, VpcFloatingipV2State state, CustomResourceOptions options)
resources:  _:    type: selectel:VpcFloatingipV2    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
FixedIpAddress string
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.
FloatingIpAddress string
Public IP address.
PortId string
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
ProjectId string
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
Region string
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.
Servers List<VpcFloatingipV2Server>
Cloud server that use the public IP address.
Status string
Status of the cloud server.
VpcFloatingipV2Id string
Unique identifier of the cloud server.
FixedIpAddress string
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.
FloatingIpAddress string
Public IP address.
PortId string
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
ProjectId string
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
Region string
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.
Servers []VpcFloatingipV2ServerArgs
Cloud server that use the public IP address.
Status string
Status of the cloud server.
VpcFloatingipV2Id string
Unique identifier of the cloud server.
fixedIpAddress String
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.
floatingIpAddress String
Public IP address.
portId String
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
projectId String
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
region String
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.
servers List<VpcFloatingipV2Server>
Cloud server that use the public IP address.
status String
Status of the cloud server.
vpcFloatingipV2Id String
Unique identifier of the cloud server.
fixedIpAddress string
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.
floatingIpAddress string
Public IP address.
portId string
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
projectId string
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
region string
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.
servers VpcFloatingipV2Server[]
Cloud server that use the public IP address.
status string
Status of the cloud server.
vpcFloatingipV2Id string
Unique identifier of the cloud server.
fixed_ip_address str
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.
floating_ip_address str
Public IP address.
port_id str
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
project_id str
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
region str
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.
servers Sequence[VpcFloatingipV2ServerArgs]
Cloud server that use the public IP address.
status str
Status of the cloud server.
vpc_floatingip_v2_id str
Unique identifier of the cloud server.
fixedIpAddress String
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.
floatingIpAddress String
Public IP address.
portId String
Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
projectId String
Unique identifier of the associated project. Changing this creates a new public IP address. Retrieved from the selectel.VpcProjectV2 resource. Learn more about Projects.
region String
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.
servers List<Property Map>
Cloud server that use the public IP address.
status String
Status of the cloud server.
vpcFloatingipV2Id String
Unique identifier of the cloud server.

Supporting Types

VpcFloatingipV2Server
, VpcFloatingipV2ServerArgs

Id This property is required. string
Unique identifier of the cloud server.
Name This property is required. string
Name of the cloud server.
Status This property is required. string
Status of the cloud server.
Id This property is required. string
Unique identifier of the cloud server.
Name This property is required. string
Name of the cloud server.
Status This property is required. string
Status of the cloud server.
id This property is required. String
Unique identifier of the cloud server.
name This property is required. String
Name of the cloud server.
status This property is required. String
Status of the cloud server.
id This property is required. string
Unique identifier of the cloud server.
name This property is required. string
Name of the cloud server.
status This property is required. string
Status of the cloud server.
id This property is required. str
Unique identifier of the cloud server.
name This property is required. str
Name of the cloud server.
status This property is required. str
Status of the cloud server.
id This property is required. String
Unique identifier of the cloud server.
name This property is required. String
Name of the cloud server.
status This property is required. String
Status of the cloud server.

Import

You can import a public IP address:

export OS_DOMAIN_NAME=<account_id>

export OS_USERNAME=

export OS_PASSWORD=

$ pulumi import selectel:index/vpcFloatingipV2:VpcFloatingipV2 floatingip_1 <public_ip_id>
Copy

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.

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
selectel selectel/terraform-provider-selectel
License
Notes
This Pulumi package is based on the selectel Terraform Provider.