1. Packages
  2. Openstack Provider
  3. API Docs
  4. compute
  5. InterfaceAttach
OpenStack v5.0.3 published on Wednesday, Feb 12, 2025 by Pulumi

openstack.compute.InterfaceAttach

Explore with Pulumi AI

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: network1.id,
});
Copy
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.id)
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi-openstack/sdk/v5/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
		}
		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:  network1.ID(),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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 = network1.Id,
    });

});
Copy
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(network1.id())
            .build());

    }
}
Copy
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: ${network1.id}
Copy

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",
});
Copy
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")
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi-openstack/sdk/v5/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
	})
}
Copy
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",
    });

});
Copy
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());

    }
}
Copy
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
Copy

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,
});
Copy
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)
Copy
package main

import (
	"github.com/pulumi/pulumi-openstack/sdk/v5/go/openstack/compute"
	"github.com/pulumi/pulumi-openstack/sdk/v5/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
	})
}
Copy
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,
    });

});
Copy
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());

    }
}
Copy
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}
Copy

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 This property is required. string
The unique name of the resource.
args This property is required. InterfaceAttachArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. 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 This property is required. string
The unique name of the resource.
args This property is required. InterfaceAttachArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. InterfaceAttachArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. 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",
});
Copy
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"),
})
Copy
var interfaceAttachResource = new InterfaceAttach("interfaceAttachResource", InterfaceAttachArgs.builder()
    .instanceId("string")
    .fixedIp("string")
    .networkId("string")
    .portId("string")
    .region("string")
    .build());
Copy
interface_attach_resource = openstack.compute.InterfaceAttach("interfaceAttachResource",
    instance_id="string",
    fixed_ip="string",
    network_id="string",
    port_id="string",
    region="string")
Copy
const interfaceAttachResource = new openstack.compute.InterfaceAttach("interfaceAttachResource", {
    instanceId: "string",
    fixedIp: "string",
    networkId: "string",
    portId: "string",
    region: "string",
});
Copy
type: openstack:compute:InterfaceAttach
properties:
    fixedIp: string
    instanceId: string
    networkId: string
    portId: string
    region: string
Copy

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

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The InterfaceAttach resource accepts the following input properties:

InstanceId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Instance to attach the Port or Network to.
FixedIp Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
Region Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Instance to attach the Port or Network to.
FixedIp Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
Region Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Instance to attach the Port or Network to.
fixedIp Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
region Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
string
The ID of the Instance to attach the Port or Network to.
fixedIp Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
region Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
str
The ID of the Instance to attach the Port or Network to.
fixed_ip Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
region Changes to this property will trigger replacement. 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
This property is required.
Changes to this property will trigger replacement.
String
The ID of the Instance to attach the Port or Network to.
fixedIp Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
region Changes to this property will trigger replacement. 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)
resources:  _:    type: openstack:compute:InterfaceAttach    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Instance to attach the Port or Network to.
NetworkId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
Region Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Instance to attach the Port or Network to.
NetworkId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
Region Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the Instance to attach the Port or Network to.
networkId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
region Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Instance to attach the Port or Network to.
networkId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. string
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
region Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The ID of the Instance to attach the Port or Network to.
network_id Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. str
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
region Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the Instance to attach the Port or Network to.
networkId Changes to this property will trigger replacement. 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 Changes to this property will trigger replacement. String
The ID of the Port to attach to an Instance. NOTE: This option and network_id are mutually exclusive.
region Changes to this property will trigger replacement. 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
Copy

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.