Skip to content

Commit dbcbcda

Browse files
authored
Merge branch 'master' into dependabot/go_modules/github.com/hashicorp/terraform-plugin-framework-1.15.0
2 parents 32a00bf + 095fdc0 commit dbcbcda

28 files changed

Lines changed: 1926 additions & 83 deletions

docs/data-sources/ipam_next_available_ips.md

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,19 +51,41 @@ data "bloxone_ipam_next_available_ips" "example_next_ip_range" {
5151
id = data.bloxone_ipam_ranges.example_by_attribute.results.0.id
5252
ip_count = 5
5353
}
54+
55+
// next_available_ips by tag
56+
data "bloxone_ipam_next_available_ips" "example_next_ip_ab_by_tag" {
57+
tags = {
58+
name = "example_address_block"
59+
}
60+
ip_count = 5
61+
resource_type = "address_block"
62+
}
63+
data "bloxone_ipam_next_available_ips" "example_next_ip_sub_by_tag" {
64+
tags = {
65+
name = "example_subnet"
66+
}
67+
ip_count = 5
68+
resource_type = "subnet"
69+
}
70+
data "bloxone_ipam_next_available_ips" "example_next_ip_range_by_tag" {
71+
tags = {
72+
name = "example_range"
73+
}
74+
ip_count = 5
75+
resource_type = "range"
76+
}
5477
```
5578

5679
<!-- schema generated by tfplugindocs -->
5780
## Schema
5881

59-
### Required
60-
61-
- `id` (String) An application specific resource identity of a resource
62-
6382
### Optional
6483

6584
- `contiguous` (Boolean) Indicates whether the IP addresses should belong to a contiguous block. Defaults to false.
85+
- `id` (String) An application specific resource identity of a resource
6686
- `ip_count` (Number) The number of IP addresses requested. Defaults to 1.
87+
- `resource_type` (String) Resource type to search when using tag filters (address_block, subnet, or range)
88+
- `tag_filters` (Map of String) Map of tag key/value pairs to filter resources
6789

6890
### Read-Only
6991

docs/data-sources/ipam_next_available_subnets.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,14 @@ data "bloxone_ipam_next_available_subnets" "example_tf_subs" {
2727
cidr = 29
2828
subnet_count = 5
2929
}
30+
31+
data "bloxone_ipam_next_available_subnets" "example_next_available_subnet_by_tag" {
32+
cidr = 30
33+
subnet_count = 15
34+
tag_filters = {
35+
environment = "prd"
36+
}
37+
}
3038
```
3139

3240
<!-- schema generated by tfplugindocs -->
@@ -35,12 +43,13 @@ data "bloxone_ipam_next_available_subnets" "example_tf_subs" {
3543
### Required
3644

3745
- `cidr` (Number) The cidr value of subnets to be created.
38-
- `id` (String) An application specific resource identity of a resource.
3946

4047
### Optional
4148

49+
- `id` (String) An application specific resource identity of a resource.
4250
- `subnet_count` (Number) Number of subnets to generate. Default 1 if not set.
51+
- `tag_filters` (Map of String) Key-value pairs to filter subnets by tags.
4352

4453
### Read-Only
4554

46-
- `results` (List of String) List of Next available Subnet address in the specified resource
55+
- `results` (List of String) List of next available subnet addresses in the specified resource.

examples/data-sources/bloxone_ipam_next_available_ips/data-source.tf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,27 @@ data "bloxone_ipam_next_available_ips" "example_next_ip_range" {
3636
id = data.bloxone_ipam_ranges.example_by_attribute.results.0.id
3737
ip_count = 5
3838
}
39+
40+
// next_available_ips by tag
41+
data "bloxone_ipam_next_available_ips" "example_next_ip_ab_by_tag" {
42+
tags = {
43+
name = "example_address_block"
44+
}
45+
ip_count = 5
46+
resource_type = "address_block"
47+
}
48+
data "bloxone_ipam_next_available_ips" "example_next_ip_sub_by_tag" {
49+
tags = {
50+
name = "example_subnet"
51+
}
52+
ip_count = 5
53+
resource_type = "subnet"
54+
}
55+
data "bloxone_ipam_next_available_ips" "example_next_ip_range_by_tag" {
56+
tags = {
57+
name = "example_range"
58+
}
59+
ip_count = 5
60+
resource_type = "range"
61+
}
62+

examples/data-sources/bloxone_ipam_next_available_subnets/data-source.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,11 @@ data "bloxone_ipam_next_available_subnets" "example_tf_subs" {
1212
cidr = 29
1313
subnet_count = 5
1414
}
15+
16+
data "bloxone_ipam_next_available_subnets" "example_next_available_subnet_by_tag" {
17+
cidr = 30
18+
subnet_count = 15
19+
tag_filters = {
20+
environment = "prd"
21+
}
22+
}

0 commit comments

Comments
 (0)