|
| 1 | +--- |
| 2 | +# generated by https://github.com/hashicorp/terraform-plugin-docs |
| 3 | +page_title: "marmot_asset_iam_binding Resource - marmot" |
| 4 | +subcategory: "" |
| 5 | +description: |- |
| 6 | + Authoritative for one role on an asset. Other roles are left alone, but any member of this role not in the configuration is removed. |
| 7 | + Grants are additive and there are no denies, so a member also holding the permission over the whole catalog keeps it here. Restricting a principal means giving it a role that does not carry the permission at the organization level, then granting it on specific resources. |
| 8 | +--- |
| 9 | + |
| 10 | +# marmot_asset_iam_binding (Resource) |
| 11 | + |
| 12 | +Authoritative for one role on an asset. Other roles are left alone, but any member of this role not in the configuration is removed. |
| 13 | + |
| 14 | +Grants are additive and there are no denies, so a member also holding the permission over the whole catalog keeps it here. Restricting a principal means giving it a role that does not carry the permission at the organization level, then granting it on specific resources. |
| 15 | + |
| 16 | +## Example Usage |
| 17 | + |
| 18 | +```terraform |
| 19 | +# Own one role on the asset. Members not listed here are removed from that role, |
| 20 | +# while other roles on the same asset are left alone. |
| 21 | +resource "marmot_asset_iam_binding" "orders_readers" { |
| 22 | + asset_id = marmot_asset.orders.id |
| 23 | + role = "catalog-reader" |
| 24 | + members = [ |
| 25 | + "serviceAccount:${marmot_service_account.etl.id}", |
| 26 | + "group:${marmot_team.analysts.id}", |
| 27 | + ] |
| 28 | +} |
| 29 | +``` |
| 30 | + |
| 31 | +<!-- schema generated by tfplugindocs --> |
| 32 | +## Schema |
| 33 | + |
| 34 | +### Required |
| 35 | + |
| 36 | +- `asset_id` (String) ID of the resource the grant applies to. |
| 37 | +- `members` (Set of String) Members holding the role: `user:{id}`, `group:{team id}`, `serviceAccount:{id}`, or `allAuthenticated`. |
| 38 | +- `role` (String) Marmot role name, for example `viewer`. A `roles/` prefix is accepted. |
| 39 | + |
| 40 | +### Read-Only |
| 41 | + |
| 42 | +- `etag` (String) Version of the policy as last read. Used to detect a concurrent change. |
| 43 | +- `id` (String) Terraform identifier for this grant. |
| 44 | + |
| 45 | +## Import |
| 46 | + |
| 47 | +Import is supported using the following syntax: |
| 48 | + |
| 49 | +The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example: |
| 50 | + |
| 51 | +```shell |
| 52 | +terraform import marmot_asset_iam_binding.orders_readers \ |
| 53 | + "asset/1f0c6e9a-1f2b-4a1e-9b1a-2c3d4e5f6a7b/roles/catalog-reader" |
| 54 | +``` |
0 commit comments