feat: add cidr_list attribute to stackit_public_ip_ranges datasource (#1001)

* feat: add cidr_list attribute to stackit_public_ip_ranges datasource

Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
This commit is contained in:
Mauritz Uphoff 2025-10-08 09:19:57 +02:00 committed by GitHub
parent 800c18fa0b
commit fcc7a99488
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 188 additions and 3 deletions

View file

@ -14,6 +14,22 @@ A list of all public IP ranges that STACKIT uses.
```terraform
data "stackit_public_ip_ranges" "example" {}
# example usage: allow stackit services and customer vpn cidr to access observability apis
locals {
vpn_cidrs = ["X.X.X.X/32", "X.X.X.X/24"]
}
resource "stackit_observability_instance" "example" {
project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
name = "example-instance"
plan_name = "Observability-Monitoring-Medium-EU01"
# Allow all stackit services and customer vpn cidr to access observability apis
acl = concat(data.stackit_public_ip_ranges.example.cidr_list, local.vpn_cidrs)
metrics_retention_days = 90
metrics_retention_days_5m_downsampling = 90
metrics_retention_days_1h_downsampling = 90
}
```
<!-- schema generated by tfplugindocs -->
@ -21,6 +37,7 @@ data "stackit_public_ip_ranges" "example" {}
### Read-Only
- `cidr_list` (List of String) A list of IP range strings (CIDRs) extracted from the public_ip_ranges for easy consumption.
- `id` (String) Terraform's internal resource ID. It takes the values of "`public_ip_ranges.*.cidr`".
- `public_ip_ranges` (Attributes List) A list of all public IP ranges. (see [below for nested schema](#nestedatt--public_ip_ranges))