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:
parent
800c18fa0b
commit
fcc7a99488
6 changed files with 188 additions and 3 deletions
|
|
@ -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))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue