Data Source: aws_licensemanager_grants

This resource can be used to get a set of license grant ARNs matching a filter.

Example Usage

The following shows getting all license grant ARNs granted to your account.

data "aws_caller_identity" "current" {}

data "aws_licensemanager_grants" "test" {
  filter {
    name = "GranteePrincipalARN"
    values = [
      "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root"
    ]
  }
}

Argument Reference

More complex filters can be expressed using one or more filter sub-blocks, which take the following arguments:

data "aws_licensemanager_grants" "selected" {
  filter {
    name   = "ProductSKU"
    values = [""] # insert values here
  }
}

Attribute Reference

This data source exports the following attributes in addition to the arguments above: