terraform-provider-stackitp.../docs/resources/network_interface.md
Ruben Hönle 53a3697850
feat(iaas): support for v2 API (#1070)
relates to STACKITTPR-313
2025-12-17 15:40:46 +01:00

54 lines
2.3 KiB
Markdown

---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_network_interface Resource - stackit"
subcategory: ""
description: |-
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
```terraform
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}"
}
```
<!-- schema generated by tfplugindocs -->
## 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.
- `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.
- `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`,`region`,`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: Possible values are: `server`, `metadata`, `gateway`.