feat(iaas): support for v2 API (#1070)

relates to STACKITTPR-313
This commit is contained in:
Ruben Hönle 2025-12-17 15:40:46 +01:00 committed by GitHub
parent 460c18c202
commit 53a3697850
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
124 changed files with 8342 additions and 6042 deletions

View file

@ -27,9 +27,13 @@ data "stackit_affinity_group" "example" {
- `affinity_group_id` (String) The affinity group ID.
- `project_id` (String) STACKIT Project ID to which the affinity group is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`affinity_group_id`".
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`affinity_group_id`".
- `members` (List of String) Affinity Group schema. Must have a `region` specified in the provider configuration.
- `name` (String) The name of the affinity group.
- `policy` (String) The policy of the affinity group.

View file

@ -31,5 +31,6 @@ data "stackit_iaas_project" "example" {
- `created_at` (String) Date-time when the project was created.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`".
- `internet_access` (Boolean) Specifies if the project has internet_access
- `state` (String) Specifies the state of the project.
- `state` (String, Deprecated) Specifies the status of the project.
- `status` (String) Specifies the status of the project.
- `updated_at` (String) Date-time when the project was last updated.

View file

@ -27,12 +27,16 @@ data "stackit_image" "example" {
- `image_id` (String) The image ID.
- `project_id` (String) STACKIT project ID to which the image is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `checksum` (Attributes) Representation of an image checksum. (see [below for nested schema](#nestedatt--checksum))
- `config` (Attributes) Properties to set hardware and scheduling settings for an image. (see [below for nested schema](#nestedatt--config))
- `disk_format` (String) The disk format of the image.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`image_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`image_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `min_disk_size` (Number) The minimum disk size of the image in GB.
- `min_ram` (Number) The minimum RAM of the image in MB.

View file

@ -105,6 +105,7 @@ data "stackit_image_v2" "filter_distro_version" {
- `image_id` (String) Image ID to fetch directly
- `name` (String) Exact image name to match. Optionally applies a `filter` block to further refine results in case multiple images share the same name. The first match is returned, optionally sorted by name in ascending order. Cannot be used together with `name_regex`.
- `name_regex` (String) Regular expression to match against image names. Optionally applies a `filter` block to narrow down results when multiple image names match the regex. The first match is returned, optionally sorted by name in ascending order. Cannot be used together with `name`.
- `region` (String) The resource region. If not defined, the provider region is used.
- `sort_ascending` (Boolean) If set to `true`, images are sorted in ascending lexicographical order by image name (such as `Ubuntu 18.04`, `Ubuntu 20.04`, `Ubuntu 22.04`) before selecting the first match. Defaults to `false` (descending such as `Ubuntu 22.04`, `Ubuntu 20.04`, `Ubuntu 18.04`).
### Read-Only
@ -112,7 +113,7 @@ data "stackit_image_v2" "filter_distro_version" {
- `checksum` (Attributes) Representation of an image checksum. (see [below for nested schema](#nestedatt--checksum))
- `config` (Attributes) Properties to set hardware and scheduling settings for an image. (see [below for nested schema](#nestedatt--config))
- `disk_format` (String) The disk format of the image.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`image_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`image_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `min_disk_size` (Number) The minimum disk size of the image in GB.
- `min_ram` (Number) The minimum RAM of the image in MB.

View file

@ -63,6 +63,7 @@ stackit server machine-type list
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
- `sort_ascending` (Boolean) Sort machine types by name ascending (`true`) or descending (`false`). Defaults to `false`
### Read-Only
@ -70,7 +71,7 @@ stackit server machine-type list
- `description` (String) Machine type description.
- `disk` (Number) Disk size in GB.
- `extra_specs` (Map of String) Extra specs (e.g., CPU type, overcommit ratio).
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`image_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`image_id`".
- `name` (String) Name of the machine type (e.g. 's1.2').
- `ram` (Number) RAM size in MB.
- `vcpus` (Number) Number of vCPUs.

View file

@ -29,16 +29,16 @@ data "stackit_network_area" "example" {
### Read-Only
- `default_nameservers` (List of String) List of DNS Servers/Nameservers.
- `default_prefix_length` (Number) The default prefix length for networks in the network area.
- `default_nameservers` (List of String, Deprecated) List of DNS Servers/Nameservers.
- `default_prefix_length` (Number, Deprecated) The default prefix length for networks in the network area.
- `id` (String) Terraform's internal resource ID. It is structured as "`organization_id`,`network_area_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `max_prefix_length` (Number) The maximal prefix length for networks in the network area.
- `min_prefix_length` (Number) The minimal prefix length for networks in the network area.
- `max_prefix_length` (Number, Deprecated) The maximal prefix length for networks in the network area.
- `min_prefix_length` (Number, Deprecated) The minimal prefix length for networks in the network area.
- `name` (String) The name of the network area.
- `network_ranges` (Attributes List) List of Network ranges. (see [below for nested schema](#nestedatt--network_ranges))
- `network_ranges` (Attributes List, Deprecated) List of Network ranges. (see [below for nested schema](#nestedatt--network_ranges))
- `project_count` (Number) The amount of projects currently referencing this area.
- `transfer_network` (String) Classless Inter-Domain Routing (CIDR).
- `transfer_network` (String, Deprecated) Classless Inter-Domain Routing (CIDR).
<a id="nestedatt--network_ranges"></a>
### Nested Schema for `network_ranges`

View file

@ -0,0 +1,57 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_network_area_region Data Source - stackit"
subcategory: ""
description: |-
Network area region data source schema.
---
# stackit_network_area_region (Data Source)
Network area region data source schema.
## Example Usage
```terraform
data "stackit_network_area_region" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `network_area_id` (String) The network area ID.
- `organization_id` (String) STACKIT organization ID to which the network area is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`organization_id`,`network_area_id`,`region`".
- `ipv4` (Attributes) The regional IPv4 config of a network area. (see [below for nested schema](#nestedatt--ipv4))
<a id="nestedatt--ipv4"></a>
### Nested Schema for `ipv4`
Read-Only:
- `default_nameservers` (List of String) List of DNS Servers/Nameservers.
- `default_prefix_length` (Number) The default prefix length for networks in the network area.
- `max_prefix_length` (Number) The maximal prefix length for networks in the network area.
- `min_prefix_length` (Number) The minimal prefix length for networks in the network area.
- `network_ranges` (Attributes List) List of Network ranges. (see [below for nested schema](#nestedatt--ipv4--network_ranges))
- `transfer_network` (String) IPv4 Classless Inter-Domain Routing (CIDR).
<a id="nestedatt--ipv4--network_ranges"></a>
### Nested Schema for `ipv4.network_ranges`
Read-Only:
- `network_range_id` (String)
- `prefix` (String) Classless Inter-Domain Routing (CIDR).

View file

@ -29,9 +29,30 @@ data "stackit_network_area_route" "example" {
- `network_area_route_id` (String) The network area route ID.
- `organization_id` (String) STACKIT organization ID to which the network area is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal data source ID. It is structured as "`organization_id`,`network_area_id`,`network_area_route_id`".
- `destination` (Attributes) Destination of the route. (see [below for nested schema](#nestedatt--destination))
- `id` (String) Terraform's internal data source ID. It is structured as "`organization_id`,`region`,`network_area_id`,`network_area_route_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `next_hop` (String) The IP address of the routing system, that will route the prefix configured. Should be a valid IPv4 address.
- `prefix` (String) The network, that is reachable though the Next Hop. Should use CIDR notation.
- `next_hop` (Attributes) Next hop destination. (see [below for nested schema](#nestedatt--next_hop))
<a id="nestedatt--destination"></a>
### Nested Schema for `destination`
Read-Only:
- `type` (String) CIDRV type. Possible values are: `cidrv4`, `cidrv6`.
- `value` (String) An CIDR string.
<a id="nestedatt--next_hop"></a>
### Nested Schema for `next_hop`
Read-Only:
- `type` (String) Type of the next hop. Possible values are: `blackhole`, `internet`, `ipv4`, `ipv6`.
- `value` (String) Either IPv4 or IPv6 (not set for blackhole and internet).

View file

@ -29,11 +29,15 @@ data "stackit_network_interface" "example" {
- `network_interface_id` (String) The network interface ID.
- `project_id` (String) STACKIT project ID to which the network interface is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `allowed_addresses` (List of String) The list of CIDR (Classless Inter-Domain Routing) notations.
- `device` (String) The device UUID of the network interface.
- `id` (String) Terraform's internal data source ID. It is structured as "`project_id`,`network_id`,`network_interface_id`".
- `id` (String) Terraform's internal data source ID. It is structured as "`project_id`,`region`,`network_id`,`network_interface_id`".
- `ipv4` (String) The IPv4 address.
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a network interface.
- `mac` (String) The MAC address of network interface.

View file

@ -27,9 +27,13 @@ data "stackit_public_ip" "example" {
- `project_id` (String) STACKIT project ID to which the public IP is associated.
- `public_ip_id` (String) The public IP ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal datasource ID. It is structured as "`project_id`,`public_ip_id`".
- `id` (String) Terraform's internal datasource ID. It is structured as "`project_id`,`region`,`public_ip_id`".
- `ip` (String) The IP address.
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `network_interface_id` (String) Associates the public IP with a network interface or a virtual IP (ID).

View file

@ -27,10 +27,14 @@ data "stackit_security_group" "example" {
- `project_id` (String) STACKIT project ID to which the security group is associated.
- `security_group_id` (String) The security group ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `description` (String) The description of the security group.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`security_group_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`security_group_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `name` (String) The name of the security group.
- `stateful` (Boolean) Configures if a security group is stateful or stateless. There can only be one type of security groups per network interface/server.

View file

@ -29,13 +29,17 @@ data "stackit_security_group_rule" "example" {
- `security_group_id` (String) The security group ID.
- `security_group_rule_id` (String) The security group rule ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `description` (String) The description of the security group rule.
- `direction` (String) The direction of the traffic which the rule should match. Some of the possible values are: Possible values are: `ingress`, `egress`.
- `ether_type` (String) The ethertype which the rule should match.
- `icmp_parameters` (Attributes) ICMP Parameters. (see [below for nested schema](#nestedatt--icmp_parameters))
- `id` (String) Terraform's internal datasource ID. It is structured as "`project_id`,`security_group_id`,`security_group_rule_id`".
- `id` (String) Terraform's internal datasource ID. It is structured as "`project_id`,`region`,`security_group_id`,`security_group_rule_id`".
- `ip_range` (String) The remote IP range which the rule should match.
- `port_range` (Attributes) The range of ports. (see [below for nested schema](#nestedatt--port_range))
- `protocol` (Attributes) The internet protocol which the rule should match. (see [below for nested schema](#nestedatt--protocol))

View file

@ -27,13 +27,17 @@ data "stackit_server" "example" {
- `project_id` (String) STACKIT project ID to which the server is associated.
- `server_id` (String) The server ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `affinity_group` (String) The affinity group the server is assigned to.
- `availability_zone` (String) The availability zone of the server.
- `boot_volume` (Attributes) The boot volume for the server (see [below for nested schema](#nestedatt--boot_volume))
- `created_at` (String) Date-time when the server was created
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`server_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`server_id`".
- `image_id` (String) The image ID to be used for an ephemeral disk on the server.
- `keypair_name` (String) The name of the keypair used during server creation.
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container

View file

@ -27,11 +27,15 @@ data "stackit_volume" "example" {
- `project_id` (String) STACKIT project ID to which the volume is associated.
- `volume_id` (String) The volume ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `availability_zone` (String) The availability zone of the volume.
- `description` (String) The description of the volume.
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`volume_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`volume_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `name` (String) The name of the volume.
- `performance_class` (String) The performance class of the volume. Possible values are documented in [Service plans BlockStorage](https://docs.stackit.cloud/products/storage/block-storage/basics/service-plans/#currently-available-service-plans-performance-classes)

View file

@ -3,7 +3,7 @@
page_title: "stackit_affinity_group Resource - stackit"
subcategory: ""
description: |-
Affinity Group schema. Must have a region specified in the provider configuration.
Affinity Group schema.
Usage with server
resource "stackit_affinity_group" "affinity-group" {
@ -39,7 +39,7 @@ description: |-
# stackit_affinity_group (Resource)
Affinity Group schema. Must have a `region` specified in the provider configuration.
Affinity Group schema.
@ -91,7 +91,7 @@ resource "stackit_affinity_group" "example" {
# Only use the import statement, if you want to import an existing affinity group
import {
to = stackit_affinity_group.import-example
id = "${var.project_id},${var.affinity_group_id}"
id = "${var.project_id},${var.region},${var.affinity_group_id}"
}
```
@ -104,8 +104,12 @@ import {
- `policy` (String) The policy of the affinity group.
- `project_id` (String) STACKIT Project ID to which the affinity group is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `affinity_group_id` (String) The affinity group ID.
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`affinity_group_id`".
- `id` (String) Terraform's internal resource identifier. It is structured as "`project_id`,`region`,`affinity_group_id`".
- `members` (List of String) The servers that are part of the affinity group.

View file

@ -31,7 +31,7 @@ resource "stackit_image" "example_image" {
# }
import {
to = stackit_image.import-example
id = "${var.project_id},${var.image_id}"
id = "${var.project_id},${var.region},${var.image_id}"
}
```
@ -51,11 +51,12 @@ import {
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `min_disk_size` (Number) The minimum disk size of the image in GB.
- `min_ram` (Number) The minimum RAM of the image in MB.
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `checksum` (Attributes) Representation of an image checksum. (see [below for nested schema](#nestedatt--checksum))
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`image_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`image_id`".
- `image_id` (String) The image ID.
- `protected` (Boolean) Whether the image is protected.
- `scope` (String) The scope of the image.

View file

@ -34,12 +34,11 @@ resource "stackit_network" "example_routed_network" {
}
resource "stackit_network" "example_non_routed_network" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-non-routed-network"
ipv4_nameservers = ["1.2.3.4", "5.6.7.8"]
ipv4_prefix_length = 24
ipv4_gateway = "10.1.2.3"
ipv4_prefix = "10.1.2.0/24"
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-non-routed-network"
ipv4_nameservers = ["1.2.3.4", "5.6.7.8"]
ipv4_gateway = "10.1.2.3"
ipv4_prefix = "10.1.2.0/24"
labels = {
"key" = "value"
}
@ -51,7 +50,7 @@ resource "stackit_network" "example_non_routed_network" {
# These attributes cannot be configured together: [ipv4_prefix,ipv4_prefix_length,ipv4_gateway]
import {
to = stackit_network.import-example
id = "${var.project_id},${var.network_id}"
id = "${var.project_id},${var.region},${var.network_id}"
}
```
@ -77,15 +76,13 @@ import {
- `nameservers` (List of String, Deprecated) The nameservers of the network. This field is deprecated and will be removed in January 2026, use `ipv4_nameservers` to configure the nameservers for IPv4.
- `no_ipv4_gateway` (Boolean) If set to `true`, the network doesn't have a gateway.
- `no_ipv6_gateway` (Boolean) If set to `true`, the network doesn't have a gateway.
- `region` (String) Can only be used when experimental "network" is set.
The resource region. If not defined, the provider region is used.
- `region` (String) The resource region. If not defined, the provider region is used.
- `routed` (Boolean) If set to `true`, the network is routed and therefore accessible from other networks.
- `routing_table_id` (String) Can only be used when experimental "network" is set.
The ID of the routing table associated with the network.
- `routing_table_id` (String) The ID of the routing table associated with the network.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`network_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`network_id`".
- `ipv4_prefixes` (List of String) The IPv4 prefixes of the network.
- `ipv6_prefixes` (List of String) The IPv6 prefixes of the network.
- `network_id` (String) The network ID.

View file

@ -3,12 +3,12 @@
page_title: "stackit_network_area Resource - stackit"
subcategory: ""
description: |-
Network area resource schema. Must have a region specified in the provider configuration.
Network area resource schema.
---
# stackit_network_area (Resource)
Network area resource schema. Must have a `region` specified in the provider configuration.
Network area resource schema.
## Example Usage
@ -16,12 +16,6 @@ Network area resource schema. Must have a `region` specified in the provider con
resource "stackit_network_area" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-network-area"
network_ranges = [
{
prefix = "192.168.0.0/24"
}
]
transfer_network = "192.168.1.0/24"
labels = {
"key" = "value"
}
@ -40,17 +34,17 @@ import {
### Required
- `name` (String) The name of the network area.
- `network_ranges` (Attributes List) List of Network ranges. (see [below for nested schema](#nestedatt--network_ranges))
- `organization_id` (String) STACKIT organization ID to which the network area is associated.
- `transfer_network` (String) Classless Inter-Domain Routing (CIDR).
### Optional
- `default_nameservers` (List of String) List of DNS Servers/Nameservers.
- `default_prefix_length` (Number) The default prefix length for networks in the network area.
- `default_nameservers` (List of String, Deprecated) List of DNS Servers/Nameservers for configuration of network area for region `eu01`.
- `default_prefix_length` (Number, Deprecated) The default prefix length for networks in the network area for region `eu01`.
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `max_prefix_length` (Number) The maximal prefix length for networks in the network area.
- `min_prefix_length` (Number) The minimal prefix length for networks in the network area.
- `max_prefix_length` (Number, Deprecated) The maximal prefix length for networks in the network area for region `eu01`.
- `min_prefix_length` (Number, Deprecated) The minimal prefix length for networks in the network area for region `eu01`.
- `network_ranges` (Attributes List, Deprecated) List of Network ranges for configuration of network area for region `eu01`. (see [below for nested schema](#nestedatt--network_ranges))
- `transfer_network` (String, Deprecated) Classless Inter-Domain Routing (CIDR) for configuration of network area for region `eu01`.
### Read-Only
@ -63,8 +57,8 @@ import {
Required:
- `prefix` (String) Classless Inter-Domain Routing (CIDR).
- `prefix` (String, Deprecated) Classless Inter-Domain Routing (CIDR).
Read-Only:
- `network_range_id` (String)
- `network_range_id` (String, Deprecated)

View file

@ -0,0 +1,77 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_network_area_region Resource - stackit"
subcategory: ""
description: |-
Network area region resource schema.
---
# stackit_network_area_region (Resource)
Network area region resource schema.
## Example Usage
```terraform
resource "stackit_network_area_region" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
ipv4 = {
transfer_network = "10.1.2.0/24"
network_ranges = [
{
prefix = "10.0.0.0/16"
}
]
}
}
# Only use the import statement, if you want to import an existing network area region
import {
to = stackit_network_area_region.import-example
id = "${var.organization_id},${var.network_area_id},${var.region}"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `ipv4` (Attributes) The regional IPv4 config of a network area. (see [below for nested schema](#nestedatt--ipv4))
- `network_area_id` (String) The network area ID.
- `organization_id` (String) STACKIT organization ID to which the network area is associated.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`organization_id`,`network_area_id`,`region`".
<a id="nestedatt--ipv4"></a>
### Nested Schema for `ipv4`
Required:
- `network_ranges` (Attributes List) List of Network ranges. (see [below for nested schema](#nestedatt--ipv4--network_ranges))
- `transfer_network` (String) IPv4 Classless Inter-Domain Routing (CIDR).
Optional:
- `default_nameservers` (List of String) List of DNS Servers/Nameservers.
- `default_prefix_length` (Number) The default prefix length for networks in the network area.
- `max_prefix_length` (Number) The maximal prefix length for networks in the network area.
- `min_prefix_length` (Number) The minimal prefix length for networks in the network area.
<a id="nestedatt--ipv4--network_ranges"></a>
### Nested Schema for `ipv4.network_ranges`
Required:
- `prefix` (String) Classless Inter-Domain Routing (CIDR).
Read-Only:
- `network_range_id` (String)

View file

@ -3,7 +3,7 @@
page_title: "stackit_network_area_route Resource - stackit"
subcategory: ""
description: |-
Network area route resource schema. Must have a region specified in the provider configuration.
Network area route resource schema. Must have a `region` specified in the provider configuration.
---
# stackit_network_area_route (Resource)
@ -16,8 +16,14 @@ Network area route resource schema. Must have a `region` specified in the provid
resource "stackit_network_area_route" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
prefix = "192.168.0.0/24"
next_hop = "192.168.0.0"
destination = {
type = "cidrv4"
value = "192.168.0.0/24"
}
next_hop = {
type = "ipv4"
value = "192.168.0.0"
}
labels = {
"key" = "value"
}
@ -26,7 +32,43 @@ resource "stackit_network_area_route" "example" {
# Only use the import statement, if you want to import an existing network area route
import {
to = stackit_network_area_route.import-example
id = "${var.organization_id},${var.network_area_id},${var.network_area_route_id}"
id = "${var.organization_id},${var.network_area_id},${var.region},${var.network_area_route_id}"
}
```
## Migration of IaaS resources from versions <= v0.74.0
The release of the STACKIT IaaS API v2 provides a lot of new features, but also includes some breaking changes
(when coming from v1 of the STACKIT IaaS API) which must be somehow represented on Terraform side. The
`stackit_network_area_route` resource did undergo some changes. See the example below how to migrate your resources.
### Breaking change: Network area route resource (stackit_network_area_route)
**Configuration for <= v0.74.0**
```terraform
resource "stackit_network_area_route" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
prefix = "192.168.0.0/24" # prefix field got removed for provider versions > v0.74.0, use the new destination field instead
next_hop = "192.168.0.0" # schema of the next_hop field changed, see below
}
```
**Configuration for > v0.74.0**
```terraform
resource "stackit_network_area_route" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
destination = { # the new 'destination' field replaces the old 'prefix' field
type = "cidrv4"
value = "192.168.0.0/24" # migration: put the value of the old 'prefix' field here
}
next_hop = {
type = "ipv4"
value = "192.168.0.0" # migration: put the value of the old 'next_hop' field here
}
}
```
@ -35,16 +77,38 @@ import {
### Required
- `destination` (Attributes) Destination of the route. (see [below for nested schema](#nestedatt--destination))
- `network_area_id` (String) The network area ID to which the network area route is associated.
- `next_hop` (String) The IP address of the routing system, that will route the prefix configured. Should be a valid IPv4 address.
- `next_hop` (Attributes) Next hop destination. (see [below for nested schema](#nestedatt--next_hop))
- `organization_id` (String) STACKIT organization ID to which the network area is associated.
- `prefix` (String) The network, that is reachable though the Next Hop. Should use CIDR notation.
### Optional
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`organization_id`,`network_area_id`,`network_area_route_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`organization_id`,`network_area_id`,`region`,`network_area_route_id`".
- `network_area_route_id` (String) The network area route ID.
<a id="nestedatt--destination"></a>
### Nested Schema for `destination`
Required:
- `type` (String) CIDRV type. Possible values are: `cidrv4`, `cidrv6`. Only `cidrv4` is supported currently.
- `value` (String) An CIDR string.
<a id="nestedatt--next_hop"></a>
### Nested Schema for `next_hop`
Required:
- `type` (String) Type of the next hop. Possible values are: `blackhole`, `internet`, `ipv4`, `ipv6`. Only `ipv4` supported currently.
Optional:
- `value` (String) Either IPv4 or IPv6 (not set for blackhole and internet). Only IPv4 supported currently.

View file

@ -23,7 +23,7 @@ resource "stackit_network_interface" "example" {
# 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}"
id = "${var.project_id},${var.region},${var.network_id},${var.network_interface_id}"
}
```
@ -41,13 +41,14 @@ import {
- `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`,`network_id`,`network_interface_id`".
- `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`.

View file

@ -24,7 +24,7 @@ resource "stackit_public_ip" "example" {
# Only use the import statement, if you want to import an existing public ip
import {
to = stackit_public_ip.import-example
id = "${var.project_id},${var.public_ip_id}"
id = "${var.project_id},${var.region},${var.public_ip_id}"
}
```
@ -39,9 +39,10 @@ import {
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `network_interface_id` (String) Associates the public IP with a network interface or a virtual IP (ID). If you are using this resource with a Kubernetes Load Balancer or any other resource which associates a network interface implicitly, use the lifecycle `ignore_changes` property in this field to prevent unintentional removal of the network interface due to drift in the Terraform state
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`public_ip_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`public_ip_id`".
- `ip` (String) The IP address.
- `public_ip_id` (String) The public IP ID.

View file

@ -27,7 +27,7 @@ resource "stackit_public_ip_associate" "example" {
# Only use the import statement, if you want to import an existing public ip associate
import {
to = stackit_public_ip_associate.import-example
id = "${var.project_id},${var.public_ip_id},${var.network_interface_id}"
id = "${var.project_id},${var.region},${var.public_ip_id},${var.network_interface_id}"
}
```
@ -40,7 +40,11 @@ import {
- `project_id` (String) STACKIT project ID to which the public IP is associated.
- `public_ip_id` (String) The public IP ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`public_ip_id`,`network_interface_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`public_ip_id`,`network_interface_id`".
- `ip` (String) The IP address.

View file

@ -40,9 +40,10 @@ import {
- `description` (String) The description of the security group.
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `region` (String) The resource region. If not defined, the provider region is used.
- `stateful` (Boolean) Configures if a security group is stateful or stateless. There can only be one type of security groups per network interface/server.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`security_group_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`security_group_id`".
- `security_group_id` (String) The security group ID.

View file

@ -52,11 +52,12 @@ import {
- `ip_range` (String) The remote IP range which the rule should match.
- `port_range` (Attributes) The range of ports. This should only be provided if the protocol is not ICMP. (see [below for nested schema](#nestedatt--port_range))
- `protocol` (Attributes) The internet protocol which the rule should match. (see [below for nested schema](#nestedatt--protocol))
- `region` (String) The resource region. If not defined, the provider region is used.
- `remote_security_group_id` (String) The remote security group which the rule should match.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`security_group_id`,`security_group_rule_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`security_group_id`,`security_group_rule_id`".
- `security_group_rule_id` (String) The security group rule ID.
<a id="nestedatt--icmp_parameters"></a>

View file

@ -388,7 +388,7 @@ resource "stackit_server" "example" {
# }
import {
to = stackit_server.import-example
id = "${var.project_id},${var.server_id}"
id = "${var.project_id},${var.region},${var.server_id}"
}
```
@ -410,13 +410,14 @@ import {
- `image_id` (String) The image ID to be used for an ephemeral disk on the server.
- `keypair_name` (String) The name of the keypair used during server creation.
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `network_interfaces` (List of String) The IDs of network interfaces which should be attached to the server. Updating it will recreate the server.
- `network_interfaces` (List of String) The IDs of network interfaces which should be attached to the server. Updating it will recreate the server. **Required when (re-)creating servers. Still marked as optional in the schema to not introduce breaking changes. There will be a migration path for this field soon.**
- `region` (String) The resource region. If not defined, the provider region is used.
- `user_data` (String) User data that is passed via cloud-init to the server.
### Read-Only
- `created_at` (String) Date-time when the server was created
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`server_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`server_id`".
- `launched_at` (String) Date-time when the server was launched
- `server_id` (String) The server ID.
- `updated_at` (String) Date-time when the server was updated

View file

@ -3,12 +3,12 @@
page_title: "stackit_server_network_interface_attach Resource - stackit"
subcategory: ""
description: |-
Network interface attachment resource schema. Attaches a network interface to a server. Must have a region specified in the provider configuration. The attachment only takes full effect after server reboot.
Network interface attachment resource schema. Attaches a network interface to a server. The attachment only takes full effect after server reboot.
---
# stackit_server_network_interface_attach (Resource)
Network interface attachment resource schema. Attaches a network interface to a server. Must have a `region` specified in the provider configuration. The attachment only takes full effect after server reboot.
Network interface attachment resource schema. Attaches a network interface to a server. The attachment only takes full effect after server reboot.
## Example Usage
@ -22,7 +22,7 @@ resource "stackit_server_network_interface_attach" "attached_network_interface"
# Only use the import statement, if you want to import an existing server network interface attachment
import {
to = stackit_server_network_interface_attach.import-example
id = "${var.project_id},${var.server_id},${var.network_interface_id}"
id = "${var.project_id},${var.region},${var.server_id},${var.network_interface_id}"
}
```
@ -35,6 +35,10 @@ import {
- `project_id` (String) STACKIT project ID to which the network interface attachment is associated.
- `server_id` (String) The server ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`server_id`,`network_interface_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`server_id`,`network_interface_id`".

View file

@ -22,7 +22,7 @@ resource "stackit_server_service_account_attach" "attached_service_account" {
# Only use the import statement, if you want to import an existing server service account attachment
import {
to = stackit_server_service_account_attach.import-example
id = "${var.project_id},${var.server_id},${var.service_account_email}"
id = "${var.project_id},${var.region},${var.server_id},${var.service_account_email}"
}
```
@ -35,6 +35,10 @@ import {
- `server_id` (String) The server ID.
- `service_account_email` (String) The service account email.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`server_id`,`service_account_email`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`server_id`,`service_account_email`".

View file

@ -22,7 +22,7 @@ resource "stackit_server_volume_attach" "attached_volume" {
# Only use the import statement, if you want to import an existing server volume attachment
import {
to = stackit_server_volume_attach.import-example
id = "${var.project_id},${var.server_id},${var.volume_id}"
id = "${var.project_id},${var.region},${var.server_id},${var.volume_id}"
}
```
@ -35,6 +35,10 @@ import {
- `server_id` (String) The server ID.
- `volume_id` (String) The volume ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`server_id`,`volume_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`server_id`,`volume_id`".

View file

@ -26,7 +26,7 @@ resource "stackit_volume" "example" {
# Only use the import statement, if you want to import an existing volume
import {
to = stackit_volume.import-example
id = "${var.project_id},${var.volume_id}"
id = "${var.project_id},${var.region},${var.volume_id}"
}
```
@ -44,12 +44,13 @@ import {
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `name` (String) The name of the volume.
- `performance_class` (String) The performance class of the volume. Possible values are documented in [Service plans BlockStorage](https://docs.stackit.cloud/products/storage/block-storage/basics/service-plans/#currently-available-service-plans-performance-classes)
- `region` (String) The resource region. If not defined, the provider region is used.
- `size` (Number) The size of the volume in GB. It can only be updated to a larger value than the current size. Either `size` or `source` must be provided
- `source` (Attributes) The source of the volume. It can be either a volume, an image, a snapshot or a backup. Either `size` or `source` must be provided (see [below for nested schema](#nestedatt--source))
### Read-Only
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`volume_id`".
- `id` (String) Terraform's internal resource ID. It is structured as "`project_id`,`region`,`volume_id`".
- `server_id` (String) The server ID of the server to which the volume is attached to.
- `volume_id` (String) The volume ID.