But if I go with the same SDK client and use get_policy to retrieve the IAM policy, both description and flags values are available.
Looking at the implementation of awspec, this seems to be related to the use of list_policies within the related finder instead of get_policy. Here is an sample from a pry session:
In both cases, when testing description and tags, the data is not available even though both resources do have such attributes with defined values.
Here is an example:
The
description
validation will fail.By just printing the
subject
withputs
, I got this:But if I go with the same SDK client and use
get_policy
to retrieve the IAM policy, bothdescription
andflags
values are available.Looking at the implementation of awspec, this seems to be related to the use of
list_policies
within the related finder instead ofget_policy
. Here is an sample from apry
session:The example same thing happens with
iam_role
.