1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. ComputeInterfaceAttachV2
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.ComputeInterfaceAttachV2

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Attaches a Network Interface (a Port) to an Instance using the FlexibleEngine Compute (Nova) v2 API.

    Example Usage

    Basic Attachment

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const exampleVpc = new flexibleengine.VpcV1("exampleVpc", {cidr: "192.168.0.0/16"});
    const exampleSubnet = new flexibleengine.VpcSubnetV1("exampleSubnet", {
        cidr: "192.168.0.0/24",
        gatewayIp: "192.168.0.1",
        vpcId: exampleVpc.vpcV1Id,
    });
    const exampleInstance = new flexibleengine.ComputeInstanceV2("exampleInstance", {securityGroups: ["default"]});
    const exampleInterfaceAttach = new flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach", {
        instanceId: exampleInstance.computeInstanceV2Id,
        networkId: exampleSubnet.vpcSubnetV1Id,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    example_vpc = flexibleengine.VpcV1("exampleVpc", cidr="192.168.0.0/16")
    example_subnet = flexibleengine.VpcSubnetV1("exampleSubnet",
        cidr="192.168.0.0/24",
        gateway_ip="192.168.0.1",
        vpc_id=example_vpc.vpc_v1_id)
    example_instance = flexibleengine.ComputeInstanceV2("exampleInstance", security_groups=["default"])
    example_interface_attach = flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach",
        instance_id=example_instance.compute_instance_v2_id,
        network_id=example_subnet.vpc_subnet_v1_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 {
    		exampleVpc, err := flexibleengine.NewVpcV1(ctx, "exampleVpc", &flexibleengine.VpcV1Args{
    			Cidr: pulumi.String("192.168.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleSubnet, err := flexibleengine.NewVpcSubnetV1(ctx, "exampleSubnet", &flexibleengine.VpcSubnetV1Args{
    			Cidr:      pulumi.String("192.168.0.0/24"),
    			GatewayIp: pulumi.String("192.168.0.1"),
    			VpcId:     exampleVpc.VpcV1Id,
    		})
    		if err != nil {
    			return err
    		}
    		exampleInstance, err := flexibleengine.NewComputeInstanceV2(ctx, "exampleInstance", &flexibleengine.ComputeInstanceV2Args{
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = flexibleengine.NewComputeInterfaceAttachV2(ctx, "exampleInterfaceAttach", &flexibleengine.ComputeInterfaceAttachV2Args{
    			InstanceId: exampleInstance.ComputeInstanceV2Id,
    			NetworkId:  exampleSubnet.VpcSubnetV1Id,
    		})
    		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 exampleVpc = new Flexibleengine.VpcV1("exampleVpc", new()
        {
            Cidr = "192.168.0.0/16",
        });
    
        var exampleSubnet = new Flexibleengine.VpcSubnetV1("exampleSubnet", new()
        {
            Cidr = "192.168.0.0/24",
            GatewayIp = "192.168.0.1",
            VpcId = exampleVpc.VpcV1Id,
        });
    
        var exampleInstance = new Flexibleengine.ComputeInstanceV2("exampleInstance", new()
        {
            SecurityGroups = new[]
            {
                "default",
            },
        });
    
        var exampleInterfaceAttach = new Flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach", new()
        {
            InstanceId = exampleInstance.ComputeInstanceV2Id,
            NetworkId = exampleSubnet.VpcSubnetV1Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.VpcV1;
    import com.pulumi.flexibleengine.VpcV1Args;
    import com.pulumi.flexibleengine.VpcSubnetV1;
    import com.pulumi.flexibleengine.VpcSubnetV1Args;
    import com.pulumi.flexibleengine.ComputeInstanceV2;
    import com.pulumi.flexibleengine.ComputeInstanceV2Args;
    import com.pulumi.flexibleengine.ComputeInterfaceAttachV2;
    import com.pulumi.flexibleengine.ComputeInterfaceAttachV2Args;
    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 exampleVpc = new VpcV1("exampleVpc", VpcV1Args.builder()
                .cidr("192.168.0.0/16")
                .build());
    
            var exampleSubnet = new VpcSubnetV1("exampleSubnet", VpcSubnetV1Args.builder()
                .cidr("192.168.0.0/24")
                .gatewayIp("192.168.0.1")
                .vpcId(exampleVpc.vpcV1Id())
                .build());
    
            var exampleInstance = new ComputeInstanceV2("exampleInstance", ComputeInstanceV2Args.builder()
                .securityGroups("default")
                .build());
    
            var exampleInterfaceAttach = new ComputeInterfaceAttachV2("exampleInterfaceAttach", ComputeInterfaceAttachV2Args.builder()
                .instanceId(exampleInstance.computeInstanceV2Id())
                .networkId(exampleSubnet.vpcSubnetV1Id())
                .build());
    
        }
    }
    
    resources:
      exampleVpc:
        type: flexibleengine:VpcV1
        properties:
          cidr: 192.168.0.0/16
      exampleSubnet:
        type: flexibleengine:VpcSubnetV1
        properties:
          cidr: 192.168.0.0/24
          gatewayIp: 192.168.0.1
          vpcId: ${exampleVpc.vpcV1Id}
      exampleInstance:
        type: flexibleengine:ComputeInstanceV2
        properties:
          securityGroups:
            - default
      exampleInterfaceAttach:
        type: flexibleengine:ComputeInterfaceAttachV2
        properties:
          instanceId: ${exampleInstance.computeInstanceV2Id}
          networkId: ${exampleSubnet.vpcSubnetV1Id}
    

    Attachment Specifying a Fixed IP

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const exampleInterfaceAttach = new flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach", {
        instanceId: flexibleengine_compute_instance_v2.example_instance.id,
        networkId: flexibleengine_vpc_subnet_v1.example_subnet.id,
        fixedIp: "10.0.10.10",
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    example_interface_attach = flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach",
        instance_id=flexibleengine_compute_instance_v2["example_instance"]["id"],
        network_id=flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
        fixed_ip="10.0.10.10")
    
    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 {
    		_, err := flexibleengine.NewComputeInterfaceAttachV2(ctx, "exampleInterfaceAttach", &flexibleengine.ComputeInterfaceAttachV2Args{
    			InstanceId: pulumi.Any(flexibleengine_compute_instance_v2.Example_instance.Id),
    			NetworkId:  pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
    			FixedIp:    pulumi.String("10.0.10.10"),
    		})
    		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 exampleInterfaceAttach = new Flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach", new()
        {
            InstanceId = flexibleengine_compute_instance_v2.Example_instance.Id,
            NetworkId = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
            FixedIp = "10.0.10.10",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.ComputeInterfaceAttachV2;
    import com.pulumi.flexibleengine.ComputeInterfaceAttachV2Args;
    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 exampleInterfaceAttach = new ComputeInterfaceAttachV2("exampleInterfaceAttach", ComputeInterfaceAttachV2Args.builder()
                .instanceId(flexibleengine_compute_instance_v2.example_instance().id())
                .networkId(flexibleengine_vpc_subnet_v1.example_subnet().id())
                .fixedIp("10.0.10.10")
                .build());
    
        }
    }
    
    resources:
      exampleInterfaceAttach:
        type: flexibleengine:ComputeInterfaceAttachV2
        properties:
          instanceId: ${flexibleengine_compute_instance_v2.example_instance.id}
          networkId: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
          fixedIp: 10.0.10.10
    

    Attachment Using an Existing Port

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const examplePort = new flexibleengine.NetworkingPortV2("examplePort", {
        networkId: flexibleengine_vpc_subnet_v1.example_subnet.id,
        adminStateUp: true,
    });
    const exampleInterfaceAttach = new flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach", {
        instanceId: flexibleengine_compute_instance_v2.example_instance.id,
        portId: examplePort.networkingPortV2Id,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    example_port = flexibleengine.NetworkingPortV2("examplePort",
        network_id=flexibleengine_vpc_subnet_v1["example_subnet"]["id"],
        admin_state_up=True)
    example_interface_attach = flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach",
        instance_id=flexibleengine_compute_instance_v2["example_instance"]["id"],
        port_id=example_port.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 {
    		examplePort, err := flexibleengine.NewNetworkingPortV2(ctx, "examplePort", &flexibleengine.NetworkingPortV2Args{
    			NetworkId:    pulumi.Any(flexibleengine_vpc_subnet_v1.Example_subnet.Id),
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = flexibleengine.NewComputeInterfaceAttachV2(ctx, "exampleInterfaceAttach", &flexibleengine.ComputeInterfaceAttachV2Args{
    			InstanceId: pulumi.Any(flexibleengine_compute_instance_v2.Example_instance.Id),
    			PortId:     examplePort.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 examplePort = new Flexibleengine.NetworkingPortV2("examplePort", new()
        {
            NetworkId = flexibleengine_vpc_subnet_v1.Example_subnet.Id,
            AdminStateUp = true,
        });
    
        var exampleInterfaceAttach = new Flexibleengine.ComputeInterfaceAttachV2("exampleInterfaceAttach", new()
        {
            InstanceId = flexibleengine_compute_instance_v2.Example_instance.Id,
            PortId = examplePort.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.ComputeInterfaceAttachV2;
    import com.pulumi.flexibleengine.ComputeInterfaceAttachV2Args;
    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 examplePort = new NetworkingPortV2("examplePort", NetworkingPortV2Args.builder()
                .networkId(flexibleengine_vpc_subnet_v1.example_subnet().id())
                .adminStateUp("true")
                .build());
    
            var exampleInterfaceAttach = new ComputeInterfaceAttachV2("exampleInterfaceAttach", ComputeInterfaceAttachV2Args.builder()
                .instanceId(flexibleengine_compute_instance_v2.example_instance().id())
                .portId(examplePort.networkingPortV2Id())
                .build());
    
        }
    }
    
    resources:
      examplePort:
        type: flexibleengine:NetworkingPortV2
        properties:
          networkId: ${flexibleengine_vpc_subnet_v1.example_subnet.id}
          adminStateUp: 'true'
      exampleInterfaceAttach:
        type: flexibleengine:ComputeInterfaceAttachV2
        properties:
          instanceId: ${flexibleengine_compute_instance_v2.example_instance.id}
          portId: ${examplePort.networkingPortV2Id}
    

    Create ComputeInterfaceAttachV2 Resource

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

    Constructor syntax

    new ComputeInterfaceAttachV2(name: string, args: ComputeInterfaceAttachV2Args, opts?: CustomResourceOptions);
    @overload
    def ComputeInterfaceAttachV2(resource_name: str,
                                 args: ComputeInterfaceAttachV2Args,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ComputeInterfaceAttachV2(resource_name: str,
                                 opts: Optional[ResourceOptions] = None,
                                 instance_id: Optional[str] = None,
                                 compute_interface_attach_v2_id: Optional[str] = None,
                                 fixed_ip: Optional[str] = None,
                                 network_id: Optional[str] = None,
                                 port_id: Optional[str] = None,
                                 region: Optional[str] = None,
                                 timeouts: Optional[ComputeInterfaceAttachV2TimeoutsArgs] = None)
    func NewComputeInterfaceAttachV2(ctx *Context, name string, args ComputeInterfaceAttachV2Args, opts ...ResourceOption) (*ComputeInterfaceAttachV2, error)
    public ComputeInterfaceAttachV2(string name, ComputeInterfaceAttachV2Args args, CustomResourceOptions? opts = null)
    public ComputeInterfaceAttachV2(String name, ComputeInterfaceAttachV2Args args)
    public ComputeInterfaceAttachV2(String name, ComputeInterfaceAttachV2Args args, CustomResourceOptions options)
    
    type: flexibleengine:ComputeInterfaceAttachV2
    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 ComputeInterfaceAttachV2Args
    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 ComputeInterfaceAttachV2Args
    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 ComputeInterfaceAttachV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ComputeInterfaceAttachV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ComputeInterfaceAttachV2Args
    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 computeInterfaceAttachV2Resource = new Flexibleengine.ComputeInterfaceAttachV2("computeInterfaceAttachV2Resource", new()
    {
        InstanceId = "string",
        ComputeInterfaceAttachV2Id = "string",
        FixedIp = "string",
        NetworkId = "string",
        PortId = "string",
        Region = "string",
        Timeouts = new Flexibleengine.Inputs.ComputeInterfaceAttachV2TimeoutsArgs
        {
            Create = "string",
            Delete = "string",
        },
    });
    
    example, err := flexibleengine.NewComputeInterfaceAttachV2(ctx, "computeInterfaceAttachV2Resource", &flexibleengine.ComputeInterfaceAttachV2Args{
    	InstanceId:                 pulumi.String("string"),
    	ComputeInterfaceAttachV2Id: pulumi.String("string"),
    	FixedIp:                    pulumi.String("string"),
    	NetworkId:                  pulumi.String("string"),
    	PortId:                     pulumi.String("string"),
    	Region:                     pulumi.String("string"),
    	Timeouts: &flexibleengine.ComputeInterfaceAttachV2TimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    	},
    })
    
    var computeInterfaceAttachV2Resource = new ComputeInterfaceAttachV2("computeInterfaceAttachV2Resource", ComputeInterfaceAttachV2Args.builder()
        .instanceId("string")
        .computeInterfaceAttachV2Id("string")
        .fixedIp("string")
        .networkId("string")
        .portId("string")
        .region("string")
        .timeouts(ComputeInterfaceAttachV2TimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .build())
        .build());
    
    compute_interface_attach_v2_resource = flexibleengine.ComputeInterfaceAttachV2("computeInterfaceAttachV2Resource",
        instance_id="string",
        compute_interface_attach_v2_id="string",
        fixed_ip="string",
        network_id="string",
        port_id="string",
        region="string",
        timeouts={
            "create": "string",
            "delete": "string",
        })
    
    const computeInterfaceAttachV2Resource = new flexibleengine.ComputeInterfaceAttachV2("computeInterfaceAttachV2Resource", {
        instanceId: "string",
        computeInterfaceAttachV2Id: "string",
        fixedIp: "string",
        networkId: "string",
        portId: "string",
        region: "string",
        timeouts: {
            create: "string",
            "delete": "string",
        },
    });
    
    type: flexibleengine:ComputeInterfaceAttachV2
    properties:
        computeInterfaceAttachV2Id: string
        fixedIp: string
        instanceId: string
        networkId: string
        portId: string
        region: string
        timeouts:
            create: string
            delete: string
    

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

    InstanceId string
    The ID of the Instance to attach the Port or Network to.
    ComputeInterfaceAttachV2Id string
    FixedIp string
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    NetworkId string
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    PortId string
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    Region string
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    Timeouts ComputeInterfaceAttachV2Timeouts
    InstanceId string
    The ID of the Instance to attach the Port or Network to.
    ComputeInterfaceAttachV2Id string
    FixedIp string
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    NetworkId string
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    PortId string
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    Region string
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    Timeouts ComputeInterfaceAttachV2TimeoutsArgs
    instanceId String
    The ID of the Instance to attach the Port or Network to.
    computeInterfaceAttachV2Id String
    fixedIp String
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    networkId String
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    portId String
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    region String
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    timeouts ComputeInterfaceAttachV2Timeouts
    instanceId string
    The ID of the Instance to attach the Port or Network to.
    computeInterfaceAttachV2Id string
    fixedIp string
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    networkId string
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    portId string
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    region string
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    timeouts ComputeInterfaceAttachV2Timeouts
    instance_id str
    The ID of the Instance to attach the Port or Network to.
    compute_interface_attach_v2_id str
    fixed_ip str
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    network_id str
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    port_id str
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    region str
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    timeouts ComputeInterfaceAttachV2TimeoutsArgs
    instanceId String
    The ID of the Instance to attach the Port or Network to.
    computeInterfaceAttachV2Id String
    fixedIp String
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    networkId String
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    portId String
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    region String
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ComputeInterfaceAttachV2 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 ComputeInterfaceAttachV2 Resource

    Get an existing ComputeInterfaceAttachV2 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?: ComputeInterfaceAttachV2State, opts?: CustomResourceOptions): ComputeInterfaceAttachV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compute_interface_attach_v2_id: Optional[str] = None,
            fixed_ip: Optional[str] = None,
            instance_id: Optional[str] = None,
            network_id: Optional[str] = None,
            port_id: Optional[str] = None,
            region: Optional[str] = None,
            timeouts: Optional[ComputeInterfaceAttachV2TimeoutsArgs] = None) -> ComputeInterfaceAttachV2
    func GetComputeInterfaceAttachV2(ctx *Context, name string, id IDInput, state *ComputeInterfaceAttachV2State, opts ...ResourceOption) (*ComputeInterfaceAttachV2, error)
    public static ComputeInterfaceAttachV2 Get(string name, Input<string> id, ComputeInterfaceAttachV2State? state, CustomResourceOptions? opts = null)
    public static ComputeInterfaceAttachV2 get(String name, Output<String> id, ComputeInterfaceAttachV2State state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:ComputeInterfaceAttachV2    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:
    ComputeInterfaceAttachV2Id string
    FixedIp string
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    InstanceId string
    The ID of the Instance to attach the Port or Network to.
    NetworkId string
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    PortId string
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    Region string
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    Timeouts ComputeInterfaceAttachV2Timeouts
    ComputeInterfaceAttachV2Id string
    FixedIp string
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    InstanceId string
    The ID of the Instance to attach the Port or Network to.
    NetworkId string
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    PortId string
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    Region string
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    Timeouts ComputeInterfaceAttachV2TimeoutsArgs
    computeInterfaceAttachV2Id String
    fixedIp String
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    instanceId String
    The ID of the Instance to attach the Port or Network to.
    networkId String
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    portId String
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    region String
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    timeouts ComputeInterfaceAttachV2Timeouts
    computeInterfaceAttachV2Id string
    fixedIp string
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    instanceId string
    The ID of the Instance to attach the Port or Network to.
    networkId string
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    portId string
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    region string
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    timeouts ComputeInterfaceAttachV2Timeouts
    compute_interface_attach_v2_id str
    fixed_ip str
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    instance_id str
    The ID of the Instance to attach the Port or Network to.
    network_id str
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    port_id str
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    region str
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    timeouts ComputeInterfaceAttachV2TimeoutsArgs
    computeInterfaceAttachV2Id String
    fixedIp String
    An IP address to associate with the port. This option cannot be used with port_id. You must specify a network_id. The IP address must lie in a range on the supplied network.
    instanceId String
    The ID of the Instance to attach the Port or Network to.
    networkId String
    The ID of the Network to attach to an Instance. A port will be created automatically. This option and port_id are mutually exclusive.
    portId String
    The ID of the Port to attach to an Instance. This option and network_id are mutually exclusive.
    region String
    The region in which to create the interface attachment. If omitted, the region argument of the provider is used. Changing this creates a new attachment.
    timeouts Property Map

    Supporting Types

    ComputeInterfaceAttachV2Timeouts, ComputeInterfaceAttachV2TimeoutsArgs

    Create string
    Delete string
    Create string
    Delete string
    create String
    delete String
    create string
    delete string
    create str
    delete str
    create String
    delete String

    Import

    Interface Attachments can be imported using the Instance ID and Port ID

    separated by a slash, e.g.

    $ pulumi import flexibleengine:index/computeInterfaceAttachV2:ComputeInterfaceAttachV2 ai_1 89c60255-9bd6-460c-822a-e2b959ede9d2/45670584-225f-46c3-b33e-6707b589b666
    

    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.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud