Data Source: awsVpcSecurityGroupRule
awsVpcSecurityGroupRule
provides details about a specific security group rule.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dataAwsVpcSecurityGroupRule.DataAwsVpcSecurityGroupRule(
this,
"example",
{
securityGroupRuleId: "${var.security_group_rule_id}",
}
);
Argument Reference
The arguments of this data source act as filters for querying the available security group rules. The given filters must match exactly one security group rule whose data will be exported as attributes.
securityGroupRuleId
- (Optional) ID of the security group rule to select.filter
- (Optional) Configuration block(s) for filtering. Detailed below.
filter Configuration Block
The following arguments are supported by the filter
configuration block:
name
- (Required) Name of the filter field. Valid values can be found in the EC2describeSecurityGroupRules
API Reference.values
- (Required) Set of values that are accepted for the given filter field. Results will be selected if any given value matches.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
arn
- The Amazon Resource Name (ARN) of the security group rule.cidrIpv4
- The destination IPv4 CIDR range.cidrIpv6
- The destination IPv6 CIDR range.description
- The security group rule description.fromPort
- The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type.isEgress
- Indicates whether the security group rule is an outbound rule.ipProtocol
- The IP protocol name or number. Use1
to specify all protocols.prefixListId
- The ID of the destination prefix list.referencedSecurityGroupId
- The destination security group that is referenced in the rule.securityGroupId
- The ID of the security group.tags
- A map of tags assigned to the resource.toPort
- (Optional) The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.