import * as core from "@terrascript/core"; export interface NetworkAclRuleArgs extends core.ResourceArgs { /** * (Optional) The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ). */ cidrBlock?: string | core.StringOut; /** * (Optional, bool) Indicates whether this is an egress rule (rule is applied to traffic leaving the su * bnet). Default `false`. */ egress?: boolean | core.BooleanOut; /** * (Optional) The from port to match. */ fromPort?: number | core.NumberOut; /** * (Optional) ICMP protocol: The ICMP code. Required if specifying ICMP for the protocolE.g., -1 */ icmpCode?: number | core.NumberOut; /** * (Optional) ICMP protocol: The ICMP type. Required if specifying ICMP for the protocolE.g., -1 */ icmpType?: number | core.NumberOut; /** * (Optional) The IPv6 CIDR block to allow or deny. */ ipv6CidrBlock?: string | core.StringOut; /** * (Required) The ID of the network ACL. */ networkAclId: string | core.StringOut; /** * (Required) The protocol. A value of -1 means all protocols. */ protocol: string | core.StringOut; /** * (Required) Indicates whether to allow or deny the traffic that matches the rule. Accepted values: `a * llow` | `deny` */ ruleAction: string | core.StringOut; /** * (Required) The rule number for the entry (for example, 100). ACL entries are processed in ascending * order by rule number. */ ruleNumber: number | core.NumberOut; /** * (Optional) The to port to match. */ toPort?: number | core.NumberOut; } export class NetworkAclRule extends core.Resource { /** * (Optional) The network range to allow or deny, in CIDR notation (for example 172.16.0.0/24 ). */ @core.attr(String) public cidrBlock?: string | core.StringOut; /** * (Optional, bool) Indicates whether this is an egress rule (rule is applied to traffic leaving the su * bnet). Default `false`. */ @core.attr(Boolean) public egress?: boolean | core.BooleanOut; /** * (Optional) The from port to match. */ @core.attr(Number) public fromPort?: number | core.NumberOut; /** * (Optional) ICMP protocol: The ICMP code. Required if specifying ICMP for the protocolE.g., -1 */ @core.attr(Number) public icmpCode?: number | core.NumberOut; /** * (Optional) ICMP protocol: The ICMP type. Required if specifying ICMP for the protocolE.g., -1 */ @core.attr(Number) public icmpType?: number | core.NumberOut; /** * The ID of the network ACL Rule */ @core.attr(String, { computed: true }) public id!: string | core.StringOut; /** * (Optional) The IPv6 CIDR block to allow or deny. */ @core.attr(String) public ipv6CidrBlock?: string | core.StringOut; /** * (Required) The ID of the network ACL. */ @core.attr(String) public networkAclId!: string | core.StringOut; /** * (Required) The protocol. A value of -1 means all protocols. */ @core.attr(String) public protocol!: string | core.StringOut; /** * (Required) Indicates whether to allow or deny the traffic that matches the rule. Accepted values: `a * llow` | `deny` */ @core.attr(String) public ruleAction!: string | core.StringOut; /** * (Required) The rule number for the entry (for example, 100). ACL entries are processed in ascending * order by rule number. */ @core.attr(Number) public ruleNumber!: number | core.NumberOut; /** * (Optional) The to port to match. */ @core.attr(Number) public toPort?: number | core.NumberOut; constructor(name: string, args?: NetworkAclRuleArgs) { super(name, "aws_network_acl_rule", args); } public override getNamespace(): string { return "aws_vpc"; } }