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

docs(resources): iam_member documentation and examples #63

Merged
merged 1 commit into from
Nov 1, 2023

Conversation

ndopj
Copy link
Contributor

@ndopj ndopj commented Nov 1, 2023

montecarlo_iam_member (Resource)

Represents a named resource which lets you assign user to the Monte Carlo authorization group (see montecarlo_iam_group). This assignment is allowed only if the authorization group is not configured for SSO. Configured member (user) will be asigned to the configured group, selected by the group name.

This group name is effectively group ID as well (see montecarlo_iam_group) and is not shown in the Monte Carlo UI by default. montecarlo_iam_group resource sets the group name (ID) to the same value as its label, so the value displayed in the Monte Carlo UI, for groups terraformed by this resource, is also a group name (ID). Alternatively, if you are using montecarlo_iam_group resource, you can reference group name (ID) directly in the Terraform code.

To get more information about Monte Carlo authorization groups member assignments, see:

Example Usage

resource "montecarlo_iam_member" "example_builtin" {
  group = "groups/editors-all"
  member = "user:[email protected]"
}
resource "montecarlo_iam_member" "example_custom" {
  group = "groups/custom-group"
  member = "user:[email protected]"
}
resource "montecarlo_iam_member" "example_multiple" {
  group = "groups/custom-group"
  member = each.value
  for_each = toset([
    "user:[email protected]",
    "user:[email protected]"
  ])
}

Schema

Required

  • group (String) ID (name) of the authorization group to which the member (user) will be assigned. Current implementation requires the value to follow this format groups/<group_name>. Monte Carlo UI currently does not expose name of the groups, therefore it might be complicated to obtain this value for existing groups. For this purpose, resource montecarlo_iam_group sets name of the group and its label to the same values.

    • builtin groups are supported (e.g. groups/editors-all)
    • custom groups are supported (e.g. groups/custom-group)
  • member (String) This attribute represents the user that will be assigned to the specified Monte Carlo authorization group. Current implementation requires the value to follow this format user:[email protected]. If user with this email is not found in the Monte Carlo, the resource operations will fail.

Import

This resource can be imported using the import ID with following format:

  • {{groups/<group_name>,user:<user_email>}}

In Terraform v1.5.0 and later, use an import block to import a Member assignment using one of the formats above. For example:

import {
  id = "{{groups/<group_name>,user:<user_email>}}"
  to = montecarlo_iam_member.default
}

When using the terraform import command, Member assignment can be imported using one of the formats above. For example:

$ terraform import montecarlo_iam_member.default {{groups/<group_name>,user:<user_email>}}

@ndopj ndopj self-assigned this Nov 1, 2023
@ndopj ndopj linked an issue Nov 1, 2023 that may be closed by this pull request
4 tasks
@ndopj ndopj added this to the 0.3.0 milestone Nov 1, 2023
@ndopj ndopj added the documentation Improvements or additions to documentation label Nov 1, 2023
@ndopj ndopj force-pushed the ndopj/data-intel-data-platform-streaming branch from 8f7eea2 to 229bb13 Compare November 1, 2023 16:37
@ndopj ndopj merged commit d9d70ed into master Nov 1, 2023
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: montecarlo_iam_member resource documentation
1 participant