|
| 1 | +--- |
| 2 | +page_title: "montecarlo_iam_group Resource - terraform-provider-montecarlo" |
| 3 | +subcategory: "" |
| 4 | +description: |- |
| 5 | + A named resource which lets you define Monte Carlo authorization group responsible for assigning roles to the users. |
| 6 | +--- |
| 7 | + |
| 8 | +# montecarlo_iam_group (Resource) |
| 9 | + |
| 10 | +Represents a named resource which lets you define _Monte Carlo_ **authorization group** responsible for assigning roles to the users. An authorization group policy is made up of three primary parts: |
| 11 | + |
| 12 | +- a list of permissions |
| 13 | +- a list of group members (not set by this resource) |
| 14 | +- optionally, one or more Monte Carlo domains to restrict the group to |
| 15 | + |
| 16 | +The list of permissions/roles specifies **what can be done** (such as access or edit monitors), and the domain restrictions specify what parts of your data/metadata those users **may access under given permissions**. |
| 17 | + |
| 18 | +To get more information about _Monte Carlo_ **authorization groups**, see: |
| 19 | +- [API documentation](https://apidocs.getmontecarlo.com/#definition-AuthorizationGroupOutput) |
| 20 | +- How-to Guides |
| 21 | + - [Authorization](https://docs.getmontecarlo.com/docs/authorization) |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | +## Example Usage |
| 26 | + |
| 27 | +```terraform |
| 28 | +resource "montecarlo_iam_group" "example" { |
| 29 | + name = "name" |
| 30 | + description = "description" |
| 31 | + role = "mcd/viewer" |
| 32 | + domains = ["domainUUID"] # restricting to selected domains |
| 33 | + sso_group = "sso_group" # automatical mapping to SSO group |
| 34 | +} |
| 35 | +``` |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | +<!-- schema generated by tfplugindocs --> |
| 40 | +## Schema |
| 41 | + |
| 42 | +### Required |
| 43 | + |
| 44 | +<a id="attr--name"></a> |
| 45 | +- `name` (String) ID of the authorization group. Must be unique per _Monte Carlo_ account. Authorization group **name within the UI** is not value of this attribute, instead `label` is used ([see bellow](#attr--label)). |
| 46 | + |
| 47 | +- `role` (String) Used to define the specific role or permissions that are assigned to the _Monte Carlo_ authorization group. |
| 48 | +Allowed roles: |
| 49 | + |
| 50 | + - **mcd/owner** |
| 51 | + - **mcd/domains-manager** |
| 52 | + - **mcd/responder** |
| 53 | + - **mcd/editor** |
| 54 | + - **mcd/viewer** |
| 55 | + - **mcd/asset-viewer** |
| 56 | + - **mcd/asset-editor** |
| 57 | + |
| 58 | +### Optional |
| 59 | + |
| 60 | +- `description` (String, _default:_ `""`) Description of the authorization group. Usually can be used to document for what the authorization group is responsible for. |
| 61 | + |
| 62 | +- `domains` (Set of Strings, _default:_ `[]`) Set of **domain UUIDs** that this authorization group should be restricted to. By default, if this attribute is not set, the authorization group permissions will be applied globally. |
| 63 | + |
| 64 | +- `sso_group` (String, _default:_ `null`) Automatically assignes all of the users from the provided **SSO group** to the authorization group. |
| 65 | + |
| 66 | + - if set, users cannot be assigned to the authorization group directly |
| 67 | + |
| 68 | + - if set, when authorization group already exists, all of the previous user assignments will be destroyed. |
| 69 | + |
| 70 | +### Read-Only |
| 71 | + |
| 72 | +<a id="attr--label"></a> |
| 73 | +- `label` (String) Authorization group **label/name** as it should be presented in the _Monte Carlo_ UI. Implementation of this resource will always set this attribute to the same value as the `name` attribute ([see above](#attr--name)) to avoid confusion. |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +## Import |
| 78 | + |
| 79 | +This resource can be imported using the import ID with following format: |
| 80 | + |
| 81 | +* `{{group_name}}` |
| 82 | + |
| 83 | +In **Terraform v1.5.0** and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import a _Transactional Warehouse_ using one of the formats above. For example: |
| 84 | + |
| 85 | +```terraform |
| 86 | +import { |
| 87 | + id = "{{group_name}}" |
| 88 | + to = montecarlo_iam_group.default |
| 89 | +} |
| 90 | +``` |
| 91 | + |
| 92 | +When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), _Authorization Group_ can be imported using one of the formats above. For example: |
| 93 | + |
| 94 | +``` |
| 95 | +$ terraform import montecarlo_iam_group.default {{group_name}} |
| 96 | +``` |
0 commit comments