terraform-provider-stackitp.../docs/resources/network_interface.md
Alexander Dahmen 721e10a02f
chore(examples): Add import examples for all resources (#939)
* chore(examples): Add import examples for all resources

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

* Add guide: How to import resources

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>

---------

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
2025-08-08 14:03:27 +02:00

2.2 KiB

page_title subcategory description
stackit_network_interface Resource - stackit Network interface resource schema. Must have a region specified in the provider configuration.

stackit_network_interface (Resource)

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.network_id},${var.network_interface_id}"
}

Schema

Required

  • network_id (String) The network ID to which the network interface is associated.
  • project_id (String) STACKIT project ID to which the network is associated.

Optional

  • allowed_addresses (List of String) The list of CIDR (Classless Inter-Domain Routing) notations.
  • ipv4 (String) The IPv4 address.
  • labels (Map of String) Labels are key-value string pairs which can be attached to a network interface.
  • name (String) The name of the network interface.
  • security (Boolean) The Network Interface Security. If set to false, then no security groups will apply to this network interface.
  • security_group_ids (List of String) The list of security group UUIDs. If security is set to false, setting this field will lead to an error.

Read-Only

  • device (String) The device UUID of the network interface.
  • id (String) Terraform's internal resource ID. It is structured as "project_id,network_id,network_interface_id".
  • mac (String) The MAC address of network interface.
  • network_interface_id (String) The network interface ID.
  • type (String) Type of network interface. Some of the possible values are: Supported values are: server, metadata, gateway.