From eece1d6e530d2875e2cd7cb458142a497386df8e Mon Sep 17 00:00:00 2001 From: Andrew Burke Date: Fri, 20 Sep 2024 12:26:19 -0700 Subject: [PATCH] Fix linting --- .../teleport_static_host_user/resource.tf | 42 +++++++++---------- .../fixtures/static_host_user_0_create.tf | 32 +++++++------- .../fixtures/static_host_user_1_update.tf | 32 +++++++------- .../testlib/static_host_user_test.go | 9 ++-- 4 files changed, 58 insertions(+), 57 deletions(-) diff --git a/integrations/terraform/examples/resources/teleport_static_host_user/resource.tf b/integrations/terraform/examples/resources/teleport_static_host_user/resource.tf index a8dae6a091f88..192c97116375b 100644 --- a/integrations/terraform/examples/resources/teleport_static_host_user/resource.tf +++ b/integrations/terraform/examples/resources/teleport_static_host_user/resource.tf @@ -1,24 +1,24 @@ resource "teleport_static_host_user" "test" { - version = "v2" - metadata = { - name = "test" - } - spec = { - matchers = [ - { - node_labels = [ - { - name = "foo" - values = ["bar"] - } - ] - node_labels_expression = "labels.foo == \"bar\"" - groups = ["foo", "bar"] - sudoers = ["abcd1234"] - uid = 1234 - gid = 1234 - default_shell = "/bin/bash" - } + version = "v2" + metadata = { + name = "test" + } + spec = { + matchers = [ + { + node_labels = [ + { + name = "foo" + values = ["bar"] + } ] - } + node_labels_expression = "labels.foo == \"bar\"" + groups = ["foo", "bar"] + sudoers = ["abcd1234"] + uid = 1234 + gid = 1234 + default_shell = "/bin/bash" + } + ] + } } \ No newline at end of file diff --git a/integrations/terraform/testlib/fixtures/static_host_user_0_create.tf b/integrations/terraform/testlib/fixtures/static_host_user_0_create.tf index dda43d9fad3a2..2d36081e1799f 100644 --- a/integrations/terraform/testlib/fixtures/static_host_user_0_create.tf +++ b/integrations/terraform/testlib/fixtures/static_host_user_0_create.tf @@ -1,19 +1,19 @@ resource "teleport_static_host_user" "test" { - version = "v2" - metadata = { - name = "test" - } - spec = { - matchers = [ - { - node_labels = [ - { - name = "foo" - values = ["bar"] - } - ] - groups = ["foo", "bar"] - } + version = "v2" + metadata = { + name = "test" + } + spec = { + matchers = [ + { + node_labels = [ + { + name = "foo" + values = ["bar"] + } ] - } + groups = ["foo", "bar"] + } + ] + } } \ No newline at end of file diff --git a/integrations/terraform/testlib/fixtures/static_host_user_1_update.tf b/integrations/terraform/testlib/fixtures/static_host_user_1_update.tf index bf89a32234742..a7221c25c2645 100644 --- a/integrations/terraform/testlib/fixtures/static_host_user_1_update.tf +++ b/integrations/terraform/testlib/fixtures/static_host_user_1_update.tf @@ -1,19 +1,19 @@ resource "teleport_static_host_user" "test" { - version = "v2" - metadata = { - name = "test" - } - spec = { - matchers = [ - { - node_labels = [ - { - name = "baz" - values = ["quux"] - } - ] - groups = ["baz", "quux"] - } + version = "v2" + metadata = { + name = "test" + } + spec = { + matchers = [ + { + node_labels = [ + { + name = "baz" + values = ["quux"] + } ] - } + groups = ["baz", "quux"] + } + ] + } } \ No newline at end of file diff --git a/integrations/terraform/testlib/static_host_user_test.go b/integrations/terraform/testlib/static_host_user_test.go index ec51ded4374c8..2ca096d6a1058 100644 --- a/integrations/terraform/testlib/static_host_user_test.go +++ b/integrations/terraform/testlib/static_host_user_test.go @@ -21,14 +21,15 @@ import ( "fmt" "time" - v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" - labelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/label/v1" - userprovisioningv2 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2" - "github.com/gravitational/teleport/api/types" "github.com/gravitational/trace" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" "github.com/hashicorp/terraform-plugin-sdk/v2/terraform" "github.com/stretchr/testify/require" + + v1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/header/v1" + labelv1 "github.com/gravitational/teleport/api/gen/proto/go/teleport/label/v1" + userprovisioningv2 "github.com/gravitational/teleport/api/gen/proto/go/teleport/userprovisioning/v2" + "github.com/gravitational/teleport/api/types" ) func (s *TerraformSuiteOSS) TestStaticHostUser() {