diff --git a/Justfile b/Justfile index 51edac72..c42ce6fe 100644 --- a/Justfile +++ b/Justfile @@ -74,11 +74,14 @@ lint: python -m tools.lint-attribution lint + terraform fmt -recursive -check + fmt: python -m tools.lint-attribution format go run github.com/segmentio/golines@v0.12.2 -w . go run golang.org/x/tools/cmd/goimports@latest -local github.com/aruba-uxi -w . go run mvdan.cc/gofumpt@latest -w . + terraform fmt --recursive . tidy-provider: go mod tidy diff --git a/docs/index.md b/docs/index.md index 9e295e96..6da79f03 100644 --- a/docs/index.md +++ b/docs/index.md @@ -13,8 +13,8 @@ Interact with HPE Aruba Network UXI Configuration. ```terraform provider "hpeuxi" { - client_id = "your_greenlake_uxi_client_id" - client_secret = "your_greenlake_uxi_client_secret" + client_id = "your_greenlake_uxi_client_id" + client_secret = "your_greenlake_uxi_client_secret" } ``` diff --git a/docs/resources/agent.md b/docs/resources/agent.md index 0d6ac94f..6202a31e 100644 --- a/docs/resources/agent.md +++ b/docs/resources/agent.md @@ -14,9 +14,9 @@ Manages an agent. ```terraform resource "hpeuxi_agent" "my_agent" { - name = "name" - notes = "notes" - pcap_mode = "light" + name = "name" + notes = "notes" + pcap_mode = "light" } ``` diff --git a/docs/resources/agent_group_assignment.md b/docs/resources/agent_group_assignment.md index e4a732c2..66ee0439 100644 --- a/docs/resources/agent_group_assignment.md +++ b/docs/resources/agent_group_assignment.md @@ -14,8 +14,8 @@ Manages an agent group assignment. ```terraform resource "hpeuxi_agent_group_assignment" "my_agent_group_assignment" { - agent_id = hpeuxi_agent.my_agent.id - group_id = hpeuxi_group.my_group.id + agent_id = hpeuxi_agent.my_agent.id + group_id = hpeuxi_group.my_group.id } ``` diff --git a/docs/resources/group.md b/docs/resources/group.md index 69507355..efe69097 100644 --- a/docs/resources/group.md +++ b/docs/resources/group.md @@ -15,7 +15,7 @@ Manages a group. ```terraform # Create level 1 group attached to the root node resource "hpeuxi_group" "level_1" { - name = "Parent Group" + name = "Parent Group" } # Create level 2 group attached to level 1 group diff --git a/docs/resources/network_group_assignment.md b/docs/resources/network_group_assignment.md index 7095a402..d06eab03 100644 --- a/docs/resources/network_group_assignment.md +++ b/docs/resources/network_group_assignment.md @@ -14,8 +14,8 @@ Manages a network group assignment. ```terraform resource "hpeuxi_network_group_assignment" "my_network_group_assignment" { - network_id = hpeuxi_wired_network.my_network.id - group_id = hpeuxi_group.my_group.id + network_id = hpeuxi_wired_network.my_network.id + group_id = hpeuxi_group.my_group.id } ``` diff --git a/docs/resources/sensor_group_assignment.md b/docs/resources/sensor_group_assignment.md index 9cc91270..1822a73e 100644 --- a/docs/resources/sensor_group_assignment.md +++ b/docs/resources/sensor_group_assignment.md @@ -14,8 +14,8 @@ Manages a sensor group assignment. ```terraform resource "hpeuxi_sensor_group_assignment" "my_sensor_group_assignment" { - sensor_id = hpeuxi_sensor.my_sensor.id - group_id = hpeuxi_group.my_group.id + sensor_id = hpeuxi_sensor.my_sensor.id + group_id = hpeuxi_group.my_group.id } ``` diff --git a/docs/resources/service_test.md b/docs/resources/service_test.md index 3829e9f6..fd0d6679 100644 --- a/docs/resources/service_test.md +++ b/docs/resources/service_test.md @@ -14,7 +14,7 @@ Manages a service test. ```terraform resource "hpeuxi_service_test" "my_service_test" { - name = "name" + name = "name" # Deleting of service tests is not supported yet lifecycle { diff --git a/docs/resources/service_test_group_assignment.md b/docs/resources/service_test_group_assignment.md index 9072354b..de1e3680 100644 --- a/docs/resources/service_test_group_assignment.md +++ b/docs/resources/service_test_group_assignment.md @@ -14,8 +14,8 @@ Manages a service test group assignment. ```terraform resource "hpeuxi_service_test_group_assignment" "my_service_test_group_assignment" { - service_test_id = hpeuxi_service_test.my_service_test.id - group_id = hpeuxi_group.my_group.id + service_test_id = hpeuxi_service_test.my_service_test.id + group_id = hpeuxi_group.my_group.id } ``` diff --git a/docs/resources/wired_network.md b/docs/resources/wired_network.md index 6824c65d..d6d623e4 100644 --- a/docs/resources/wired_network.md +++ b/docs/resources/wired_network.md @@ -14,7 +14,7 @@ Manages a wired network. ```terraform resource "hpeuxi_wired_network" "my_wired_network" { - name = "name" + name = "name" # Deleting of wired networks is not supported yet lifecycle { diff --git a/docs/resources/wireless_network.md b/docs/resources/wireless_network.md index 68039084..9152460b 100644 --- a/docs/resources/wireless_network.md +++ b/docs/resources/wireless_network.md @@ -14,7 +14,7 @@ Manages a wireless network. ```terraform resource "hpeuxi_wireless_network" "my_wireless_network" { - name = "name" + name = "name" # Deleting of wireless networks is not supported yet lifecycle { diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf index 97f05be3..7c4ff7b3 100644 --- a/examples/provider/provider.tf +++ b/examples/provider/provider.tf @@ -1,4 +1,4 @@ provider "hpeuxi" { - client_id = "your_greenlake_uxi_client_id" - client_secret = "your_greenlake_uxi_client_secret" + client_id = "your_greenlake_uxi_client_id" + client_secret = "your_greenlake_uxi_client_secret" } diff --git a/examples/resources/hpeuxi_agent/resource.tf b/examples/resources/hpeuxi_agent/resource.tf index 14b1e389..9f952f9a 100644 --- a/examples/resources/hpeuxi_agent/resource.tf +++ b/examples/resources/hpeuxi_agent/resource.tf @@ -1,5 +1,5 @@ resource "hpeuxi_agent" "my_agent" { - name = "name" - notes = "notes" - pcap_mode = "light" + name = "name" + notes = "notes" + pcap_mode = "light" } diff --git a/examples/resources/hpeuxi_agent_group_assignment/resource.tf b/examples/resources/hpeuxi_agent_group_assignment/resource.tf index 784f5e28..7f3b8d2f 100644 --- a/examples/resources/hpeuxi_agent_group_assignment/resource.tf +++ b/examples/resources/hpeuxi_agent_group_assignment/resource.tf @@ -1,4 +1,4 @@ resource "hpeuxi_agent_group_assignment" "my_agent_group_assignment" { - agent_id = hpeuxi_agent.my_agent.id - group_id = hpeuxi_group.my_group.id + agent_id = hpeuxi_agent.my_agent.id + group_id = hpeuxi_group.my_group.id } diff --git a/examples/resources/hpeuxi_group/resource.tf b/examples/resources/hpeuxi_group/resource.tf index a8fcfdb0..b4188c3c 100644 --- a/examples/resources/hpeuxi_group/resource.tf +++ b/examples/resources/hpeuxi_group/resource.tf @@ -1,6 +1,6 @@ # Create level 1 group attached to the root node resource "hpeuxi_group" "level_1" { - name = "Parent Group" + name = "Parent Group" } # Create level 2 group attached to level 1 group diff --git a/examples/resources/hpeuxi_network_group_assignment/resource.tf b/examples/resources/hpeuxi_network_group_assignment/resource.tf index 1433abad..c985536c 100644 --- a/examples/resources/hpeuxi_network_group_assignment/resource.tf +++ b/examples/resources/hpeuxi_network_group_assignment/resource.tf @@ -1,4 +1,4 @@ resource "hpeuxi_network_group_assignment" "my_network_group_assignment" { - network_id = hpeuxi_wired_network.my_network.id - group_id = hpeuxi_group.my_group.id + network_id = hpeuxi_wired_network.my_network.id + group_id = hpeuxi_group.my_group.id } diff --git a/examples/resources/hpeuxi_sensor_group_assignment/resource.tf b/examples/resources/hpeuxi_sensor_group_assignment/resource.tf index f8ba57d4..8df7409a 100644 --- a/examples/resources/hpeuxi_sensor_group_assignment/resource.tf +++ b/examples/resources/hpeuxi_sensor_group_assignment/resource.tf @@ -1,4 +1,4 @@ resource "hpeuxi_sensor_group_assignment" "my_sensor_group_assignment" { - sensor_id = hpeuxi_sensor.my_sensor.id - group_id = hpeuxi_group.my_group.id + sensor_id = hpeuxi_sensor.my_sensor.id + group_id = hpeuxi_group.my_group.id } diff --git a/examples/resources/hpeuxi_service_test/resource.tf b/examples/resources/hpeuxi_service_test/resource.tf index 787e0904..12e953b0 100644 --- a/examples/resources/hpeuxi_service_test/resource.tf +++ b/examples/resources/hpeuxi_service_test/resource.tf @@ -1,5 +1,5 @@ resource "hpeuxi_service_test" "my_service_test" { - name = "name" + name = "name" # Deleting of service tests is not supported yet lifecycle { diff --git a/examples/resources/hpeuxi_service_test_group_assignment/resource.tf b/examples/resources/hpeuxi_service_test_group_assignment/resource.tf index 18083881..e9280cff 100644 --- a/examples/resources/hpeuxi_service_test_group_assignment/resource.tf +++ b/examples/resources/hpeuxi_service_test_group_assignment/resource.tf @@ -1,4 +1,4 @@ resource "hpeuxi_service_test_group_assignment" "my_service_test_group_assignment" { - service_test_id = hpeuxi_service_test.my_service_test.id - group_id = hpeuxi_group.my_group.id + service_test_id = hpeuxi_service_test.my_service_test.id + group_id = hpeuxi_group.my_group.id } diff --git a/examples/resources/hpeuxi_wired_network/resource.tf b/examples/resources/hpeuxi_wired_network/resource.tf index 59ee0bc5..9d5c5685 100644 --- a/examples/resources/hpeuxi_wired_network/resource.tf +++ b/examples/resources/hpeuxi_wired_network/resource.tf @@ -1,5 +1,5 @@ resource "hpeuxi_wired_network" "my_wired_network" { - name = "name" + name = "name" # Deleting of wired networks is not supported yet lifecycle { diff --git a/examples/resources/hpeuxi_wireless_network/resource.tf b/examples/resources/hpeuxi_wireless_network/resource.tf index 28830e85..22c63e98 100644 --- a/examples/resources/hpeuxi_wireless_network/resource.tf +++ b/examples/resources/hpeuxi_wireless_network/resource.tf @@ -1,5 +1,5 @@ resource "hpeuxi_wireless_network" "my_wireless_network" { - name = "name" + name = "name" # Deleting of wireless networks is not supported yet lifecycle {