Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add terraform fmt workflow #153

Merged
merged 9 commits into from
Dec 4, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Terraform

on: [push]

jobs:
terraform-fmt:
name: Check formatting
runs-on: ubuntu-latest
env:
TF_IN_AUTOMATION: "true"

steps:
- name: Git checkout
uses: actions/checkout@v4

- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.13.7

- name: Terraform fmt
id: fmt
run: terraform fmt -recursive -check
1riatsila1 marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ fmt:
go run github.com/segmentio/[email protected] -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
Expand Down
4 changes: 2 additions & 2 deletions docs/index.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/resources/agent.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/resources/agent_group_assignment.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/resources/group.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/resources/network_group_assignment.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/resources/sensor_group_assignment.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/resources/service_test.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/resources/service_test_group_assignment.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/resources/wired_network.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/resources/wireless_network.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions examples/provider/provider.tf
Original file line number Diff line number Diff line change
@@ -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"
}
6 changes: 3 additions & 3 deletions examples/resources/hpeuxi_agent/resource.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "hpeuxi_agent" "my_agent" {
name = "name"
notes = "notes"
pcap_mode = "light"
name = "name"
notes = "notes"
pcap_mode = "light"
}
4 changes: 2 additions & 2 deletions examples/resources/hpeuxi_agent_group_assignment/resource.tf
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion examples/resources/hpeuxi_group/resource.tf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
4 changes: 2 additions & 2 deletions examples/resources/hpeuxi_sensor_group_assignment/resource.tf
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion examples/resources/hpeuxi_service_test/resource.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "hpeuxi_service_test" "my_service_test" {
name = "name"
name = "name"

# Deleting of service tests is not supported yet
lifecycle {
Expand Down
Original file line number Diff line number Diff line change
@@ -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
}
2 changes: 1 addition & 1 deletion examples/resources/hpeuxi_wired_network/resource.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "hpeuxi_wired_network" "my_wired_network" {
name = "name"
name = "name"

# Deleting of wired networks is not supported yet
lifecycle {
Expand Down
2 changes: 1 addition & 1 deletion examples/resources/hpeuxi_wireless_network/resource.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
resource "hpeuxi_wireless_network" "my_wireless_network" {
name = "name"
name = "name"

# Deleting of wireless networks is not supported yet
lifecycle {
Expand Down
Loading