-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cd/feat/network-group-assignment-example
- Loading branch information
Showing
13 changed files
with
113 additions
and
175 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
OPEN_API_TMP_DIR := "tmp" | ||
CLIENT_DIR := "pkg/config-api-client" | ||
TOOLS_PROVIDER_DIR := "tools" | ||
OPENAPI_SPEC := "pkg/config-api-client/api" | ||
|
@@ -8,18 +7,10 @@ SOURCE_OPEN_API_SPEC_FILE := ".openapi.source.yaml" | |
help: | ||
@just --list | ||
|
||
_retrieve-config-api-openapi-spec: | ||
rm -rf {{ OPEN_API_TMP_DIR }} | ||
git clone [email protected]:aruba-uxi/configuration-api.git --depth=1 {{ OPEN_API_TMP_DIR }} | ||
mkdir -p {{ OPENAPI_SPEC }} | ||
cp {{ OPEN_API_TMP_DIR }}/oas/openapi.yaml {{ OPENAPI_SPEC }}/{{ SOURCE_OPEN_API_SPEC_FILE }} | ||
rm -rf {{ OPEN_API_TMP_DIR }} | ||
|
||
_remove-client-files: | ||
cd {{ CLIENT_DIR }} && cat .openapi-generator/FILES | xargs -n 1 rm -f | ||
|
||
generate-config-api-client: _retrieve-config-api-openapi-spec | ||
just _remove-client-files | ||
generate-config-api-client: _remove-client-files | ||
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \ | ||
--input-spec /local/{{ OPENAPI_SPEC }}/{{ SOURCE_OPEN_API_SPEC_FILE }} \ | ||
--generator-name go \ | ||
|
@@ -33,11 +24,11 @@ generate-config-api-client: _retrieve-config-api-openapi-spec | |
just tidy-client | ||
just fmt-client | ||
|
||
setup-dev: | ||
setup-run: | ||
grep -q "registry.terraform.io/arubauxi/hpeuxi" ~/.terraformrc && echo "Dev override found - installing provider locally" || { echo "Dev override not found - please follow README setup guide"; exit 1; } | ||
go install . | ||
|
||
remove-dev-override: | ||
remove-setup-run-dev-override: | ||
sed -i '' '/registry\.terraform\.io\/arubauxi\/hpeuxi/d' ~/.terraformrc | ||
|
||
build-local: | ||
|
@@ -140,13 +131,3 @@ tidy: | |
|
||
clean: | ||
find . -name ".coverage*" -type f -delete | ||
|
||
DEFAULT_EXAMPLE := "full-demo" | ||
|
||
plan example=DEFAULT_EXAMPLE +ARGS='': | ||
go install . | ||
cd examples/{{example}} && terraform plan {{ ARGS }} | ||
|
||
apply example=DEFAULT_EXAMPLE +ARGS='': | ||
go install . | ||
cd examples/{{example}} && terraform apply {{ ARGS }} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
examples/data-sources/uxi_agent_group_assignment/data-source.tf
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,6 @@ | ||
# Retrieve data for an agent group assignment | ||
data "uxi_agent_group_assignment" "my_agent_group_assignment" { | ||
filter = { | ||
id = "<my_agent_group_assignment_id>" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/data-sources/uxi_service_test_group_assignment/data-source.tf
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,6 @@ | ||
# Retrieve data for a service test group assignment | ||
data "uxi_service_test_group_assignment" "my_service_test_group_assignment" { | ||
filter = { | ||
id = "<my_service_test_group_assignment_id>" | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
# Import an agent group assignment using its ID | ||
terraform import uxi_agent_group_assignment.my_agent_group_assignment <my_agent_group_assignment_id> | ||
|
||
# Import an agent group assignment using its ID with an import block | ||
import { | ||
to = uxi_agent_group_assignment.my_agent_group_assignment | ||
id = "<my_agent_group_assignment_id>" | ||
} |
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,4 @@ | ||
resource "uxi_agent_group_assignment" "my_agent_group_assignment" { | ||
agent_id = uxi_agent.my_agent.id | ||
group_id = uxi_group.my_group.id | ||
} |
8 changes: 8 additions & 0 deletions
8
examples/resources/uxi_service_test_group_assignment/import.sh
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,8 @@ | ||
# Import service test group assignment using its ID | ||
terraform import uxi_service_test_group_assignment.my_service_test_group_assignment <my_service_test_group_assignment_id> | ||
|
||
# Import service test group assignment using its ID with an import block | ||
import { | ||
to = uxi_service_test_group_assignment.my_service_test_group_assignment | ||
id = "<my_service_test_group_assignment_id>" | ||
} |
4 changes: 4 additions & 0 deletions
4
examples/resources/uxi_service_test_group_assignment/resource.tf
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,4 @@ | ||
resource "uxi_service_test_group_assignment" "my_service_test_group_assignment" { | ||
service_test_id = uxi_service_test.my_service_test.id | ||
group_id = uxi_group.my_group.id | ||
} |