diff --git a/example/user/main.tf b/example/user/main.tf index cc3ce8c..e025951 100644 --- a/example/user/main.tf +++ b/example/user/main.tf @@ -11,26 +11,36 @@ provider "plural" { use_cli = true } -data "plural_config" "config" {} +# data "plural_config" "config" {} +# +# data "plural_user" "user" { +# email = "marcin@plural.sh" +# } -data "plural_user" "user" { - email = "marcin@plural.sh" +resource "plural_user" "spiderman" { + name = "Peter Parker" + email = "spiderman@plural.sh" } -resource "plural_user" "user" { - name = "Marcin Maciaszczyk" - email = "marcin@plural.sh" +# data "plural_group" "avengers" { +# name = "avengers" +# } + +resource "plural_group" "avengers" { + name = "avengers" + description = "avengers group" +} + +resource "plural_group_member" "spiderman" { + user_id = plural_user.spiderman.id + group_id = plural_group.avengers.id +} + +resource "plural_group_member" "duplicate" { + user_id = plural_user.spiderman.id + group_id = plural_group.avengers.id } -# data "plural_group" "group" { -# name = "team" -# } -# -# resource "plural_group" "test" { -# name = "test" -# description = "test group" -# } -# # resource "plural_rbac" "rbac" { # service_id = "624bff88-05e3-45f6-bc3b-44708594e28e" # bindings = {