From 584fce6aeab028fadad79e57a83bc7da1e0f2b0f Mon Sep 17 00:00:00 2001 From: Marcin Maciaszczyk Date: Thu, 25 Jul 2024 12:30:05 +0200 Subject: [PATCH] fix group data source --- example/user/main.tf | 20 ++++++++++++++++++++ internal/model/group.go | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 example/user/main.tf diff --git a/example/user/main.tf b/example/user/main.tf new file mode 100644 index 0000000..4a1aaa1 --- /dev/null +++ b/example/user/main.tf @@ -0,0 +1,20 @@ +terraform { + required_providers { + plural = { + source = "pluralsh/plural" + version = "0.2.1" + } + } +} + +provider "plural" { + use_cli = true +} + +data "plural_user" "user" { + email = "marcin@plural.sh" +} + +data "plural_group" "group" { + name = "team" +} \ No newline at end of file diff --git a/internal/model/group.go b/internal/model/group.go index 23c069a..bbf03fd 100644 --- a/internal/model/group.go +++ b/internal/model/group.go @@ -14,7 +14,7 @@ type Group struct { func (g *Group) From(response *gqlclient.GroupFragment) { g.Id = types.StringValue(response.ID) g.Name = types.StringValue(response.Name) - g.Name = types.StringPointerValue(response.Description) + g.Description = types.StringPointerValue(response.Description) } func (g *Group) Attributes() gqlclient.GroupAttributes {