-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update attribute descriptions and make docs
- Loading branch information
Showing
3 changed files
with
197 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
page_title: "apstra_freeform_resource_generator Data Source - terraform-provider-apstra" | ||
subcategory: "Reference Design: Freeform" | ||
description: |- | ||
This data source provides details of a specific Freeform Resource. | ||
At least one optional attribute is required. | ||
--- | ||
|
||
# apstra_freeform_resource_generator (Data Source) | ||
|
||
This data source provides details of a specific Freeform Resource. | ||
|
||
At least one optional attribute is required. | ||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
# This example creates an ASN resource Generator within a | ||
# preexisting resource group in a Freeform Blueprint. | ||
# | ||
# After creating the Resource Generator, the data source is invoked to look up | ||
# the details. | ||
resource "apstra_freeform_resource_group" "fizz_grp" { | ||
blueprint_id = "631f8832-ae59-40ca-b4f6-9c19b411aeaf" | ||
name = "fizz_grp" | ||
} | ||
resource "apstra_asn_pool" "rfc5398" { | ||
name = "RFC5398 ASN" | ||
ranges = [ | ||
{ | ||
first = 64496 | ||
last = 64511 | ||
}, | ||
{ | ||
first = 65536 | ||
last = 65551 | ||
}, | ||
] | ||
} | ||
resource "apstra_freeform_alloc_group" "test" { | ||
blueprint_id = "631f8832-ae59-40ca-b4f6-9c19b411aeaf" | ||
name = "test_alloc_group2" | ||
type = "asn" | ||
pool_ids = [apstra_asn_pool.rfc5398.id] | ||
} | ||
resource "apstra_freeform_resource_generator" "test_res_gen" { | ||
blueprint_id = "631f8832-ae59-40ca-b4f6-9c19b411aeaf" | ||
name = "test_res_gen" | ||
type = "asn" | ||
scope = "node('system', name='target')" | ||
allocated_from = apstra_freeform_alloc_group.test.id | ||
container_id = apstra_freeform_resource_group.fizz_grp.id | ||
} | ||
# The output looks like: | ||
#test_resource_generator_out = { | ||
# "allocated_from" = "rag_asn_test_alloc_group2" | ||
# "blueprint_id" = "631f8832-ae59-40ca-b4f6-9c19b411aeaf" | ||
# "container_id" = "gPJtXP7_SM31CYWDJ0g" | ||
# "id" = "EkrP9avh6pgqRqRCm44" | ||
# "name" = "test_res_gen" | ||
# "scope" = "node('system', name='target')" | ||
# "subnet_prefix_len" = tonumber(null) | ||
# "type" = "asn" | ||
#} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `blueprint_id` (String) Apstra Blueprint ID. Used to identify the Blueprint where the Resource lives. | ||
|
||
### Optional | ||
|
||
- `id` (String) Populate this field to look up the Freeform Resource Generator by ID. Required when `name` is omitted. | ||
- `name` (String) Populate this field to look up Resource Generator by Name. Required when `id` is omitted. | ||
|
||
### Read-Only | ||
|
||
- `allocated_from` (String) ID of the node from which this resource generator has been sourced. This could be an ID of resource generator or another resource (in case of IP or Host IP allocations). This also can be empty. In that case it is required that value for this resource is provided by the user. | ||
- `container_id` (String) ID of the group used to organize the generated resources | ||
- `scope` (String) Scope the Resource Generator uses for resource generation | ||
- `subnet_prefix_len` (Number) Length of the subnet for the generated resources, if any. | ||
- `type` (String) Type of the Resource Generator |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
--- | ||
page_title: "apstra_freeform_resource_generator Resource - terraform-provider-apstra" | ||
subcategory: "Reference Design: Freeform" | ||
description: |- | ||
This resource creates a Resource in a Freeform Blueprint. | ||
--- | ||
|
||
# apstra_freeform_resource_generator (Resource) | ||
|
||
This resource creates a Resource in a Freeform Blueprint. | ||
|
||
|
||
## Example Usage | ||
|
||
```terraform | ||
# This example creates an ASN resource Generator within a | ||
# preexisting resource group in a Freeform Blueprint. | ||
# | ||
# After creating the Resource Generator, the data source is invoked to look up | ||
# the details. | ||
resource "apstra_freeform_resource_group" "fizz_grp" { | ||
blueprint_id = "631f8832-ae59-40ca-b4f6-9c19b411aeaf" | ||
name = "fizz_grp" | ||
} | ||
resource "apstra_asn_pool" "rfc5398" { | ||
name = "RFC5398 ASN" | ||
ranges = [ | ||
{ | ||
first = 64496 | ||
last = 64511 | ||
}, | ||
{ | ||
first = 65536 | ||
last = 65551 | ||
}, | ||
] | ||
} | ||
resource "apstra_freeform_alloc_group" "test" { | ||
blueprint_id = "631f8832-ae59-40ca-b4f6-9c19b411aeaf" | ||
name = "test_alloc_group2" | ||
type = "asn" | ||
pool_ids = [apstra_asn_pool.rfc5398.id] | ||
} | ||
resource "apstra_freeform_resource_generator" "test_res_gen" { | ||
blueprint_id = "631f8832-ae59-40ca-b4f6-9c19b411aeaf" | ||
name = "test_res_gen" | ||
type = "asn" | ||
scope = "node('system', name='target')" | ||
allocated_from = apstra_freeform_alloc_group.test.id | ||
container_id = apstra_freeform_resource_group.fizz_grp.id | ||
} | ||
# The output looks like: | ||
#test_resource_generator_out = { | ||
# "allocated_from" = "rag_asn_test_alloc_group2" | ||
# "blueprint_id" = "631f8832-ae59-40ca-b4f6-9c19b411aeaf" | ||
# "container_id" = "gPJtXP7_SM31CYWDJ0g" | ||
# "id" = "EkrP9avh6pgqRqRCm44" | ||
# "name" = "test_res_gen" | ||
# "scope" = "node('system', name='target')" | ||
# "subnet_prefix_len" = tonumber(null) | ||
# "type" = "asn" | ||
#} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `allocated_from` (String) ID of the node to be used as a source for this resource. This could be an ID of resource group or another resource (in case of IP or Host IP allocations). This also can be empty. In that case it is required that value for this resource is provided by the user. | ||
- `blueprint_id` (String) Apstra Blueprint ID. | ||
- `container_id` (String) ID of the group where resources are generated. | ||
- `name` (String) Freeform Resource Generator name as shown in the Web UI. | ||
- `scope` (String) Scope the Resource Generator uses for resource generation. | ||
- `type` (String) type of the Resource Generator, must be one of : | ||
- `asn` | ||
- `host_ipv4` | ||
- `host_ipv6` | ||
- `integer` | ||
- `ipv4` | ||
- `ipv6` | ||
- `vlan` | ||
- `vni` | ||
|
||
### Optional | ||
|
||
- `subnet_prefix_len` (Number) Length of the subnet for the generated resources, if any. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) ID of the Resource Generator within the Freeform Blueprint. | ||
|
||
|
||
|