|
| 1 | +--- |
| 2 | +page_title: "Linode: linode_consumer_image_share_group_image_shares" |
| 3 | +description: |- |
| 4 | + Lists Images shared in the Image Share Group the provided Token has been accepted into. |
| 5 | +--- |
| 6 | + |
| 7 | +# Data Source: linode\_consumer\_image\_share\_group\_image\_shares |
| 8 | + |
| 9 | +Provides information about a list of Images that match a set of filters that have been |
| 10 | +shared in the Image Share Group that the provided Token has been accepted into. |
| 11 | +For more information, see the [Linode APIv4 docs](https://techdocs.akamai.com/linode-api/reference/get-sharegroup-images-by-token). May not be currently available to all users even under v4beta. |
| 12 | + |
| 13 | +## Example Usage |
| 14 | + |
| 15 | +The following example shows how one might use this data source to list Images shared in an Image Share Group. |
| 16 | + |
| 17 | +```hcl |
| 18 | +data "linode_consumer_image_share_group_image_shares" "all" {} |
| 19 | +
|
| 20 | +data "linode_consumer_image_share_group_image_shares" "filtered" { |
| 21 | + token_uuid = "54e1adf3-e499-4685-82be-10d29d4e8fae" |
| 22 | + filter { |
| 23 | + name = "label" |
| 24 | + values = ["my-label"] |
| 25 | + } |
| 26 | +} |
| 27 | +
|
| 28 | +output "all-shared-images" { |
| 29 | + value = data.linode_consumer_image_share_group_image_shares.all.image_shares |
| 30 | +} |
| 31 | +
|
| 32 | +output "filtered-shared-images" { |
| 33 | + value = data.linode_consumer_image_share_group_image_shares.filtered.image_shares |
| 34 | +} |
| 35 | +``` |
| 36 | + |
| 37 | +## Argument Reference |
| 38 | + |
| 39 | +The following arguments are supported: |
| 40 | + |
| 41 | +* `token_uuid` - (Required) The UUID of the Token that has been accepted into the Image Share Group to list shared Images from. |
| 42 | + |
| 43 | +* [`filter`](#filter) - (Optional) A set of filters used to select Image Share Groups that meet certain requirements. |
| 44 | + |
| 45 | +### Filter |
| 46 | + |
| 47 | +* `name` - (Required) The name of the field to filter by. See the [Filterable Fields section](#filterable-fields) for a complete list of filterable fields. |
| 48 | + |
| 49 | +* `values` - (Required) A list of values for the filter to allow. These values should all be in string form. |
| 50 | + |
| 51 | +* `match_by` - (Optional) The method to match the field by. (`exact`, `regex`, `substring`; default `exact`) |
| 52 | + |
| 53 | +## Attributes Reference |
| 54 | + |
| 55 | +Each Image Share will be stored in the `images_shares` attribute and will export the following attributes: |
| 56 | + |
| 57 | +* `id` - The unique ID assigned to this Image Share. |
| 58 | + |
| 59 | +* `label` - The label of the Image Share. |
| 60 | + |
| 61 | +* `capabilities` - The capabilities of the Image represented by the Image Share. |
| 62 | + |
| 63 | +* `created` - When this Image Share was created. |
| 64 | + |
| 65 | +* `deprecated` - Whether this Image is deprecated. |
| 66 | + |
| 67 | +* `description` - A description of the Image Share. |
| 68 | + |
| 69 | +* `is_public` - True if the Image is public. |
| 70 | + |
| 71 | +* `image_sharing` - Details about image sharing, including who the image is shared with and by. |
| 72 | + * `shared_with` - Details about who the image is shared with. |
| 73 | + * `sharegroup_count` - The number of sharegroups the private image is present in. |
| 74 | + * `sharegroup_list_url` - The GET api url to view the sharegroups in which the image is shared. |
| 75 | + * `shared_by` - Details about who the image is shared by. |
| 76 | + * `sharegroup_id` - The sharegroup_id from the im_ImageShare row. |
| 77 | + * `sharegroup_uuid` - The sharegroup_uuid from the im_ImageShare row. |
| 78 | + * `sharegroup_label` - The label from the associated im_ImageShareGroup row. |
| 79 | + * `source_image_id` - The image id of the base image (will only be shown to producers, will be null for consumers). |
| 80 | + |
| 81 | +* `size` - The minimum size this Image needs to deploy. Size is in MB. example: 2500 |
| 82 | + |
| 83 | +* `status` - The current status of this image. (`creating`, `pending_upload`, `available`) |
| 84 | + |
| 85 | +* `type` - How the Image was created. Manual Images can be created at any time. "Automatic" Images are created automatically from a deleted Linode. (`manual`, `automatic`) |
| 86 | + |
| 87 | +* `tags` - A list of customized tags. |
| 88 | + |
| 89 | +* `total_size` - The total size of the image in all available regions. |
| 90 | + |
| 91 | +## Filterable Fields |
| 92 | + |
| 93 | +* `id` |
| 94 | + |
| 95 | +* `label` |
0 commit comments