1. Packages
  2. OpenStack
  3. API Docs
  4. compute
  5. InterfaceAttach
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

openstack.compute.InterfaceAttach

Explore with Pulumi AI

openstack logo
OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi

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

    Example Usage

    Basic Attachment

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const network1 = new openstack.networking.Network("network_1", {
        name: "network_1",
        adminStateUp: true,
    });
    const instance1 = new openstack.compute.Instance("instance_1", {
        name: "instance_1",
        securityGroups: ["default"],
    });
    const ai1 = new openstack.compute.InterfaceAttach("ai_1", {
        instanceId: instance1.id,
        networkId: network1OpenstackNetworkingPortV2.id,
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    network1 = openstack.networking.Network("network_1",
        name="network_1",
        admin_state_up=True)
    instance1 = openstack.compute.Instance("instance_1",
        name="instance_1",
        security_groups=["default"])
    ai1 = openstack.compute.InterfaceAttach("ai_1",
        instance_id=instance1.id,
        network_id=network1_openstack_networking_port_v2["id"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/compute"
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networking.NewNetwork(ctx, "network_1", &networking.NetworkArgs{
    			Name:         pulumi.String("network_1"),
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		instance1, err := compute.NewInstance(ctx, "instance_1", &compute.InstanceArgs{
    			Name: pulumi.String("instance_1"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewInterfaceAttach(ctx, "ai_1", &compute.InterfaceAttachArgs{
    			InstanceId: instance1.ID(),
    			NetworkId:  pulumi.Any(network1OpenstackNetworkingPortV2.Id),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new OpenStack.Networking.Network("network_1", new()
        {
            Name = "network_1",
            AdminStateUp = true,
        });
    
        var instance1 = new OpenStack.Compute.Instance("instance_1", new()
        {
            Name = "instance_1",
            SecurityGroups = new[]
            {
                "default",
            },
        });
    
        var ai1 = new OpenStack.Compute.InterfaceAttach("ai_1", new()
        {
            InstanceId = instance1.Id,
            NetworkId = network1OpenstackNetworkingPortV2.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.networking.Network;
    import com.pulumi.openstack.networking.NetworkArgs;
    import com.pulumi.openstack.compute.Instance;
    import com.pulumi.openstack.compute.InstanceArgs;
    import com.pulumi.openstack.compute.InterfaceAttach;
    import com.pulumi.openstack.compute.InterfaceAttachArgs;
    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 network1 = new Network("network1", NetworkArgs.builder()        
                .name("network_1")
                .adminStateUp("true")
                .build());
    
            var instance1 = new Instance("instance1", InstanceArgs.builder()        
                .name("instance_1")
                .securityGroups("default")
                .build());
    
            var ai1 = new InterfaceAttach("ai1", InterfaceAttachArgs.builder()        
                .instanceId(instance1.id())
                .networkId(network1OpenstackNetworkingPortV2.id())
                .build());
    
        }
    }
    
    resources:
      network1:
        type: openstack:networking:Network
        name: network_1
        properties:
          name: network_1
          adminStateUp: 'true'
      instance1:
        type: openstack:compute:Instance
        name: instance_1
        properties:
          name: instance_1
          securityGroups:
            - default
      ai1:
        type: openstack:compute:InterfaceAttach
        name: ai_1
        properties:
          instanceId: ${instance1.id}
          networkId: ${network1OpenstackNetworkingPortV2.id}
    

    Attachment Specifying a Fixed IP

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const network1 = new openstack.networking.Network("network_1", {
        name: "network_1",
        adminStateUp: true,
    });
    const instance1 = new openstack.compute.Instance("instance_1", {
        name: "instance_1",
        securityGroups: ["default"],
    });
    const ai1 = new openstack.compute.InterfaceAttach("ai_1", {
        instanceId: instance1.id,
        networkId: network1OpenstackNetworkingPortV2.id,
        fixedIp: "10.0.10.10",
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    network1 = openstack.networking.Network("network_1",
        name="network_1",
        admin_state_up=True)
    instance1 = openstack.compute.Instance("instance_1",
        name="instance_1",
        security_groups=["default"])
    ai1 = openstack.compute.InterfaceAttach("ai_1",
        instance_id=instance1.id,
        network_id=network1_openstack_networking_port_v2["id"],
        fixed_ip="10.0.10.10")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/compute"
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := networking.NewNetwork(ctx, "network_1", &networking.NetworkArgs{
    			Name:         pulumi.String("network_1"),
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		instance1, err := compute.NewInstance(ctx, "instance_1", &compute.InstanceArgs{
    			Name: pulumi.String("instance_1"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewInterfaceAttach(ctx, "ai_1", &compute.InterfaceAttachArgs{
    			InstanceId: instance1.ID(),
    			NetworkId:  pulumi.Any(network1OpenstackNetworkingPortV2.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 OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new OpenStack.Networking.Network("network_1", new()
        {
            Name = "network_1",
            AdminStateUp = true,
        });
    
        var instance1 = new OpenStack.Compute.Instance("instance_1", new()
        {
            Name = "instance_1",
            SecurityGroups = new[]
            {
                "default",
            },
        });
    
        var ai1 = new OpenStack.Compute.InterfaceAttach("ai_1", new()
        {
            InstanceId = instance1.Id,
            NetworkId = network1OpenstackNetworkingPortV2.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.openstack.networking.Network;
    import com.pulumi.openstack.networking.NetworkArgs;
    import com.pulumi.openstack.compute.Instance;
    import com.pulumi.openstack.compute.InstanceArgs;
    import com.pulumi.openstack.compute.InterfaceAttach;
    import com.pulumi.openstack.compute.InterfaceAttachArgs;
    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 network1 = new Network("network1", NetworkArgs.builder()        
                .name("network_1")
                .adminStateUp("true")
                .build());
    
            var instance1 = new Instance("instance1", InstanceArgs.builder()        
                .name("instance_1")
                .securityGroups("default")
                .build());
    
            var ai1 = new InterfaceAttach("ai1", InterfaceAttachArgs.builder()        
                .instanceId(instance1.id())
                .networkId(network1OpenstackNetworkingPortV2.id())
                .fixedIp("10.0.10.10")
                .build());
    
        }
    }
    
    resources:
      network1:
        type: openstack:networking:Network
        name: network_1
        properties:
          name: network_1
          adminStateUp: 'true'
      instance1:
        type: openstack:compute:Instance
        name: instance_1
        properties:
          name: instance_1
          securityGroups:
            - default
      ai1:
        type: openstack:compute:InterfaceAttach
        name: ai_1
        properties:
          instanceId: ${instance1.id}
          networkId: ${network1OpenstackNetworkingPortV2.id}
          fixedIp: 10.0.10.10
    

    Attachment Using an Existing Port

    import * as pulumi from "@pulumi/pulumi";
    import * as openstack from "@pulumi/openstack";
    
    const network1 = new openstack.networking.Network("network_1", {
        name: "network_1",
        adminStateUp: true,
    });
    const port1 = new openstack.networking.Port("port_1", {
        name: "port_1",
        networkId: network1.id,
        adminStateUp: true,
    });
    const instance1 = new openstack.compute.Instance("instance_1", {
        name: "instance_1",
        securityGroups: ["default"],
    });
    const ai1 = new openstack.compute.InterfaceAttach("ai_1", {
        instanceId: instance1.id,
        portId: port1.id,
    });
    
    import pulumi
    import pulumi_openstack as openstack
    
    network1 = openstack.networking.Network("network_1",
        name="network_1",
        admin_state_up=True)
    port1 = openstack.networking.Port("port_1",
        name="port_1",
        network_id=network1.id,
        admin_state_up=True)
    instance1 = openstack.compute.Instance("instance_1",
        name="instance_1",
        security_groups=["default"])
    ai1 = openstack.compute.InterfaceAttach("ai_1",
        instance_id=instance1.id,
        port_id=port1.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/compute"
    	"github.com/pulumi/pulumi-openstack/sdk/v4/go/openstack/networking"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		network1, err := networking.NewNetwork(ctx, "network_1", &networking.NetworkArgs{
    			Name:         pulumi.String("network_1"),
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		port1, err := networking.NewPort(ctx, "port_1", &networking.PortArgs{
    			Name:         pulumi.String("port_1"),
    			NetworkId:    network1.ID(),
    			AdminStateUp: pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		instance1, err := compute.NewInstance(ctx, "instance_1", &compute.InstanceArgs{
    			Name: pulumi.String("instance_1"),
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("default"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewInterfaceAttach(ctx, "ai_1", &compute.InterfaceAttachArgs{
    			InstanceId: instance1.ID(),
    			PortId:     port1.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using OpenStack = Pulumi.OpenStack;
    
    return await Deployment.RunAsync(() => 
    {
        var network1 = new OpenStack.Networking.Network("network_1", new()
        {
            Name = "network_1",
            AdminStateUp = true,
        });
    
        var port1 = new OpenStack.Networking.Port("port_1", new()
        {
            Name = "port_1",
            NetworkId = network1.Id,
            AdminStateUp = true,
        });
    
        var instance1 = new OpenStack.Compute.Instance("instance_1", new()
        {
            Name = "instance_1",
            SecurityGroups = new[]
            {
                "default",
            },
        });
    
        var ai1 = new OpenStack.Compute.InterfaceAttach("ai_1", new()
        {
            InstanceId = instance1.Id,
            PortId = port1.Id,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.openstack.networking.Network;
    import com.pulumi.openstack.networking.NetworkArgs;
    import com.pulumi.openstack.networking.Port;
    import com.pulumi.openstack.networking.PortArgs;
    import com.pulumi.openstack.compute.Instance;
    import com.pulumi.openstack.compute.InstanceArgs;
    import com.pulumi.openstack.compute.InterfaceAttach;
    import com.pulumi.openstack.compute.InterfaceAttachArgs;
    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 network1 = new Network("network1", NetworkArgs.builder()        
                .name("network_1")
                .adminStateUp("true")
                .build());
    
            var port1 = new Port("port1", PortArgs.builder()        
                .name("port_1")
                .networkId(network1.id())
                .adminStateUp("true")
                .build());
    
            var instance1 = new Instance("instance1", InstanceArgs.builder()        
                .name("instance_1")
                .securityGroups("default")
                .build());
    
            var ai1 = new InterfaceAttach("ai1", InterfaceAttachArgs.builder()        
                .instanceId(instance1.id())
                .portId(port1.id())
                .build());
    
        }
    }
    
    resources:
      network1:
        type: openstack:networking:Network
        name: network_1
        properties:
          name: network_1
          adminStateUp: 'true'
      port1:
        type: openstack:networking:Port
        name: port_1
        properties:
          name: port_1
          networkId: ${network1.id}
          adminStateUp: 'true'
      instance1:
        type: openstack:compute:Instance
        name: instance_1
        properties:
          name: instance_1
          securityGroups:
            - default
      ai1:
        type: openstack:compute:InterfaceAttach
        name: ai_1
        properties:
          instanceId: ${instance1.id}
          portId: ${port1.id}
    

    Create InterfaceAttach Resource

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

    Constructor syntax

    new InterfaceAttach(name: string, args: InterfaceAttachArgs, opts?: CustomResourceOptions);
    @overload
    def InterfaceAttach(resource_name: str,
                        args: InterfaceAttachArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def InterfaceAttach(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        instance_id: Optional[str] = None,
                        fixed_ip: Optional[str] = None,
                        network_id: Optional[str] = None,
                        port_id: Optional[str] = None,
                        region: Optional[str] = None)
    func NewInterfaceAttach(ctx *Context, name string, args InterfaceAttachArgs, opts ...ResourceOption) (*InterfaceAttach, error)
    public InterfaceAttach(string name, InterfaceAttachArgs args, CustomResourceOptions? opts = null)
    public InterfaceAttach(String name, InterfaceAttachArgs args)
    public InterfaceAttach(String name, InterfaceAttachArgs args, CustomResourceOptions options)
    
    type: openstack:compute:InterfaceAttach
    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 InterfaceAttachArgs
    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 InterfaceAttachArgs
    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 InterfaceAttachArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InterfaceAttachArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InterfaceAttachArgs
    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 interfaceAttachResource = new OpenStack.Compute.InterfaceAttach("interfaceAttachResource", new()
    {
        InstanceId = "string",
        FixedIp = "string",
        NetworkId = "string",
        PortId = "string",
        Region = "string",
    });
    
    example, err := compute.NewInterfaceAttach(ctx, "interfaceAttachResource", &compute.InterfaceAttachArgs{
    	InstanceId: pulumi.String("string"),
    	FixedIp:    pulumi.String("string"),
    	NetworkId:  pulumi.String("string"),
    	PortId:     pulumi.String("string"),
    	Region:     pulumi.String("string"),
    })
    
    var interfaceAttachResource = new InterfaceAttach("interfaceAttachResource", InterfaceAttachArgs.builder()
        .instanceId("string")
        .fixedIp("string")
        .networkId("string")
        .portId("string")
        .region("string")
        .build());
    
    interface_attach_resource = openstack.compute.InterfaceAttach("interfaceAttachResource",
        instance_id="string",
        fixed_ip="string",
        network_id="string",
        port_id="string",
        region="string")
    
    const interfaceAttachResource = new openstack.compute.InterfaceAttach("interfaceAttachResource", {
        instanceId: "string",
        fixedIp: "string",
        networkId: "string",
        portId: "string",
        region: "string",
    });
    
    type: openstack:compute:InterfaceAttach
    properties:
        fixedIp: string
        instanceId: string
        networkId: string
        portId: string
        region: string
    

    InterfaceAttach Resource Properties

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

    Inputs

    The InterfaceAttach resource accepts the following input properties:

    InstanceId string
    The ID of the Instance to attach the Port or Network to.
    FixedIp string
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    PortId string
    The ID of the Port to attach to an Instance. NOTE: 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.
    InstanceId string
    The ID of the Instance to attach the Port or Network to.
    FixedIp string
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    PortId string
    The ID of the Port to attach to an Instance. NOTE: 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.
    instanceId String
    The ID of the Instance to attach the Port or Network to.
    fixedIp String
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    portId String
    The ID of the Port to attach to an Instance. NOTE: 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.
    instanceId string
    The ID of the Instance to attach the Port or Network to.
    fixedIp string
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    portId string
    The ID of the Port to attach to an Instance. NOTE: 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.
    instance_id str
    The ID of the Instance to attach the Port or Network to.
    fixed_ip str
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    port_id str
    The ID of the Port to attach to an Instance. NOTE: 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.
    instanceId String
    The ID of the Instance to attach the Port or Network to.
    fixedIp String
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    portId String
    The ID of the Port to attach to an Instance. NOTE: 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.

    Outputs

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

    Get an existing InterfaceAttach 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?: InterfaceAttachState, opts?: CustomResourceOptions): InterfaceAttach
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = 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) -> InterfaceAttach
    func GetInterfaceAttach(ctx *Context, name string, id IDInput, state *InterfaceAttachState, opts ...ResourceOption) (*InterfaceAttach, error)
    public static InterfaceAttach Get(string name, Input<string> id, InterfaceAttachState? state, CustomResourceOptions? opts = null)
    public static InterfaceAttach get(String name, Output<String> id, InterfaceAttachState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    PortId string
    The ID of the Port to attach to an Instance. NOTE: 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.
    FixedIp string
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    PortId string
    The ID of the Port to attach to an Instance. NOTE: 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.
    fixedIp String
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    portId String
    The ID of the Port to attach to an Instance. NOTE: 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.
    fixedIp string
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    portId string
    The ID of the Port to attach to an Instance. NOTE: 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.
    fixed_ip str
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    port_id str
    The ID of the Port to attach to an Instance. NOTE: 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.
    fixedIp String
    An IP address to assosciate with the port. NOTE: This option cannot be used with port_id. You must specifiy 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. NOTE: This option and port_id are mutually exclusive.
    portId String
    The ID of the Port to attach to an Instance. NOTE: 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.

    Import

    Interface Attachments can be imported using the Instance ID and Port ID separated by a slash, e.g.

    $ pulumi import openstack:compute/interfaceAttach:InterfaceAttach 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
    OpenStack pulumi/pulumi-openstack
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the openstack Terraform Provider.
    openstack logo
    OpenStack v4.0.0 published on Tuesday, May 21, 2024 by Pulumi