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",
});
import pulumi
import pulumi_selectel as selectel
floatingip1 = selectel.VpcFloatingipV2("floatingip1",
project_id=selectel_vpc_project_v2["project_1"]["id"],
region="ru-1")
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
})
}
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",
});
});
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());
}
}
resources:
floatingip1:
type: selectel:VpcFloatingipV2
properties:
projectId: ${selectel_vpc_project_v2.project_1.id}
region: ru-1
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 string
- The unique name of the resource.
- args VpcFloatingipV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args 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 string
- The unique name of the resource.
- args VpcFloatingipV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VpcFloatingipV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args 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",
});
example, err := selectel.NewVpcFloatingipV2(ctx, "vpcFloatingipV2Resource", &selectel.VpcFloatingipV2Args{
ProjectId: pulumi.String("string"),
Region: pulumi.String("string"),
VpcFloatingipV2Id: pulumi.String("string"),
})
var vpcFloatingipV2Resource = new VpcFloatingipV2("vpcFloatingipV2Resource", VpcFloatingipV2Args.builder()
.projectId("string")
.region("string")
.vpcFloatingipV2Id("string")
.build());
vpc_floatingip_v2_resource = selectel.VpcFloatingipV2("vpcFloatingipV2Resource",
project_id="string",
region="string",
vpc_floatingip_v2_id="string")
const vpcFloatingipV2Resource = new selectel.VpcFloatingipV2("vpcFloatingipV2Resource", {
projectId: "string",
region: "string",
vpcFloatingipV2Id: "string",
});
type: selectel:VpcFloatingipV2
properties:
projectId: string
region: string
vpcFloatingipV2Id: string
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:
- Project
Id 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. - Vpc
Floatingip stringV2Id - Unique identifier of the cloud server.
- Project
Id 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. - Vpc
Floatingip stringV2Id - Unique identifier of the cloud server.
- project
Id 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. - vpc
Floatingip StringV2Id - Unique identifier of the cloud server.
- project
Id 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. - vpc
Floatingip stringV2Id - Unique identifier of the cloud server.
- 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. - vpc_
floatingip_ strv2_ id - Unique identifier of the cloud server.
- project
Id 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. - vpc
Floatingip StringV2Id - 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:
- Fixed
Ip stringAddress - 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 stringAddress - Public IP address.
- Id string
- The provider-assigned unique ID for this managed resource.
- Port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- Servers
List<Vpc
Floatingip V2Server> - Cloud server that use the public IP address.
- Status string
- Status of the cloud server.
- Fixed
Ip stringAddress - 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 stringAddress - Public IP address.
- Id string
- The provider-assigned unique ID for this managed resource.
- Port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- Servers
[]Vpc
Floatingip V2Server - Cloud server that use the public IP address.
- Status string
- Status of the cloud server.
- fixed
Ip StringAddress - 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 StringAddress - Public IP address.
- id String
- The provider-assigned unique ID for this managed resource.
- port
Id String - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- servers
List<Vpc
Floatingip V2Server> - Cloud server that use the public IP address.
- status String
- Status of the cloud server.
- fixed
Ip stringAddress - 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 stringAddress - Public IP address.
- id string
- The provider-assigned unique ID for this managed resource.
- port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- servers
Vpc
Floatingip V2Server[] - Cloud server that use the public IP address.
- status string
- Status of the cloud server.
- fixed_
ip_ straddress - 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_ straddress - 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[Vpc
Floatingip V2Server] - Cloud server that use the public IP address.
- status str
- Status of the cloud server.
- fixed
Ip StringAddress - 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 StringAddress - Public IP address.
- id String
- The provider-assigned unique ID for this managed resource.
- port
Id 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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
- The unique name of the resulting resource.
- id
- 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.
- Fixed
Ip stringAddress - 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 stringAddress - Public IP address.
- Port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- Project
Id 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<Vpc
Floatingip V2Server> - Cloud server that use the public IP address.
- Status string
- Status of the cloud server.
- Vpc
Floatingip stringV2Id - Unique identifier of the cloud server.
- Fixed
Ip stringAddress - 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 stringAddress - Public IP address.
- Port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- Project
Id 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
[]Vpc
Floatingip V2Server Args - Cloud server that use the public IP address.
- Status string
- Status of the cloud server.
- Vpc
Floatingip stringV2Id - Unique identifier of the cloud server.
- fixed
Ip StringAddress - 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 StringAddress - Public IP address.
- port
Id String - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- project
Id 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<Vpc
Floatingip V2Server> - Cloud server that use the public IP address.
- status String
- Status of the cloud server.
- vpc
Floatingip StringV2Id - Unique identifier of the cloud server.
- fixed
Ip stringAddress - 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 stringAddress - Public IP address.
- port
Id string - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- project
Id 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
Vpc
Floatingip V2Server[] - Cloud server that use the public IP address.
- status string
- Status of the cloud server.
- vpc
Floatingip stringV2Id - Unique identifier of the cloud server.
- fixed_
ip_ straddress - 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_ straddress - 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[Vpc
Floatingip V2Server Args] - Cloud server that use the public IP address.
- status str
- Status of the cloud server.
- vpc_
floatingip_ strv2_ id - Unique identifier of the cloud server.
- fixed
Ip StringAddress - 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 StringAddress - Public IP address.
- port
Id String - Unique identifier of the associated OpenStack port. Learn more about the openstack_networking_port_v2 resource in the official OpenStack documentation.
- project
Id 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.
- vpc
Floatingip StringV2Id - Unique identifier of the cloud server.
Supporting Types
VpcFloatingipV2Server, VpcFloatingipV2ServerArgs
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>
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 Management ⟶ User 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 Platform ⟶ Network ⟶ the Public IP addresses tab. The ID is under the public IP address. As an alternative, you can use OpenStack CLI commandopenstack floating ip list
and copyID
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.