Skip to content

Commit

Permalink
make docs
Browse files Browse the repository at this point in the history
  • Loading branch information
chrismarget-j committed Jul 18, 2024
1 parent ebad8fa commit 9abc9a8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 140 deletions.
35 changes: 8 additions & 27 deletions docs/data-sources/freeform_link.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,15 @@ At least one optional attribute is required.
## Example Usage

```terraform
# here we build a link block
resource "apstra_freeform_link" "test" {
blueprint_id = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
name = "link_a_b"
speed = "1g"
tags = ["a", "b"]
endpoints = [
{
system_id = "-CEYpa9xZ5chndvu0OY"
interface_name = "ge-0/0/3"
transformation_id = 1
},
{
system_id = "ySBRdHvl2KZmWKLhkIk"
interface_name = "ge-0/0/3"
transformation_id = 1
}
]
}
# This example pulls details from a link in a Freeform blueprint
data "apstra_freeform_link" "test" {
blueprint_id = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
id = apstra_freeform_link.test.id
id = "SkY0hved7LajZY7WNzU"
}
output "test_Link_out" { value = data.apstra_freeform_link.test }
//output
#test_Link_out = {
# "aggregate_link_id" = tostring(null)
Expand Down Expand Up @@ -102,8 +82,9 @@ Link Type. An 'ethernet' link is a normal front-panel interface. An 'aggregate_l

Read-Only:

- `interface_id` (String) Graph node ID of the attached interface for this side of the link endpoint
- `interface_name` (String) the interface name
- `ipv4_address` (String) Ipv4 address of the interface
- `ipv6_address` (String) Ipv6 address of the interface
- `transformation_id` (Number) ID of the transformation in the device profile
- `interface_id` (String) Graph node ID of the associated interface
- `interface_name` (String) The interface name, as found in the associated Device Profile, e.g. `xe-0/0/0`
- `ipv4_address` (String) Ipv4 address of the interface in CIDR notation
- `ipv6_address` (String) Ipv6 address of the interface in CIDR notation
- `tags` (Set of String) Set of Tags applied to the interface
- `transformation_id` (Number) ID # of the transformation in the Device Profile
63 changes: 15 additions & 48 deletions docs/resources/freeform_link.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,62 +13,28 @@ This resource creates a Link in a Freeform Blueprint.
## Example Usage

```terraform
# This example creates a link between systems "-CEYpa9xZ5chndvu0OY" and
# "ySBRdHvl2KZmWKLhkIk" in a Freeform Blueprint
resource "apstra_freeform_link" "test" {
blueprint_id = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
name = "link_a_b"
speed = "1g"
tags = ["a", "b"]
endpoints = [
{
system_id = "-CEYpa9xZ5chndvu0OY"
interface_name = "ge-0/0/3"
system_id = "-CEYpa9xZ5chndvu0OY"
interface_name = "ge-0/0/3"
transformation_id = 1
tags = ["prod", "native_1000BASE-T"]
},
{
system_id = "ySBRdHvl2KZmWKLhkIk"
interface_name = "ge-0/0/3"
system_id = "ySBRdHvl2KZmWKLhkIk"
interface_name = "ge-0/0/3"
transformation_id = 1
tags = ["prod", "requires_transceiver"]
}
]
}
data "apstra_freeform_link" "test" {
blueprint_id = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
id = apstra_freeform_link.test.id
}
output "test_Link_out" { value = data.apstra_freeform_link.test }
//output
#test_Link_out = {
# "aggregate_link_id" = tostring(null)
# "blueprint_id" = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
# "endpoints" = tomap({
# "-CEYpa9xZ5chndvu0OY" = {
# "interface_id" = "c459DMed3P42wapAtUY"
# "interface_name" = "ge-0/0/3"
# "ipv4_address" = tostring(null)
# "ipv6_address" = tostring(null)
# "transformation_id" = 1
# }
# "ySBRdHvl2KZmWKLhkIk" = {
# "interface_id" = "1wWgi25jmyZ5NBy45dA"
# "interface_name" = "ge-0/0/3"
# "ipv4_address" = tostring(null)
# "ipv6_address" = tostring(null)
# "transformation_id" = 1
# }
# })
# "id" = "SkY0hved7LajZY7WNzU"
# "name" = "link_a_b"
# "speed" = "10G"
# "tags" = toset([
# "a",
# "b",
# ])
# "type" = "ethernet"
#}
```

<!-- schema generated by tfplugindocs -->
Expand Down Expand Up @@ -96,17 +62,18 @@ output "test_Link_out" { value = data.apstra_freeform_link.test }

Required:

- `interface_name` (String) the interface name
- `transformation_id` (Number) ID of the transformation in the device profile
- `interface_name` (String) The interface name, as found in the associated Device Profile, e.g. `xe-0/0/0`
- `transformation_id` (Number) ID # of the transformation in the Device Profile

Optional:

- `ipv4_address` (String) Ipv4 address of the interface
- `ipv6_address` (String) Ipv6 address of the interface
- `ipv4_address` (String) Ipv4 address of the interface in CIDR notation
- `ipv6_address` (String) Ipv6 address of the interface in CIDR notation
- `tags` (Set of String) Set of Tags applied to the interface

Read-Only:

- `interface_id` (String) Graph node ID of the attached interface for this side of the link endpoint.
- `interface_id` (String) Graph node ID of the associated interface



24 changes: 2 additions & 22 deletions examples/data-sources/apstra_freeform_link/example.tf
Original file line number Diff line number Diff line change
@@ -1,32 +1,12 @@
# here we build a link block

resource "apstra_freeform_link" "test" {
blueprint_id = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
name = "link_a_b"
speed = "1g"
tags = ["a", "b"]
endpoints = [
{
system_id = "-CEYpa9xZ5chndvu0OY"
interface_name = "ge-0/0/3"
transformation_id = 1
},
{
system_id = "ySBRdHvl2KZmWKLhkIk"
interface_name = "ge-0/0/3"
transformation_id = 1
}
]
}
# This example pulls details from a link in a Freeform blueprint

data "apstra_freeform_link" "test" {
blueprint_id = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
id = apstra_freeform_link.test.id
id = "SkY0hved7LajZY7WNzU"
}

output "test_Link_out" { value = data.apstra_freeform_link.test }


//output
#test_Link_out = {
# "aggregate_link_id" = tostring(null)
Expand Down
52 changes: 9 additions & 43 deletions examples/resources/apstra_freeform_link/example.tf
Original file line number Diff line number Diff line change
@@ -1,56 +1,22 @@
# This example creates a link between systems "-CEYpa9xZ5chndvu0OY" and
# "ySBRdHvl2KZmWKLhkIk" in a Freeform Blueprint

resource "apstra_freeform_link" "test" {
blueprint_id = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
name = "link_a_b"
speed = "1g"
tags = ["a", "b"]
endpoints = [
{
system_id = "-CEYpa9xZ5chndvu0OY"
interface_name = "ge-0/0/3"
system_id = "-CEYpa9xZ5chndvu0OY"
interface_name = "ge-0/0/3"
transformation_id = 1
tags = ["prod", "native_1000BASE-T"]
},
{
system_id = "ySBRdHvl2KZmWKLhkIk"
interface_name = "ge-0/0/3"
system_id = "ySBRdHvl2KZmWKLhkIk"
interface_name = "ge-0/0/3"
transformation_id = 1
tags = ["prod", "requires_transceiver"]
}
]
}

data "apstra_freeform_link" "test" {
blueprint_id = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
id = apstra_freeform_link.test.id
}

output "test_Link_out" { value = data.apstra_freeform_link.test }


//output
#test_Link_out = {
# "aggregate_link_id" = tostring(null)
# "blueprint_id" = "043c5787-66e8-41c7-8925-c7e52fbe6e32"
# "endpoints" = tomap({
# "-CEYpa9xZ5chndvu0OY" = {
# "interface_id" = "c459DMed3P42wapAtUY"
# "interface_name" = "ge-0/0/3"
# "ipv4_address" = tostring(null)
# "ipv6_address" = tostring(null)
# "transformation_id" = 1
# }
# "ySBRdHvl2KZmWKLhkIk" = {
# "interface_id" = "1wWgi25jmyZ5NBy45dA"
# "interface_name" = "ge-0/0/3"
# "ipv4_address" = tostring(null)
# "ipv6_address" = tostring(null)
# "transformation_id" = 1
# }
# })
# "id" = "SkY0hved7LajZY7WNzU"
# "name" = "link_a_b"
# "speed" = "10G"
# "tags" = toset([
# "a",
# "b",
# ])
# "type" = "ethernet"
#}

0 comments on commit 9abc9a8

Please sign in to comment.