sotoon_iam_service_user_group_binding (Resource)

Membership relation between a service-user and a group. This object defiens the membership of a service-user in a group.

Example Usage

data "sotoon_workspace" "mycompany" {
  id = "ee6f89b5-e07c-42f1-9462-05cec9cd92d8" # Workspace ID
}

data "sotoon_iam_group" "deployers" {
  workspace_id = data.sotoon_workspace.mycompany.id
  name         = "deployers"
}

data "sotoon_iam_service_user" "my_deployer" {
  workspace_id = data.sotoon_workspace.mycompany.id
  name         = "deployer"
}

# Joining `my_deployer` service-user to the deployers group
resource "sotoon_iam_service_user_group_binding" "my_service_user_is_deployer" {
  service_user_id      = data.sotoon_iam_service_user.my_deployer.id
  workspace_id = data.sotoon_iam_workspace.mycompany.id
  group_id     = data.sotoon_iam_group.deployers.id
}

Schema

Required

  • group_id (String) The ID of the group to which the service-user will be binded.
  • user_id (String) Service-user ID.
  • workspace_id (String) Workspace ID of the group.

Read-Only

  • id (String) Unique id of the binding
  • last_updated (String) Timestamp of the last Terraform update.

Import

Import is supported using the following syntax:

# Replace <service-user-id>, <group-id> and <workspace-id> with real values
terraform import sotoon_iam_group_service_user_binding.my_service_user_is_deployer "<service-user-id>:<group-id>:<workspace-id>"

# For example:
terraform import sotoon_iam_group_service_user_binding.my_service_user_is_deployer \
    "b8c133a4-a060-4906-8654-57988dbdf098:34f57a2f-6e4d-4ded-9025-ff00911d3313:ee6f89b5-e07c-42f1-9462-05cec9cd92d8"