1. Packages
  2. Vkcs Provider
  3. API Docs
  4. NetworkingFloatingipAssociate
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

vkcs.NetworkingFloatingipAssociate

Explore with Pulumi AI

vkcs logo
vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs

    Associates a floating IP to a port. This can be done only if port is assigned to router connected to external network. This is useful for situations where you have a pre-allocated floating IP or are unable to use the vkcs.NetworkingFloatingip resource to create a floating IP.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as vkcs from "@pulumi/vkcs";
    
    const floatingipAssociate = new vkcs.NetworkingFloatingipAssociate("floatingipAssociate", {
        floatingIp: vkcs_networking_floatingip.base_fip.address,
        portId: vkcs_networking_port.persistent_etcd.id,
    }, {
        dependsOn: [vkcs_networking_router_interface.db],
    });
    
    import pulumi
    import pulumi_vkcs as vkcs
    
    floatingip_associate = vkcs.NetworkingFloatingipAssociate("floatingipAssociate",
        floating_ip=vkcs_networking_floatingip["base_fip"]["address"],
        port_id=vkcs_networking_port["persistent_etcd"]["id"],
        opts = pulumi.ResourceOptions(depends_on=[vkcs_networking_router_interface["db"]]))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/vkcs/vkcs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := vkcs.NewNetworkingFloatingipAssociate(ctx, "floatingipAssociate", &vkcs.NetworkingFloatingipAssociateArgs{
    			FloatingIp: pulumi.Any(vkcs_networking_floatingip.Base_fip.Address),
    			PortId:     pulumi.Any(vkcs_networking_port.Persistent_etcd.Id),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			vkcs_networking_router_interface.Db,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Vkcs = Pulumi.Vkcs;
    
    return await Deployment.RunAsync(() => 
    {
        var floatingipAssociate = new Vkcs.NetworkingFloatingipAssociate("floatingipAssociate", new()
        {
            FloatingIp = vkcs_networking_floatingip.Base_fip.Address,
            PortId = vkcs_networking_port.Persistent_etcd.Id,
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                vkcs_networking_router_interface.Db,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.vkcs.NetworkingFloatingipAssociate;
    import com.pulumi.vkcs.NetworkingFloatingipAssociateArgs;
    import com.pulumi.resources.CustomResourceOptions;
    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 floatingipAssociate = new NetworkingFloatingipAssociate("floatingipAssociate", NetworkingFloatingipAssociateArgs.builder()
                .floatingIp(vkcs_networking_floatingip.base_fip().address())
                .portId(vkcs_networking_port.persistent_etcd().id())
                .build(), CustomResourceOptions.builder()
                    .dependsOn(vkcs_networking_router_interface.db())
                    .build());
    
        }
    }
    
    resources:
      floatingipAssociate:
        type: vkcs:NetworkingFloatingipAssociate
        properties:
          floatingIp: ${vkcs_networking_floatingip.base_fip.address}
          portId: ${vkcs_networking_port.persistent_etcd.id}
        options:
          dependsOn:
            - ${vkcs_networking_router_interface.db}
    

    Create NetworkingFloatingipAssociate Resource

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

    Constructor syntax

    new NetworkingFloatingipAssociate(name: string, args: NetworkingFloatingipAssociateArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkingFloatingipAssociate(resource_name: str,
                                      args: NetworkingFloatingipAssociateArgs,
                                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkingFloatingipAssociate(resource_name: str,
                                      opts: Optional[ResourceOptions] = None,
                                      floating_ip: Optional[str] = None,
                                      port_id: Optional[str] = None,
                                      fixed_ip: Optional[str] = None,
                                      networking_floatingip_associate_id: Optional[str] = None,
                                      region: Optional[str] = None,
                                      sdn: Optional[str] = None)
    func NewNetworkingFloatingipAssociate(ctx *Context, name string, args NetworkingFloatingipAssociateArgs, opts ...ResourceOption) (*NetworkingFloatingipAssociate, error)
    public NetworkingFloatingipAssociate(string name, NetworkingFloatingipAssociateArgs args, CustomResourceOptions? opts = null)
    public NetworkingFloatingipAssociate(String name, NetworkingFloatingipAssociateArgs args)
    public NetworkingFloatingipAssociate(String name, NetworkingFloatingipAssociateArgs args, CustomResourceOptions options)
    
    type: vkcs:NetworkingFloatingipAssociate
    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 NetworkingFloatingipAssociateArgs
    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 NetworkingFloatingipAssociateArgs
    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 NetworkingFloatingipAssociateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkingFloatingipAssociateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkingFloatingipAssociateArgs
    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 networkingFloatingipAssociateResource = new Vkcs.NetworkingFloatingipAssociate("networkingFloatingipAssociateResource", new()
    {
        FloatingIp = "string",
        PortId = "string",
        FixedIp = "string",
        NetworkingFloatingipAssociateId = "string",
        Region = "string",
        Sdn = "string",
    });
    
    example, err := vkcs.NewNetworkingFloatingipAssociate(ctx, "networkingFloatingipAssociateResource", &vkcs.NetworkingFloatingipAssociateArgs{
    	FloatingIp:                      pulumi.String("string"),
    	PortId:                          pulumi.String("string"),
    	FixedIp:                         pulumi.String("string"),
    	NetworkingFloatingipAssociateId: pulumi.String("string"),
    	Region:                          pulumi.String("string"),
    	Sdn:                             pulumi.String("string"),
    })
    
    var networkingFloatingipAssociateResource = new NetworkingFloatingipAssociate("networkingFloatingipAssociateResource", NetworkingFloatingipAssociateArgs.builder()
        .floatingIp("string")
        .portId("string")
        .fixedIp("string")
        .networkingFloatingipAssociateId("string")
        .region("string")
        .sdn("string")
        .build());
    
    networking_floatingip_associate_resource = vkcs.NetworkingFloatingipAssociate("networkingFloatingipAssociateResource",
        floating_ip="string",
        port_id="string",
        fixed_ip="string",
        networking_floatingip_associate_id="string",
        region="string",
        sdn="string")
    
    const networkingFloatingipAssociateResource = new vkcs.NetworkingFloatingipAssociate("networkingFloatingipAssociateResource", {
        floatingIp: "string",
        portId: "string",
        fixedIp: "string",
        networkingFloatingipAssociateId: "string",
        region: "string",
        sdn: "string",
    });
    
    type: vkcs:NetworkingFloatingipAssociate
    properties:
        fixedIp: string
        floatingIp: string
        networkingFloatingipAssociateId: string
        portId: string
        region: string
        sdn: string
    

    NetworkingFloatingipAssociate 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 NetworkingFloatingipAssociate resource accepts the following input properties:

    FloatingIp string
    required string → IP Address of an existing floating IP.
    PortId string
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    FixedIp string
    optional string → One of the port's IP addresses.
    NetworkingFloatingipAssociateId string
    string → ID of the resource.
    Region string
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    FloatingIp string
    required string → IP Address of an existing floating IP.
    PortId string
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    FixedIp string
    optional string → One of the port's IP addresses.
    NetworkingFloatingipAssociateId string
    string → ID of the resource.
    Region string
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    floatingIp String
    required string → IP Address of an existing floating IP.
    portId String
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    fixedIp String
    optional string → One of the port's IP addresses.
    networkingFloatingipAssociateId String
    string → ID of the resource.
    region String
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    floatingIp string
    required string → IP Address of an existing floating IP.
    portId string
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    fixedIp string
    optional string → One of the port's IP addresses.
    networkingFloatingipAssociateId string
    string → ID of the resource.
    region string
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    floating_ip str
    required string → IP Address of an existing floating IP.
    port_id str
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    fixed_ip str
    optional string → One of the port's IP addresses.
    networking_floatingip_associate_id str
    string → ID of the resource.
    region str
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    sdn str
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    floatingIp String
    required string → IP Address of an existing floating IP.
    portId String
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    fixedIp String
    optional string → One of the port's IP addresses.
    networkingFloatingipAssociateId String
    string → ID of the resource.
    region String
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing NetworkingFloatingipAssociate Resource

    Get an existing NetworkingFloatingipAssociate 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?: NetworkingFloatingipAssociateState, opts?: CustomResourceOptions): NetworkingFloatingipAssociate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            fixed_ip: Optional[str] = None,
            floating_ip: Optional[str] = None,
            networking_floatingip_associate_id: Optional[str] = None,
            port_id: Optional[str] = None,
            region: Optional[str] = None,
            sdn: Optional[str] = None) -> NetworkingFloatingipAssociate
    func GetNetworkingFloatingipAssociate(ctx *Context, name string, id IDInput, state *NetworkingFloatingipAssociateState, opts ...ResourceOption) (*NetworkingFloatingipAssociate, error)
    public static NetworkingFloatingipAssociate Get(string name, Input<string> id, NetworkingFloatingipAssociateState? state, CustomResourceOptions? opts = null)
    public static NetworkingFloatingipAssociate get(String name, Output<String> id, NetworkingFloatingipAssociateState state, CustomResourceOptions options)
    resources:  _:    type: vkcs:NetworkingFloatingipAssociate    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.
    The following state arguments are supported:
    FixedIp string
    optional string → One of the port's IP addresses.
    FloatingIp string
    required string → IP Address of an existing floating IP.
    NetworkingFloatingipAssociateId string
    string → ID of the resource.
    PortId string
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    Region string
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    FixedIp string
    optional string → One of the port's IP addresses.
    FloatingIp string
    required string → IP Address of an existing floating IP.
    NetworkingFloatingipAssociateId string
    string → ID of the resource.
    PortId string
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    Region string
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    Sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    fixedIp String
    optional string → One of the port's IP addresses.
    floatingIp String
    required string → IP Address of an existing floating IP.
    networkingFloatingipAssociateId String
    string → ID of the resource.
    portId String
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    region String
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    fixedIp string
    optional string → One of the port's IP addresses.
    floatingIp string
    required string → IP Address of an existing floating IP.
    networkingFloatingipAssociateId string
    string → ID of the resource.
    portId string
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    region string
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    sdn string
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    fixed_ip str
    optional string → One of the port's IP addresses.
    floating_ip str
    required string → IP Address of an existing floating IP.
    networking_floatingip_associate_id str
    string → ID of the resource.
    port_id str
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    region str
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    sdn str
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.
    fixedIp String
    optional string → One of the port's IP addresses.
    floatingIp String
    required string → IP Address of an existing floating IP.
    networkingFloatingipAssociateId String
    string → ID of the resource.
    portId String
    required string → ID of an existing port with at least one IP address to associate with this floating IP.
    region String
    optional string → The region in which to obtain the Networking client. A Networking client is needed to create a floating IP that can be used with another networking resource, such as a load balancer. If omitted, the region argument of the provider is used. Changing this creates a new floating IP (which may or may not have a different address).
    sdn String
    optional string → SDN to use for this resource. Must be one of following: "neutron", "sprut". Default value is project's default SDN.

    Import

    Floating IP associations can be imported using the id of the floating IP, e.g.

    $ pulumi import vkcs:index/networkingFloatingipAssociate:NetworkingFloatingipAssociate fip 2c7f39f3-702b-48d1-940c-b50384177ee1
    

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

    Package Details

    Repository
    vkcs vk-cs/terraform-provider-vkcs
    License
    Notes
    This Pulumi package is based on the vkcs Terraform Provider.
    vkcs logo
    vkcs 0.9.3 published on Tuesday, Apr 15, 2025 by vk-cs