From ea39666d70eb0bf646ffe48bd48b75610f85a4d5 Mon Sep 17 00:00:00 2001 From: cliftonHPE Date: Wed, 27 Nov 2024 11:19:39 +0200 Subject: [PATCH] network group assignment example --- docs/data-sources/network_group_assignment.md | 11 +++++++++- docs/resources/network_group_assignment.md | 22 +++++++++++++++++++ .../data-source.tf | 6 +++++ .../uxi_network_group_assignment/import.sh | 8 +++++++ .../uxi_network_group_assignment/resource.tf | 4 ++++ 5 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 examples/data-sources/uxi_network_group_assignment/data-source.tf create mode 100644 examples/resources/uxi_network_group_assignment/import.sh create mode 100644 examples/resources/uxi_network_group_assignment/resource.tf diff --git a/docs/data-sources/network_group_assignment.md b/docs/data-sources/network_group_assignment.md index daf1079b..8d3adca2 100644 --- a/docs/data-sources/network_group_assignment.md +++ b/docs/data-sources/network_group_assignment.md @@ -10,7 +10,16 @@ description: |- Retrieves a specific network group assignment. - +## Example Usage + +```terraform +# Retrieve data for a network group assignment +data "uxi_network_group_assignment" "my_network_group_assignment" { + filter = { + id = "" + } +} +``` ## Schema diff --git a/docs/resources/network_group_assignment.md b/docs/resources/network_group_assignment.md index 88eb0617..9101cc06 100644 --- a/docs/resources/network_group_assignment.md +++ b/docs/resources/network_group_assignment.md @@ -10,7 +10,14 @@ description: |- Manages a network group assignment. +## Example Usage +```terraform +resource "uxi_network_group_assignment" "my_network_group_assignment" { + network_id = uxi_wired_network.my_network.id + group_id = uxi_group.my_group.id +} +``` ## Schema @@ -23,3 +30,18 @@ Manages a network group assignment. ### Read-Only - `id` (String) The identifier of the network group assignment + +## Import + +Import is supported using the following syntax: + +```shell +# Import network group assignment using its ID +terraform import uxi_network_group_assignment.my_network_group_assignment + +# Import network group assignment using its ID with an import block +import { + to = uxi_network_group_assignment.my_network_group_assignment + id = "" +} +``` diff --git a/examples/data-sources/uxi_network_group_assignment/data-source.tf b/examples/data-sources/uxi_network_group_assignment/data-source.tf new file mode 100644 index 00000000..32989b43 --- /dev/null +++ b/examples/data-sources/uxi_network_group_assignment/data-source.tf @@ -0,0 +1,6 @@ +# Retrieve data for a network group assignment +data "uxi_network_group_assignment" "my_network_group_assignment" { + filter = { + id = "" + } +} diff --git a/examples/resources/uxi_network_group_assignment/import.sh b/examples/resources/uxi_network_group_assignment/import.sh new file mode 100644 index 00000000..fda35aba --- /dev/null +++ b/examples/resources/uxi_network_group_assignment/import.sh @@ -0,0 +1,8 @@ +# Import network group assignment using its ID +terraform import uxi_network_group_assignment.my_network_group_assignment + +# Import network group assignment using its ID with an import block +import { + to = uxi_network_group_assignment.my_network_group_assignment + id = "" +} diff --git a/examples/resources/uxi_network_group_assignment/resource.tf b/examples/resources/uxi_network_group_assignment/resource.tf new file mode 100644 index 00000000..a31b5c1a --- /dev/null +++ b/examples/resources/uxi_network_group_assignment/resource.tf @@ -0,0 +1,4 @@ +resource "uxi_network_group_assignment" "my_network_group_assignment" { + network_id = uxi_wired_network.my_network.id + group_id = uxi_group.my_group.id +}