1. Packages
  2. stackit
  3. API Docs
  4. NetworkInterface
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud
stackit logo
Viewing docs for stackit v0.0.4
published on Friday, Feb 20, 2026 by stackitcloud

    Network interface resource schema. Must have a region specified in the provider configuration.

    Example Usage

    resource "stackit_network_interface" "example" {
      project_id         = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      network_id         = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
      allowed_addresses  = ["192.168.0.0/24"]
      security_group_ids = ["xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"]
    }
    
    # Only use the import statement, if you want to import an existing network interface
    import {
      to = stackit_network_interface.import-example
      id = "${var.project_id},${var.region},${var.network_id},${var.network_interface_id}"
    }
    

    Create NetworkInterface Resource

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

    Constructor syntax

    new NetworkInterface(name: string, args: NetworkInterfaceArgs, opts?: CustomResourceOptions);
    @overload
    def NetworkInterface(resource_name: str,
                         args: NetworkInterfaceArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def NetworkInterface(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         network_id: Optional[str] = None,
                         project_id: Optional[str] = None,
                         allowed_addresses: Optional[Sequence[str]] = None,
                         ipv4: Optional[str] = None,
                         labels: Optional[Mapping[str, str]] = None,
                         name: Optional[str] = None,
                         region: Optional[str] = None,
                         security: Optional[bool] = None,
                         security_group_ids: Optional[Sequence[str]] = None)
    func NewNetworkInterface(ctx *Context, name string, args NetworkInterfaceArgs, opts ...ResourceOption) (*NetworkInterface, error)
    public NetworkInterface(string name, NetworkInterfaceArgs args, CustomResourceOptions? opts = null)
    public NetworkInterface(String name, NetworkInterfaceArgs args)
    public NetworkInterface(String name, NetworkInterfaceArgs args, CustomResourceOptions options)
    
    type: stackit:NetworkInterface
    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 NetworkInterfaceArgs
    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 NetworkInterfaceArgs
    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 NetworkInterfaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NetworkInterfaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NetworkInterfaceArgs
    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 networkInterfaceResource = new Stackit.NetworkInterface("networkInterfaceResource", new()
    {
        NetworkId = "string",
        ProjectId = "string",
        AllowedAddresses = new[]
        {
            "string",
        },
        Ipv4 = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Name = "string",
        Region = "string",
        Security = false,
        SecurityGroupIds = new[]
        {
            "string",
        },
    });
    
    example, err := stackit.NewNetworkInterface(ctx, "networkInterfaceResource", &stackit.NetworkInterfaceArgs{
    	NetworkId: pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	AllowedAddresses: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Ipv4: pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name:     pulumi.String("string"),
    	Region:   pulumi.String("string"),
    	Security: pulumi.Bool(false),
    	SecurityGroupIds: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var networkInterfaceResource = new NetworkInterface("networkInterfaceResource", NetworkInterfaceArgs.builder()
        .networkId("string")
        .projectId("string")
        .allowedAddresses("string")
        .ipv4("string")
        .labels(Map.of("string", "string"))
        .name("string")
        .region("string")
        .security(false)
        .securityGroupIds("string")
        .build());
    
    network_interface_resource = stackit.NetworkInterface("networkInterfaceResource",
        network_id="string",
        project_id="string",
        allowed_addresses=["string"],
        ipv4="string",
        labels={
            "string": "string",
        },
        name="string",
        region="string",
        security=False,
        security_group_ids=["string"])
    
    const networkInterfaceResource = new stackit.NetworkInterface("networkInterfaceResource", {
        networkId: "string",
        projectId: "string",
        allowedAddresses: ["string"],
        ipv4: "string",
        labels: {
            string: "string",
        },
        name: "string",
        region: "string",
        security: false,
        securityGroupIds: ["string"],
    });
    
    type: stackit:NetworkInterface
    properties:
        allowedAddresses:
            - string
        ipv4: string
        labels:
            string: string
        name: string
        networkId: string
        projectId: string
        region: string
        security: false
        securityGroupIds:
            - string
    

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

    NetworkId string
    The network ID to which the network interface is associated.
    ProjectId string
    STACKIT project ID to which the network is associated.
    AllowedAddresses List<string>
    The list of CIDR (Classless Inter-Domain Routing) notations.
    Ipv4 string
    The IPv4 address.
    Labels Dictionary<string, string>
    Labels are key-value string pairs which can be attached to a network interface.
    Name string
    The name of the network interface.
    Region string
    The resource region. If not defined, the provider region is used.
    Security bool
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    SecurityGroupIds List<string>
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    NetworkId string
    The network ID to which the network interface is associated.
    ProjectId string
    STACKIT project ID to which the network is associated.
    AllowedAddresses []string
    The list of CIDR (Classless Inter-Domain Routing) notations.
    Ipv4 string
    The IPv4 address.
    Labels map[string]string
    Labels are key-value string pairs which can be attached to a network interface.
    Name string
    The name of the network interface.
    Region string
    The resource region. If not defined, the provider region is used.
    Security bool
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    SecurityGroupIds []string
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    networkId String
    The network ID to which the network interface is associated.
    projectId String
    STACKIT project ID to which the network is associated.
    allowedAddresses List<String>
    The list of CIDR (Classless Inter-Domain Routing) notations.
    ipv4 String
    The IPv4 address.
    labels Map<String,String>
    Labels are key-value string pairs which can be attached to a network interface.
    name String
    The name of the network interface.
    region String
    The resource region. If not defined, the provider region is used.
    security Boolean
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    securityGroupIds List<String>
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    networkId string
    The network ID to which the network interface is associated.
    projectId string
    STACKIT project ID to which the network is associated.
    allowedAddresses string[]
    The list of CIDR (Classless Inter-Domain Routing) notations.
    ipv4 string
    The IPv4 address.
    labels {[key: string]: string}
    Labels are key-value string pairs which can be attached to a network interface.
    name string
    The name of the network interface.
    region string
    The resource region. If not defined, the provider region is used.
    security boolean
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    securityGroupIds string[]
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    network_id str
    The network ID to which the network interface is associated.
    project_id str
    STACKIT project ID to which the network is associated.
    allowed_addresses Sequence[str]
    The list of CIDR (Classless Inter-Domain Routing) notations.
    ipv4 str
    The IPv4 address.
    labels Mapping[str, str]
    Labels are key-value string pairs which can be attached to a network interface.
    name str
    The name of the network interface.
    region str
    The resource region. If not defined, the provider region is used.
    security bool
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    security_group_ids Sequence[str]
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    networkId String
    The network ID to which the network interface is associated.
    projectId String
    STACKIT project ID to which the network is associated.
    allowedAddresses List<String>
    The list of CIDR (Classless Inter-Domain Routing) notations.
    ipv4 String
    The IPv4 address.
    labels Map<String>
    Labels are key-value string pairs which can be attached to a network interface.
    name String
    The name of the network interface.
    region String
    The resource region. If not defined, the provider region is used.
    security Boolean
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    securityGroupIds List<String>
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.

    Outputs

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

    Device string
    The device UUID of the network interface.
    Id string
    The provider-assigned unique ID for this managed resource.
    Mac string
    The MAC address of network interface.
    NetworkInterfaceId string
    The network interface ID.
    Type string
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    Device string
    The device UUID of the network interface.
    Id string
    The provider-assigned unique ID for this managed resource.
    Mac string
    The MAC address of network interface.
    NetworkInterfaceId string
    The network interface ID.
    Type string
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    device String
    The device UUID of the network interface.
    id String
    The provider-assigned unique ID for this managed resource.
    mac String
    The MAC address of network interface.
    networkInterfaceId String
    The network interface ID.
    type String
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    device string
    The device UUID of the network interface.
    id string
    The provider-assigned unique ID for this managed resource.
    mac string
    The MAC address of network interface.
    networkInterfaceId string
    The network interface ID.
    type string
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    device str
    The device UUID of the network interface.
    id str
    The provider-assigned unique ID for this managed resource.
    mac str
    The MAC address of network interface.
    network_interface_id str
    The network interface ID.
    type str
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    device String
    The device UUID of the network interface.
    id String
    The provider-assigned unique ID for this managed resource.
    mac String
    The MAC address of network interface.
    networkInterfaceId String
    The network interface ID.
    type String
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.

    Look up Existing NetworkInterface Resource

    Get an existing NetworkInterface 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?: NetworkInterfaceState, opts?: CustomResourceOptions): NetworkInterface
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            allowed_addresses: Optional[Sequence[str]] = None,
            device: Optional[str] = None,
            ipv4: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            mac: Optional[str] = None,
            name: Optional[str] = None,
            network_id: Optional[str] = None,
            network_interface_id: Optional[str] = None,
            project_id: Optional[str] = None,
            region: Optional[str] = None,
            security: Optional[bool] = None,
            security_group_ids: Optional[Sequence[str]] = None,
            type: Optional[str] = None) -> NetworkInterface
    func GetNetworkInterface(ctx *Context, name string, id IDInput, state *NetworkInterfaceState, opts ...ResourceOption) (*NetworkInterface, error)
    public static NetworkInterface Get(string name, Input<string> id, NetworkInterfaceState? state, CustomResourceOptions? opts = null)
    public static NetworkInterface get(String name, Output<String> id, NetworkInterfaceState state, CustomResourceOptions options)
    resources:  _:    type: stackit:NetworkInterface    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:
    AllowedAddresses List<string>
    The list of CIDR (Classless Inter-Domain Routing) notations.
    Device string
    The device UUID of the network interface.
    Ipv4 string
    The IPv4 address.
    Labels Dictionary<string, string>
    Labels are key-value string pairs which can be attached to a network interface.
    Mac string
    The MAC address of network interface.
    Name string
    The name of the network interface.
    NetworkId string
    The network ID to which the network interface is associated.
    NetworkInterfaceId string
    The network interface ID.
    ProjectId string
    STACKIT project ID to which the network is associated.
    Region string
    The resource region. If not defined, the provider region is used.
    Security bool
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    SecurityGroupIds List<string>
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    Type string
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    AllowedAddresses []string
    The list of CIDR (Classless Inter-Domain Routing) notations.
    Device string
    The device UUID of the network interface.
    Ipv4 string
    The IPv4 address.
    Labels map[string]string
    Labels are key-value string pairs which can be attached to a network interface.
    Mac string
    The MAC address of network interface.
    Name string
    The name of the network interface.
    NetworkId string
    The network ID to which the network interface is associated.
    NetworkInterfaceId string
    The network interface ID.
    ProjectId string
    STACKIT project ID to which the network is associated.
    Region string
    The resource region. If not defined, the provider region is used.
    Security bool
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    SecurityGroupIds []string
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    Type string
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    allowedAddresses List<String>
    The list of CIDR (Classless Inter-Domain Routing) notations.
    device String
    The device UUID of the network interface.
    ipv4 String
    The IPv4 address.
    labels Map<String,String>
    Labels are key-value string pairs which can be attached to a network interface.
    mac String
    The MAC address of network interface.
    name String
    The name of the network interface.
    networkId String
    The network ID to which the network interface is associated.
    networkInterfaceId String
    The network interface ID.
    projectId String
    STACKIT project ID to which the network is associated.
    region String
    The resource region. If not defined, the provider region is used.
    security Boolean
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    securityGroupIds List<String>
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    type String
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    allowedAddresses string[]
    The list of CIDR (Classless Inter-Domain Routing) notations.
    device string
    The device UUID of the network interface.
    ipv4 string
    The IPv4 address.
    labels {[key: string]: string}
    Labels are key-value string pairs which can be attached to a network interface.
    mac string
    The MAC address of network interface.
    name string
    The name of the network interface.
    networkId string
    The network ID to which the network interface is associated.
    networkInterfaceId string
    The network interface ID.
    projectId string
    STACKIT project ID to which the network is associated.
    region string
    The resource region. If not defined, the provider region is used.
    security boolean
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    securityGroupIds string[]
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    type string
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    allowed_addresses Sequence[str]
    The list of CIDR (Classless Inter-Domain Routing) notations.
    device str
    The device UUID of the network interface.
    ipv4 str
    The IPv4 address.
    labels Mapping[str, str]
    Labels are key-value string pairs which can be attached to a network interface.
    mac str
    The MAC address of network interface.
    name str
    The name of the network interface.
    network_id str
    The network ID to which the network interface is associated.
    network_interface_id str
    The network interface ID.
    project_id str
    STACKIT project ID to which the network is associated.
    region str
    The resource region. If not defined, the provider region is used.
    security bool
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    security_group_ids Sequence[str]
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    type str
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.
    allowedAddresses List<String>
    The list of CIDR (Classless Inter-Domain Routing) notations.
    device String
    The device UUID of the network interface.
    ipv4 String
    The IPv4 address.
    labels Map<String>
    Labels are key-value string pairs which can be attached to a network interface.
    mac String
    The MAC address of network interface.
    name String
    The name of the network interface.
    networkId String
    The network ID to which the network interface is associated.
    networkInterfaceId String
    The network interface ID.
    projectId String
    STACKIT project ID to which the network is associated.
    region String
    The resource region. If not defined, the provider region is used.
    security Boolean
    The Network Interface Security. If set to false, then no security groups will apply to this network interface.
    securityGroupIds List<String>
    The list of security group UUIDs. If security is set to false, setting this field will lead to an error.
    type String
    Type of network interface. Some of the possible values are: Possible values are: server, metadata, gateway.

    Package Details

    Repository
    stackit stackitcloud/pulumi-stackit
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the stackit Terraform Provider.
    stackit logo
    Viewing docs for stackit v0.0.4
    published on Friday, Feb 20, 2026 by stackitcloud
      Try Pulumi Cloud free. Your team will thank you.