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 26, 2023
1 parent 2717fc9 commit 694d564
Show file tree
Hide file tree
Showing 10 changed files with 845 additions and 0 deletions.
124 changes: 124 additions & 0 deletions docs/data-sources/datacenter_ct_bgp_peering_generic_system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
---
page_title: "apstra_datacenter_ct_bgp_peering_generic_system Data Source - terraform-provider-apstra"
subcategory: ""
description: |-
This data source composes a Connectivity Template Primitive as a JSON string, suitable for use in the primitives attribute of either an apstra_datacenter_connectivity_template resource or the children attribute of a Different Connectivity Template JsonPrimitive.
---

# apstra_datacenter_ct_bgp_peering_generic_system (Data Source)

This data source composes a Connectivity Template Primitive as a JSON string, suitable for use in the `primitives` attribute of either an `apstra_datacenter_connectivity_template` resource or the `children` attribute of a Different Connectivity Template JsonPrimitive.

## Example Usage

```terraform
# Each apstra_datacenter_ct_* data source represents a Connectivity Template
# Primitive. They're stand-ins for the Primitives found in the Web UI's CT
# builder interface.
#
# These data sources do not interact with the Apstra API. Instead, they assemble
# their input fields into a JSON string presented at the `primitive` attribute
# key.
#
# Use the `primitive` output anywhere you need a primitive represented as JSON:
# - at the root of a Connectivity Template
# - as a child of another Primitive (as constrained by the accepts/produces
# relationship between Primitives)
# Declare a "BGP Peering (Generic System)" Connectivity Template Primitives:
data "apstra_datacenter_ct_bgp_peering_generic_system" "bgp_server" {
ipv4_afi_enabled = true
ipv6_afi_enabled = true
ipv4_addressing_type = "addressed"
ipv6_addressing_type = "link_local"
bfd_enabled = true
ttl = 1
password = "big secret"
}
# This data source's `primitive` attribute produces JSON like this:
# {
# "type": "AttachLogicalLink",
# "data": {
# "ipv4_afi_enabled": true,
# "ipv6_afi_enabled": true,
# "ttl": 1,
# "bfd_enabled": true,
# "password": "big secret",
# "keepalive_time": null,
# "hold_time": null,
# "ipv4_addressing_type": "addressed",
# "ipv6_addressing_type": "link_local",
# "local_asn": null,
# "neighbor_asn_dynamic": false,
# "peer_from_loopback": false,
# "peer_to": "interface_or_ip_endpoint",
# "children": null
# }
# }
# Use the `primitive` element (JSON string) when declaring a parent primitive:
data "apstra_datacenter_ct_ip_link" "ip_link_with_bgp" {
routing_zone_id = "Zplm0niOFCCCfjaXkXo"
vlan_id = 3
ipv4_addressing_type = "numbered"
ipv6_addressing_type = "link_local"
children = [
data.apstra_datacenter_ct_bgp_peering_generic_system.bgp_server.primitive,
]
}
# The IP Link data source's `primitive` field has the primitive the BGP data
# source (child primitive) as an embedded string:
# {
# "type": "AttachLogicalLink",
# "data": {
# "routing_zone_id": "Zplm0niOFCCCfjaXkXo",
# "tagged": true,
# "vlan_id": 3,
# "ipv4_addressing_type": "numbered",
# "ipv6_addressing_type": "link_local",
# "children": [
# "{\"type\":\"AttachLogicalLink\",\"data\":{\"ipv4_afi_enabled\":true,\"ipv6_afi_enabled\":true,\"ttl\":1,\"bfd_enabled\":true,\"password\":\"big secret\",\"keepalive_time\":null,\"hold_time\":null,\"ipv4_addressing_type\":\"addressed\",\"ipv6_addressing_type\":\"link_local\",\"local_asn\":null,\"neighbor_asn_dynamic\":false,\"peer_from_loopback\":false,\"peer_to\":\"interface_or_ip_endpoint\",\"children\":null}}"
# ]
# }
# }
# Finally, use the IP Link's `primitive` element in a Connectivity Template:
resource "apstra_datacenter_connectivity_template" "t" {
blueprint_id = "b726704d-f80e-4733-9103-abd6ccd8752c"
name = "test-net-handoff"
description = "ip handoff with static routes to test nets"
tags = [
"test",
"terraform",
]
primitives = [
data.apstra_datacenter_ct_ip_link.ip_link_with_static_routes.primitive
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Optional

- `bfd_enabled` (Boolean) Enable BFD.
- `children` (Set of String) Set of JSON strings describing Connectivity Template Primitives which are children of this Connectivity Template JsonPrimitive. Use the `primitive` attribute of other Connectivity Template Primitives data sources here.
- `hold_time` (Number) BGP hold time (seconds).
- `ipv4_addressing_type` (String) One of `none`, `addressed` (or omit)
- `ipv4_afi_enabled` (Boolean) IPv4 Address Family Identifier
- `ipv6_addressing_type` (String) One of `none`, `addressed`, `link_local` (or omit)
- `ipv6_afi_enabled` (Boolean) IPv6 Address Family Identifier
- `keepalive_time` (Number) BGP keepalive time (seconds).
- `local_asn` (Number) This feature is configured on a per-peer basis. It allows a router to appear to be a member of a second autonomous system (AS) by prepending a local-as AS number, in addition to its real AS number, announced to its eBGP peer, resulting in an AS path length of two.
- `neighbor_asn_dynamic` (Boolean) Default behavior is `static`
- `password` (String)
- `peer_from_loopback` (Boolean) Enable to peer from loopback interface. Default behavior peers from physical interface.
- `peer_to` (String) One of `loopback`, `interface_or_ip_endpoint`, `interface_or_shared_ip_endpoint` (or omit)
- `ttl` (Number) BGP Time To Live. Omit to use device defaults.

### Read-Only

- `primitive` (String) JSON output for use in the `primitives` field of an `apstra_datacenter_connectivity_template` resource or a different Connectivity Template JsonPrimitive data source
106 changes: 106 additions & 0 deletions docs/data-sources/datacenter_ct_ip_link.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
---
page_title: "apstra_datacenter_ct_ip_link Data Source - terraform-provider-apstra"
subcategory: ""
description: |-
This data source composes a Connectivity Template Primitive as a JSON string, suitable for use in the primitives attribute of either an apstra_datacenter_connectivity_template resource or the children attribute of a Different Connectivity Template JsonPrimitive.
---

# apstra_datacenter_ct_ip_link (Data Source)

This data source composes a Connectivity Template Primitive as a JSON string, suitable for use in the `primitives` attribute of either an `apstra_datacenter_connectivity_template` resource or the `children` attribute of a Different Connectivity Template JsonPrimitive.

## Example Usage

```terraform
# Each apstra_datacenter_ct_* data source represents a Connectivity Template
# Primitive. They're stand-ins for the Primitives found in the Web UI's CT
# builder interface.
#
# These data sources do not interact with the Apstra API. Instead, they assemble
# their input fields into a JSON string presented at the `primitive` attribute
# key.
#
# Use the `primitive` output anywhere you need a primitive represented as JSON:
# - at the root of a Connectivity Template
# - as a child of another Primitive (as constrained by the accepts/produces
# relationship between Primitives)
# Declare a couple of "Static Route" Connectivity Template Primitives:
data "apstra_datacenter_ct_static_route" "test-net-1" {
network = "192.0.2.0/24"
}
data "apstra_datacenter_ct_static_route" "test-net-2" {
network = "198.51.100.0/24"
}
# Each of these data source's `primitive` attribute produces JSON like this:
# {
# "type": "AttachStaticRoute",
# "data": {
# "network": "192.0.2.0/24",
# "share_ip_endpoint": false
# }
# }
# Use those `primitive` elements when declaring a parent Primitive:
data "apstra_datacenter_ct_ip_link" "ip_link_with_static_routes" {
routing_zone_id = "Zplm0niOFCCCfjaXkXo"
vlan_id = 3
ipv4_addressing_type = "numbered"
ipv6_addressing_type = "link_local"
children = [
data.apstra_datacenter_ct_static_route.test-net-1.primitive,
data.apstra_datacenter_ct_static_route.test-net-2.primitive,
]
}
# The IP Link data source's `primitive` field has the primitives of two static
# routes (children) as embedded strings:
# {
# "type": "AttachLogicalLink",
# "data": {
# "routing_zone_id": "Zplm0niOFCCCfjaXkXo",
# "tagged": true,
# "vlan_id": 3,
# "ipv4_addressing_type": "numbered",
# "ipv6_addressing_type": "link_local",
# "children": [
# "{\"type\":\"AttachStaticRoute\",\"data\":{\"network\":\"192.0.2.0/24\",\"share_ip_endpoint\":false}}",
# "{\"type\":\"AttachStaticRoute\",\"data\":{\"network\":\"198.51.100.0/24\",\"share_ip_endpoint\":false}}"
# ]
# }
# }
# Finally, use the IP Link's `primitive` element in a Connectivity Template:
resource "apstra_datacenter_connectivity_template" "t" {
blueprint_id = "b726704d-f80e-4733-9103-abd6ccd8752c"
name = "test-net-handoff"
description = "ip handoff with static routes to test nets"
tags = [
"test",
"terraform",
]
primitives = [
data.apstra_datacenter_ct_ip_link.ip_link_with_static_routes.primitive
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `routing_zone_id` (String) Apstra Object ID of the Routing Zone to which this IP Link belongs

### Optional

- `children` (Set of String) Set of JSON strings describing Connectivity Template Primitives which are children of this Connectivity Template JsonPrimitive. Use the `primitive` attribute of other Connectivity Template Primitives data sources here.
- `ipv4_addressing_type` (String) One of `numbered`, `none` (or omit)
- `ipv6_addressing_type` (String) One of `link_local`, `numbered`, `none` (or omit)
- `vlan_id` (Number) When set, selects the 802.1Q VLAN ID to use for the link's traffic. Omit for an untagged link.

### Read-Only

- `primitive` (String) JSON output for use in the `primitives` field of an `apstra_datacenter_connectivity_template` resource or a different Connectivity Template JsonPrimitive data source
103 changes: 103 additions & 0 deletions docs/data-sources/datacenter_ct_static_route.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
page_title: "apstra_datacenter_ct_static_route Data Source - terraform-provider-apstra"
subcategory: ""
description: |-
This data source composes a Connectivity Template Primitive as a JSON string, suitable for use in the primitives attribute of either an apstra_datacenter_connectivity_template resource or the children attribute of a Different Connectivity Template JsonPrimitive.
---

# apstra_datacenter_ct_static_route (Data Source)

This data source composes a Connectivity Template Primitive as a JSON string, suitable for use in the `primitives` attribute of either an `apstra_datacenter_connectivity_template` resource or the `children` attribute of a Different Connectivity Template JsonPrimitive.

## Example Usage

```terraform
# Each apstra_datacenter_ct_* data source represents a Connectivity Template
# Primitive. They're stand-ins for the Primitives found in the Web UI's CT
# builder interface.
#
# These data sources do not interact with the Apstra API. Instead, they assemble
# their input fields into a JSON string presented at the `primitive` attribute
# key.
#
# Use the `primitive` output anywhere you need a primitive represented as JSON:
# - at the root of a Connectivity Template
# - as a child of another Primitive (as constrained by the accepts/produces
# relationship between Primitives)
# Declare a couple of "Static Route" Connectivity Template Primitives:
data "apstra_datacenter_ct_static_route" "test-net-1" {
network = "192.0.2.0/24"
}
data "apstra_datacenter_ct_static_route" "test-net-2" {
network = "198.51.100.0/24"
}
# Each of these data source's `primitive` attribute produces JSON like this:
# {
# "type": "AttachStaticRoute",
# "data": {
# "network": "192.0.2.0/24",
# "share_ip_endpoint": false
# }
# }
# Use those `primitive` elements when declaring a parent Primitive:
data "apstra_datacenter_ct_ip_link" "ip_link_with_static_routes" {
routing_zone_id = "Zplm0niOFCCCfjaXkXo"
vlan_id = 3
ipv4_addressing_type = "numbered"
ipv6_addressing_type = "link_local"
children = [
data.apstra_datacenter_ct_static_route.test-net-1.primitive,
data.apstra_datacenter_ct_static_route.test-net-2.primitive,
]
}
# The IP Link data source's `primitive` field has the primitives of two static
# routes (children) as embedded strings:
# {
# "type": "AttachLogicalLink",
# "data": {
# "routing_zone_id": "Zplm0niOFCCCfjaXkXo",
# "tagged": true,
# "vlan_id": 3,
# "ipv4_addressing_type": "numbered",
# "ipv6_addressing_type": "link_local",
# "children": [
# "{\"type\":\"AttachStaticRoute\",\"data\":{\"network\":\"192.0.2.0/24\",\"share_ip_endpoint\":false}}",
# "{\"type\":\"AttachStaticRoute\",\"data\":{\"network\":\"198.51.100.0/24\",\"share_ip_endpoint\":false}}"
# ]
# }
# }
# Finally, use the IP Link's `primitive` element in a Connectivity Template:
resource "apstra_datacenter_connectivity_template" "t" {
blueprint_id = "b726704d-f80e-4733-9103-abd6ccd8752c"
name = "test-net-handoff"
description = "ip handoff with static routes to test nets"
tags = [
"test",
"terraform",
]
primitives = [
data.apstra_datacenter_ct_ip_link.ip_link_with_static_routes.primitive
]
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `network` (String) IPv4 or IPv6 prefix in CIDR notation

### Optional

- `share_ip_endpoint` (Boolean) Indicates whether the next-hop IP address is shared across multiple remote systems. Default: Default: `false`

### Read-Only

- `primitive` (String) JSON output for use in the `primitives` field of an `apstra_datacenter_connectivity_template` resource or a different Connectivity Template JsonPrimitive data source
Loading

0 comments on commit 694d564

Please sign in to comment.