flexibleengine.NetworkingFloatingipAssociateV2
Explore with Pulumi AI
!> Warning: It will be deprecated, using flexibleengine.VpcEipAssociate
instead.
Associates a floating IP to a port. This is useful for situations where you have
a pre-allocated floating IP or are unable to use the flexibleengine.VpcEip
or flexibleengine.NetworkingFloatingipV2
resource to create a floating IP.
You can also use publicip.0.port_id
of flexibleengine.VpcEip
resource to associate a port.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as flexibleengine from "@pulumi/flexibleengine";
const port1 = new flexibleengine.NetworkingPortV2("port1", {networkId: "a5bbd213-e1d3-49b6-aed1-9df60ea94b9a"});
const fip1 = new flexibleengine.NetworkingFloatingipAssociateV2("fip1", {
floatingIp: "1.2.3.4",
portId: port1.networkingPortV2Id,
});
import pulumi
import pulumi_flexibleengine as flexibleengine
port1 = flexibleengine.NetworkingPortV2("port1", network_id="a5bbd213-e1d3-49b6-aed1-9df60ea94b9a")
fip1 = flexibleengine.NetworkingFloatingipAssociateV2("fip1",
floating_ip="1.2.3.4",
port_id=port1.networking_port_v2_id)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
port1, err := flexibleengine.NewNetworkingPortV2(ctx, "port1", &flexibleengine.NetworkingPortV2Args{
NetworkId: pulumi.String("a5bbd213-e1d3-49b6-aed1-9df60ea94b9a"),
})
if err != nil {
return err
}
_, err = flexibleengine.NewNetworkingFloatingipAssociateV2(ctx, "fip1", &flexibleengine.NetworkingFloatingipAssociateV2Args{
FloatingIp: pulumi.String("1.2.3.4"),
PortId: port1.NetworkingPortV2Id,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Flexibleengine = Pulumi.Flexibleengine;
return await Deployment.RunAsync(() =>
{
var port1 = new Flexibleengine.NetworkingPortV2("port1", new()
{
NetworkId = "a5bbd213-e1d3-49b6-aed1-9df60ea94b9a",
});
var fip1 = new Flexibleengine.NetworkingFloatingipAssociateV2("fip1", new()
{
FloatingIp = "1.2.3.4",
PortId = port1.NetworkingPortV2Id,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.flexibleengine.NetworkingPortV2;
import com.pulumi.flexibleengine.NetworkingPortV2Args;
import com.pulumi.flexibleengine.NetworkingFloatingipAssociateV2;
import com.pulumi.flexibleengine.NetworkingFloatingipAssociateV2Args;
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 port1 = new NetworkingPortV2("port1", NetworkingPortV2Args.builder()
.networkId("a5bbd213-e1d3-49b6-aed1-9df60ea94b9a")
.build());
var fip1 = new NetworkingFloatingipAssociateV2("fip1", NetworkingFloatingipAssociateV2Args.builder()
.floatingIp("1.2.3.4")
.portId(port1.networkingPortV2Id())
.build());
}
}
resources:
port1:
type: flexibleengine:NetworkingPortV2
properties:
networkId: a5bbd213-e1d3-49b6-aed1-9df60ea94b9a
fip1:
type: flexibleengine:NetworkingFloatingipAssociateV2
properties:
floatingIp: 1.2.3.4
portId: ${port1.networkingPortV2Id}
Create NetworkingFloatingipAssociateV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new NetworkingFloatingipAssociateV2(name: string, args: NetworkingFloatingipAssociateV2Args, opts?: CustomResourceOptions);
@overload
def NetworkingFloatingipAssociateV2(resource_name: str,
args: NetworkingFloatingipAssociateV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def NetworkingFloatingipAssociateV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
floating_ip: Optional[str] = None,
port_id: Optional[str] = None,
networking_floatingip_associate_v2_id: Optional[str] = None,
region: Optional[str] = None)
func NewNetworkingFloatingipAssociateV2(ctx *Context, name string, args NetworkingFloatingipAssociateV2Args, opts ...ResourceOption) (*NetworkingFloatingipAssociateV2, error)
public NetworkingFloatingipAssociateV2(string name, NetworkingFloatingipAssociateV2Args args, CustomResourceOptions? opts = null)
public NetworkingFloatingipAssociateV2(String name, NetworkingFloatingipAssociateV2Args args)
public NetworkingFloatingipAssociateV2(String name, NetworkingFloatingipAssociateV2Args args, CustomResourceOptions options)
type: flexibleengine:NetworkingFloatingipAssociateV2
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 NetworkingFloatingipAssociateV2Args
- 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 NetworkingFloatingipAssociateV2Args
- 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 NetworkingFloatingipAssociateV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args NetworkingFloatingipAssociateV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args NetworkingFloatingipAssociateV2Args
- 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 networkingFloatingipAssociateV2Resource = new Flexibleengine.NetworkingFloatingipAssociateV2("networkingFloatingipAssociateV2Resource", new()
{
FloatingIp = "string",
PortId = "string",
NetworkingFloatingipAssociateV2Id = "string",
Region = "string",
});
example, err := flexibleengine.NewNetworkingFloatingipAssociateV2(ctx, "networkingFloatingipAssociateV2Resource", &flexibleengine.NetworkingFloatingipAssociateV2Args{
FloatingIp: pulumi.String("string"),
PortId: pulumi.String("string"),
NetworkingFloatingipAssociateV2Id: pulumi.String("string"),
Region: pulumi.String("string"),
})
var networkingFloatingipAssociateV2Resource = new NetworkingFloatingipAssociateV2("networkingFloatingipAssociateV2Resource", NetworkingFloatingipAssociateV2Args.builder()
.floatingIp("string")
.portId("string")
.networkingFloatingipAssociateV2Id("string")
.region("string")
.build());
networking_floatingip_associate_v2_resource = flexibleengine.NetworkingFloatingipAssociateV2("networkingFloatingipAssociateV2Resource",
floating_ip="string",
port_id="string",
networking_floatingip_associate_v2_id="string",
region="string")
const networkingFloatingipAssociateV2Resource = new flexibleengine.NetworkingFloatingipAssociateV2("networkingFloatingipAssociateV2Resource", {
floatingIp: "string",
portId: "string",
networkingFloatingipAssociateV2Id: "string",
region: "string",
});
type: flexibleengine:NetworkingFloatingipAssociateV2
properties:
floatingIp: string
networkingFloatingipAssociateV2Id: string
portId: string
region: string
NetworkingFloatingipAssociateV2 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 NetworkingFloatingipAssociateV2 resource accepts the following input properties:
- Floating
Ip string - IP Address of an existing floating IP.
- Port
Id string - ID of an existing port with at least one IP address to associate with this floating IP.
- Networking
Floatingip stringAssociate V2Id - Region string
- The region in which to obtain the V2 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).
- Floating
Ip string - IP Address of an existing floating IP.
- Port
Id string - ID of an existing port with at least one IP address to associate with this floating IP.
- Networking
Floatingip stringAssociate V2Id - Region string
- The region in which to obtain the V2 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).
- floating
Ip String - IP Address of an existing floating IP.
- port
Id String - ID of an existing port with at least one IP address to associate with this floating IP.
- networking
Floatingip StringAssociate V2Id - region String
- The region in which to obtain the V2 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).
- floating
Ip string - IP Address of an existing floating IP.
- port
Id string - ID of an existing port with at least one IP address to associate with this floating IP.
- networking
Floatingip stringAssociate V2Id - region string
- The region in which to obtain the V2 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).
- floating_
ip str - IP Address of an existing floating IP.
- port_
id str - ID of an existing port with at least one IP address to associate with this floating IP.
- networking_
floatingip_ strassociate_ v2_ id - region str
- The region in which to obtain the V2 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).
- floating
Ip String - IP Address of an existing floating IP.
- port
Id String - ID of an existing port with at least one IP address to associate with this floating IP.
- networking
Floatingip StringAssociate V2Id - region String
- The region in which to obtain the V2 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).
Outputs
All input properties are implicitly available as output properties. Additionally, the NetworkingFloatingipAssociateV2 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 NetworkingFloatingipAssociateV2 Resource
Get an existing NetworkingFloatingipAssociateV2 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?: NetworkingFloatingipAssociateV2State, opts?: CustomResourceOptions): NetworkingFloatingipAssociateV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
floating_ip: Optional[str] = None,
networking_floatingip_associate_v2_id: Optional[str] = None,
port_id: Optional[str] = None,
region: Optional[str] = None) -> NetworkingFloatingipAssociateV2
func GetNetworkingFloatingipAssociateV2(ctx *Context, name string, id IDInput, state *NetworkingFloatingipAssociateV2State, opts ...ResourceOption) (*NetworkingFloatingipAssociateV2, error)
public static NetworkingFloatingipAssociateV2 Get(string name, Input<string> id, NetworkingFloatingipAssociateV2State? state, CustomResourceOptions? opts = null)
public static NetworkingFloatingipAssociateV2 get(String name, Output<String> id, NetworkingFloatingipAssociateV2State state, CustomResourceOptions options)
resources: _: type: flexibleengine:NetworkingFloatingipAssociateV2 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.
- Floating
Ip string - IP Address of an existing floating IP.
- Networking
Floatingip stringAssociate V2Id - Port
Id string - ID of an existing port with at least one IP address to associate with this floating IP.
- Region string
- The region in which to obtain the V2 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).
- Floating
Ip string - IP Address of an existing floating IP.
- Networking
Floatingip stringAssociate V2Id - Port
Id string - ID of an existing port with at least one IP address to associate with this floating IP.
- Region string
- The region in which to obtain the V2 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).
- floating
Ip String - IP Address of an existing floating IP.
- networking
Floatingip StringAssociate V2Id - port
Id String - ID of an existing port with at least one IP address to associate with this floating IP.
- region String
- The region in which to obtain the V2 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).
- floating
Ip string - IP Address of an existing floating IP.
- networking
Floatingip stringAssociate V2Id - port
Id string - ID of an existing port with at least one IP address to associate with this floating IP.
- region string
- The region in which to obtain the V2 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).
- floating_
ip str - IP Address of an existing floating IP.
- networking_
floatingip_ strassociate_ v2_ id - port_
id str - ID of an existing port with at least one IP address to associate with this floating IP.
- region str
- The region in which to obtain the V2 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).
- floating
Ip String - IP Address of an existing floating IP.
- networking
Floatingip StringAssociate V2Id - port
Id String - ID of an existing port with at least one IP address to associate with this floating IP.
- region String
- The region in which to obtain the V2 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).
Import
Floating IP associations can be imported using the id
of the floating IP, e.g.
$ pulumi import flexibleengine:index/networkingFloatingipAssociateV2:NetworkingFloatingipAssociateV2 fip 2c7f39f3-702b-48d1-940c-b50384177ee1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
- License
- Notes
- This Pulumi package is based on the
flexibleengine
Terraform Provider.