Skip to content

Commit

Permalink
added / updated docs and ran generate
Browse files Browse the repository at this point in the history
  • Loading branch information
rschmied committed Dec 28, 2023
1 parent fbd5b63 commit 214433a
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 0 deletions.
40 changes: 40 additions & 0 deletions docs/data-sources/connector.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "cml2_connector Data Source - terraform-provider-cml2"
subcategory: ""
description: |-
A data source that retrieves external connectors information from the controller.
---

# cml2_connector (Data Source)

A data source that retrieves external connectors information from the controller.



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

### Optional

- `label` (String) A connector label to filter the connector list returned by the controller. Connector labels must be unique, so it's either one group or no group at all if a name filter is provided.
- `tag` (String) A tag name to filter the groups list returned by the controller. Connector tags can be defined on multiple connectors, a list can be returned.

### Read-Only

- `connectors` (Attributes List) A list of all permission groups available on the controller. (see [below for nested schema](#nestedatt--connectors))
- `id` (String) A UUID. The presence of the ID attribute is mandated by the framework. The attribute is a random UUID and has no actual significance.

<a id="nestedatt--connectors"></a>
### Nested Schema for `connectors`

Read-Only:

- `device_name` (String) the actual (Linux network) device name of the external connector.
- `id` (String) External connector identifier, a UUID.
- `label` (String) The label of the external connector, like "NAT" or "System Bridge".
- `protected` (Boolean) Whether the connector is protected, e.g. BPDUs are filtered or not.
- `snooped` (Boolean) True if the IP address snooper listens on this connector.
- `tags` (Set of String) The external connector tag set.


1 change: 1 addition & 0 deletions docs/data-sources/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Read-Only:
- `cpu_limit` (Number) CPU limit in %, 20-100. Can be changed until the node is started once. Will require a replace in that case.
- `cpus` (Number) Number of CPUs. Can be changed until the node is started once. Will require a replace in that case.
- `data_volume` (Number) Size of data volume, in GB. Can be changed until the node is started once. Will require a replace in that case.
- `hide_links` (Boolean) If true, links are not shown in the topology. This is a visual cue and does not influence any simulation function.
- `id` (String) Node ID (UUID).
- `imagedefinition` (String) Image definition, must match the node type. Can be changed until the node is started once. Will require a replace in that case.
- `interfaces` (Attributes List) List of interfaces on the node. (see [below for nested schema](#nestedatt--node--interfaces))
Expand Down
1 change: 1 addition & 0 deletions docs/resources/lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ Optional:
- `cpu_limit` (Number) CPU limit in %, 20-100. Can be changed until the node is started once. Will require a replace in that case.
- `cpus` (Number) Number of CPUs. Can be changed until the node is started once. Will require a replace in that case.
- `data_volume` (Number) Size of data volume, in GB. Can be changed until the node is started once. Will require a replace in that case.
- `hide_links` (Boolean) If true, links are not shown in the topology. This is a visual cue and does not influence any simulation function.
- `imagedefinition` (String) Image definition, must match the node type. Can be changed until the node is started once. Will require a replace in that case.
- `ram` (Number) Amount of RAM, megabytes. Can be changed until the node is started once. Will require a replace in that case.
- `tags` (Set of String) Set of tags of the node.
Expand Down
1 change: 1 addition & 0 deletions docs/resources/node.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ A node resource represents a CML node. At create time, the lab ID, a node defini
- `cpu_limit` (Number) CPU limit in %, 20-100. Can be changed until the node is started once. Will require a replace in that case.
- `cpus` (Number) Number of CPUs. Can be changed until the node is started once. Will require a replace in that case.
- `data_volume` (Number) Size of data volume, in GB. Can be changed until the node is started once. Will require a replace in that case.
- `hide_links` (Boolean) If true, links are not shown in the topology. This is a visual cue and does not influence any simulation function.
- `imagedefinition` (String) Image definition, must match the node type. Can be changed until the node is started once. Will require a replace in that case.
- `ram` (Number) Amount of RAM, megabytes. Can be changed until the node is started once. Will require a replace in that case.
- `tags` (Set of String) Set of tags of the node.
Expand Down
15 changes: 15 additions & 0 deletions examples/data-sources/cml2_connector/data_source.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Get a list of all connectors on the system with either the provided tag (the
# result can have multiple elements) or with a specific name/label (the result
# has exactly one or zero elements if the label does not exist).

data "cml2_connector" "nat" {
tag = "NAT"
# Alternatively (or in combination, logical AND):
# label = "System Bridge"
}

output "nat_connector" {
# The label can be used as the configuration of an external connector node
# The ID is mostly for internal use.
value = data.cml2_connector.nat.connectors[0].label
}

0 comments on commit 214433a

Please sign in to comment.