feat(iaas): add experimental support for routing tables and routes (#896)

* Merged PR 788126: feat(iaas): Onboard routing tables

feat(iaas): Onboard routing tables

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

* Merged PR 793350: fix(routingtable): region attribute is missing in scheme

fix(routingtable): region attribute is missing in scheme

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

* Merged PR 797968: feat(iaas): onboarding of routing table routes

relates to STACKITTPR-241

* use iaasalpha sdk from github

* resolve todos

* remove routes from routing table model

* restructure packages

* acc tests routing tables

* add acc tests for routes

* chore(iaas): mark routing table resources as experimental

* chore(deps): use iaasalpha sdk v0.1.19-alpha

* Review feedback

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

---------

Signed-off-by: Alexander Dahmen <alexander.dahmen@inovex.de>
Co-authored-by: Alexander Dahmen (EXT) <Alexander.Dahmen_ext@external.mail.schwarz>
Co-authored-by: Alexander Dahmen <alexander.dahmen@inovex.de>
This commit is contained in:
Ruben Hönle 2025-07-02 10:30:50 +02:00 committed by GitHub
parent d2c51afbe5
commit 9ff9b8f610
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
65 changed files with 5160 additions and 53 deletions

View file

@ -4,14 +4,14 @@ page_title: "stackit_cdn_custom_domain Data Source - stackit"
subcategory: ""
description: |-
CDN distribution data source schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_cdn_custom_domain (Data Source)
CDN distribution data source schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage

View file

@ -4,14 +4,14 @@ page_title: "stackit_cdn_distribution Data Source - stackit"
subcategory: ""
description: |-
CDN distribution data source schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_cdn_distribution (Data Source)
CDN distribution data source schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage

View file

@ -4,14 +4,14 @@ page_title: "stackit_git Data Source - stackit"
subcategory: ""
description: |-
Git Instance datasource schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_git (Data Source)
Git Instance datasource schema.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage

View file

@ -0,0 +1,48 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_routing_table Data Source - stackit"
subcategory: ""
description: |-
Routing table datasource schema. Must have a region specified in the provider configuration.
~> This datasource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
---
# stackit_routing_table (Data Source)
Routing table datasource schema. Must have a `region` specified in the provider configuration.
~> This datasource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
## Example Usage
```terraform
data "stackit_routing_table" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
routing_table_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `network_area_id` (String) The network area ID to which the routing table is associated.
- `organization_id` (String) STACKIT organization ID to which the routing table is associated.
- `routing_table_id` (String) The routing tables ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `created_at` (String) Date-time when the routing table was created
- `default` (Boolean) When true this is the default routing table for this network area. It can't be deleted and is used if the user does not specify it otherwise.
- `description` (String) Description of the routing table.
- `id` (String) Terraform's internal datasource ID. It is structured as "`organization_id`,`region`,`network_area_id`,`routing_table_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 routing table.
- `system_routes` (Boolean)
- `updated_at` (String) Date-time when the routing table was updated

View file

@ -0,0 +1,65 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_routing_table_route Data Source - stackit"
subcategory: ""
description: |-
Routing table route datasource schema. Must have a region specified in the provider configuration.
~> This datasource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
---
# stackit_routing_table_route (Data Source)
Routing table route datasource schema. Must have a `region` specified in the provider configuration.
~> This datasource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
## Example Usage
```terraform
data "stackit_routing_table_route" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
routing_table_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
route_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `network_area_id` (String) The network area ID to which the routing table is associated.
- `organization_id` (String) STACKIT organization ID to which the routing table is associated.
- `route_id` (String) Route ID.
- `routing_table_id` (String) The routing tables ID.
### Optional
- `region` (String) The resource region. If not defined, the provider region is used.
### Read-Only
- `created_at` (String) Date-time when the route was created
- `destination` (Attributes) Destination of the route. (see [below for nested schema](#nestedatt--destination))
- `id` (String) Terraform's internal datasource ID. It is structured as "`organization_id`,`region`,`network_area_id`,`routing_table_id`,`route_id`".
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `next_hop` (Attributes) Next hop destination. (see [below for nested schema](#nestedatt--next_hop))
- `updated_at` (String) Date-time when the route was updated
<a id="nestedatt--destination"></a>
### Nested Schema for `destination`
Read-Only:
- `type` (String) CIDRV type. Possible values are: `cidrv4`, `cidrv6`. Only `cidrv4` is supported during experimental stage.
- `value` (String) An CIDR string.
<a id="nestedatt--next_hop"></a>
### Nested Schema for `next_hop`
Read-Only:
- `type` (String) Possible values are: `blackhole`, `internet`, `ipv4`, `ipv6`. Only `cidrv4` is supported during experimental stage..
- `value` (String) Either IPv4 or IPv6 (not set for blackhole and internet). Only IPv4 supported during experimental stage.

View file

@ -0,0 +1,71 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_routing_table_routes Data Source - stackit"
subcategory: ""
description: |-
Routing table routes datasource schema. Must have a region specified in the provider configuration.
~> This datasource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
---
# stackit_routing_table_routes (Data Source)
Routing table routes datasource schema. Must have a `region` specified in the provider configuration.
~> This datasource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
## Example Usage
```terraform
data "stackit_routing_table_routes" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
routing_table_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `network_area_id` (String) The network area ID to which the routing table is associated.
- `organization_id` (String) STACKIT organization ID to which the routing table is associated.
- `routing_table_id` (String) The routing tables ID.
### Optional
- `region` (String) The datasource region. If not defined, the provider region is used.
### Read-Only
- `id` (String) Terraform's internal datasource ID. It is structured as "`organization_id`,`region`,`network_area_id`,`routing_table_id`,`route_id`".
- `routes` (Attributes List) List of routes. (see [below for nested schema](#nestedatt--routes))
<a id="nestedatt--routes"></a>
### Nested Schema for `routes`
Read-Only:
- `created_at` (String) Date-time when the route was created
- `destination` (Attributes) Destination of the route. (see [below for nested schema](#nestedatt--routes--destination))
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `next_hop` (Attributes) Next hop destination. (see [below for nested schema](#nestedatt--routes--next_hop))
- `route_id` (String) Route ID.
- `updated_at` (String) Date-time when the route was updated
<a id="nestedatt--routes--destination"></a>
### Nested Schema for `routes.destination`
Read-Only:
- `type` (String) CIDRV type. Possible values are: `cidrv4`, `cidrv6`. Only `cidrv4` is supported during experimental stage.
- `value` (String) An CIDR string.
<a id="nestedatt--routes--next_hop"></a>
### Nested Schema for `routes.next_hop`
Read-Only:
- `type` (String) Possible values are: `blackhole`, `internet`, `ipv4`, `ipv6`. Only `cidrv4` is supported during experimental stage..
- `value` (String) Either IPv4 or IPv6 (not set for blackhole and internet). Only IPv4 supported during experimental stage.

View file

@ -0,0 +1,54 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_routing_tables Data Source - stackit"
subcategory: ""
description: |-
Routing table datasource schema. Must have a region specified in the provider configuration.
~> This datasource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
---
# stackit_routing_tables (Data Source)
Routing table datasource schema. Must have a `region` specified in the provider configuration.
~> This datasource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
## Example Usage
```terraform
data "stackit_routing_tables" "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 to which the routing table is associated.
- `organization_id` (String) STACKIT organization ID to which the routing table is associated.
### 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 "`organization_id`,`region`,`network_area_id`".
- `items` (Attributes List) List of routing tables. (see [below for nested schema](#nestedatt--items))
<a id="nestedatt--items"></a>
### Nested Schema for `items`
Read-Only:
- `created_at` (String) Date-time when the routing table was created
- `default` (Boolean) When true this is the default routing table for this network area. It can't be deleted and is used if the user does not specify it otherwise.
- `description` (String) Description of the routing table.
- `labels` (Map of String) Labels are key-value string pairs which can be attached to a resource container
- `name` (String) The name of the routing table.
- `routing_table_id` (String) The routing tables ID.
- `system_routes` (Boolean)
- `updated_at` (String) Date-time when the routing table was updated

View file

@ -4,14 +4,14 @@ page_title: "stackit_server_backup_schedule Data Source - stackit"
subcategory: ""
description: |-
Server backup schedule datasource schema. Must have a region specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_server_backup_schedule (Data Source)
Server backup schedule datasource schema. Must have a `region` specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage

View file

@ -4,14 +4,14 @@ page_title: "stackit_server_backup_schedules Data Source - stackit"
subcategory: ""
description: |-
Server backup schedules datasource schema. Must have a region specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_server_backup_schedules (Data Source)
Server backup schedules datasource schema. Must have a `region` specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage

View file

@ -4,14 +4,14 @@ page_title: "stackit_server_update_schedule Data Source - stackit"
subcategory: ""
description: |-
Server update schedule datasource schema. Must have a region specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_server_update_schedule (Data Source)
Server update schedule datasource schema. Must have a `region` specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage

View file

@ -4,14 +4,14 @@ page_title: "stackit_server_update_schedules Data Source - stackit"
subcategory: ""
description: |-
Server update schedules datasource schema. Must have a region specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our guide https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources for how to opt-in to use beta resources.
---
# stackit_server_update_schedules (Data Source)
Server update schedules datasource schema. Must have a `region` specified in the provider configuration.
~> This resource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
~> This datasource is in beta and may be subject to breaking changes in the future. Use with caution. See our [guide](https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/guides/opting_into_beta_resources) for how to opt-in to use beta resources.
## Example Usage

View file

@ -157,7 +157,7 @@ Note: AWS specific checks must be skipped as they do not work on STACKIT. For de
- `default_region` (String) Region will be used as the default location for regional services. Not all services require a region, some are global
- `dns_custom_endpoint` (String) Custom endpoint for the DNS service
- `enable_beta_resources` (Boolean) Enable beta resources. Default is false.
- `experiments` (List of String) Enables experiments. These are unstable features without official support. More information can be found in the README. Available Experiments: [iam]
- `experiments` (List of String) Enables experiments. These are unstable features without official support. More information can be found in the README. Available Experiments: [iam routing-tables]
- `git_custom_endpoint` (String) Custom endpoint for the Git service
- `iaas_custom_endpoint` (String) Custom endpoint for the IaaS service
- `loadbalancer_custom_endpoint` (String) Custom endpoint for the Load Balancer service

View file

@ -0,0 +1,50 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_routing_table Resource - stackit"
subcategory: ""
description: |-
Routing table resource schema. Must have a region specified in the provider configuration.
~> This resource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
---
# stackit_routing_table (Resource)
Routing table resource schema. Must have a `region` specified in the provider configuration.
~> This resource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
## Example Usage
```terraform
resource "stackit_routing_table" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example"
labels = {
"key" = "value"
}
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### Required
- `name` (String) The name of the routing table.
- `network_area_id` (String) The network area ID to which the routing table is associated.
- `organization_id` (String) STACKIT organization ID to which the routing table is associated.
### Optional
- `description` (String) Description of the routing table.
- `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.
- `system_routes` (Boolean)
### Read-Only
- `created_at` (String) Date-time when the routing table was created
- `id` (String) Terraform's internal resource ID. It is structured as "`organization_id`,`region`,`network_area_id`,`routing_table_id`".
- `routing_table_id` (String) The routing tables ID.
- `updated_at` (String) Date-time when the routing table was updated

View file

@ -0,0 +1,78 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackit_routing_table_route Resource - stackit"
subcategory: ""
description: |-
Routing table route resource schema. Must have a region specified in the provider configuration.
~> This resource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
---
# stackit_routing_table_route (Resource)
Routing table route resource schema. Must have a `region` specified in the provider configuration.
~> This resource is part of the routing-tables experiment and is likely going to undergo significant changes or be removed in the future. Use it at your own discretion.
## Example Usage
```terraform
resource "stackit_routing_table_route" "example" {
organization_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
network_area_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
routing_table_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
destination = {
type = "cidrv4"
value = "192.168.178.0/24"
}
next_hop = {
type = "ipv4"
value = "192.168.178.1"
}
labels = {
"key" = "value"
}
}
```
<!-- schema generated by tfplugindocs -->
## Schema
### 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 routing table is associated.
- `next_hop` (Attributes) Next hop destination. (see [below for nested schema](#nestedatt--next_hop))
- `organization_id` (String) STACKIT organization ID to which the routing table is associated.
- `routing_table_id` (String) The routing tables ID.
### 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
- `created_at` (String) Date-time when the route was created.
- `id` (String) Terraform's internal resource ID. It is structured as "`organization_id`,`region`,`network_area_id`,`routing_table_id`,`route_id`".
- `route_id` (String) The ID of the route.
- `updated_at` (String) Date-time when the route was updated.
<a id="nestedatt--destination"></a>
### Nested Schema for `destination`
Required:
- `type` (String) CIDRV type. Possible values are: `cidrv4`, `cidrv6`. Only `cidrv4` is supported during experimental stage.
- `value` (String) An CIDR string.
<a id="nestedatt--next_hop"></a>
### Nested Schema for `next_hop`
Required:
- `type` (String) Possible values are: `blackhole`, `internet`, `ipv4`, `ipv6`. Only `cidrv4` is supported during experimental stage..
Optional:
- `value` (String) Either IPv4 or IPv6 (not set for blackhole and internet). Only IPv4 supported during experimental stage.