This resource can be used to get a set of license ARNs matching a filter.
The following shows getting all license ARNs issued from the AWS marketplace. Providing no filter, would provide all license ARNs for the entire account.
data "aws_licensemanager_received_licenses" "test" {
filter {
name = "IssuerName"
values = [
"AWS/Marketplace"
]
}
}
filter
- (Optional) Custom filter block as described below.More complex filters can be expressed using one or more filter
sub-blocks,
which take the following arguments:
name
- (Required) Name of the field to filter by, as defined by
the underlying AWS API.
For example, if filtering using ProductSKU
, use:data "aws_licensemanager_received_licenses" "selected" {
filter {
name = "ProductSKU"
values = [""] # insert values here
}
}
values
- (Required) Set of values that are accepted for the given field.This data source exports the following attributes in addition to the arguments above:
arns
- List of all the license ARNs found.