As per the description in #12, having an aws_ami data resource that does not return a single result causes the runs to fail. This gets around that by consolidating two (i.e. commercial and community) aws_ami resources into a single resource and parameterizing the owner and name filters as appropriate based on the use_community variable.
Note that this dropped the block-device-mapping.volume-type filter as the other filter criteria resulted in a single AMI for commercial images without that filter.
As per the description in #12, having an
aws_ami
data resource that does not return a single result causes the runs to fail. This gets around that by consolidating two (i.e.commercial
andcommunity
)aws_ami
resources into a single resource and parameterizing theowner
andname
filters as appropriate based on theuse_community
variable.Note that this dropped the
block-device-mapping.volume-type
filter as the other filter criteria resulted in a single AMI for commercial images without that filter.