aws_transit_gateway_multicast_group_members Resource
Use the aws_transit_gateway_multicast_group_members
Chef InSpec audit resource to test properties of multiple AWS EC2 transit gateway multicast group members.
The AWS::EC2::TransitGatewayMulticastGroupMember
resource registers members (network interfaces) with the transit gateway multicast group.
For additional information, including details on parameters and properties, see the AWS documentation on AWS EC2 TransitGatewayMulticastGroupMember.
Install
This resource is available in the Chef InSpec AWS resource pack.
For information on configuring your AWS environment for Chef InSpec and creating an InSpec profile that uses the InSpec AWS resource pack, see the Chef InSpec documentation on the AWS cloud platform.
Syntax
Ensure that transit gateway multicast group member exists.
describe aws_transit_gateway_multicast_group_members(transit_gateway_multicast_domain_id: "TRANSIT_GATEWAY_MULTICAST_DOMAIN_ID") do
it { should exist }
end
Parameters
transit_gateway_multicast_domain_id
(required)The ID of the transit gateway multicast domain.
Properties
group_ip_addresses
- The IP address of the transit gateway multicast group.
Field:
group_ip_address
transit_gateway_attachment_ids
- The attachment id of the transit gateway.
Field:
transit_gateway_attachment_id
subnet_ids
- The ID of the subnet.
Field:
subnet_id
resource_ids
- The ID of the resource.
Field:
resource_id
resource_types
- The type of the resource.
Field:
resource_type
resource_owner_ids
- The Owner ID of the resource.
Field:
resource_owner_id
network_interface_ids
- The network interface ID of the resource.
Field:
network_interface_id
group_members
- The resource is a group member. Valid values are
true
andfalse
. Field:
group_member
group_sources
- The resource is a group source. Valid values are
true
andfalse
. Field:
group_source
member_types
- The member type. Valid values are
igmp
andstatic
. Field:
member_type
source_types
- The source type. Valid values are
igmp
andstatic
. Field:
source_type
Examples
Ensure a transit gateway attachment ID is available.
describe aws_transit_gateway_multicast_group_members(transit_gateway_multicast_domain_id: "TRANSIT_GATEWAY_MULTICAST_DOMAIN_ID") do
its('transit_gateway_attachment_ids') { should include 'TRANSIT_GATEWAY_ATTACHMENT_ID' }
end
Ensure that the group members are available.
describe aws_transit_gateway_multicast_group_members(transit_gateway_multicast_domain_id: "TRANSIT_GATEWAY_MULTICAST_DOMAIN_ID") do
its('group_members') { should include true }
end
Matchers
For a full list of available matchers, see our Universal Matchers page.The controls will pass if the search
method returns at least one result.
exist
Use should
to test that the entity exists.
describe aws_transit_gateway_multicast_group_members(transit_gateway_multicast_domain_id: "TRANSIT_GATEWAY_MULTICAST_DOMAIN_ID") do
it { should exist }
end
Use should_not
to test the entity does not exist.
describe aws_transit_gateway_multicast_group_members(transit_gateway_multicast_domain_id: "TRANSIT_GATEWAY_MULTICAST_DOMAIN_ID") do
it { should_not exist }
end
be_available
Use should
to check if the entity is available.
describe aws_transit_gateway_multicast_group_members(transit_gateway_multicast_domain_id: "TRANSIT_GATEWAY_MULTICAST_DOMAIN_ID") do
it { should be_available }
end
AWS Permissions
Your Principal will need the EC2:Client:SearchTransitGatewayMulticastGroupsResult
action with Effect
set to Allow
.