src/nacl.js
function buildNetworkAclEntry(
  name,
  CidrBlock,
  { Egress = false, Protocol = -1, RuleAction = 'allow', RuleNumber = 100 } = {},
) {
  const direction = Egress ? 'Egress' : 'Ingress';
  const cfName = `${name}${direction}${RuleNumber}`;
  return {
    [cfName]: {
      Type: 'AWS::EC2::NetworkAclEntry',
      Properties: {
        CidrBlock,
        NetworkAclId: {
          Ref: name,
        },
        Egress,
        Protocol,
        RuleAction,
        RuleNumber,
      },
    },
  };
}
function buildNetworkAclEntry(
  name,
  CidrBlock,
  { Egress = false, Protocol = -1, RuleAction = 'allow', RuleNumber = 100 } = {},
) {
  const direction = Egress ? 'Egress' : 'Ingress';
  const cfName = `${name}${direction}${RuleNumber}`;
  return {
    [cfName]: {
      Type: 'AWS::EC2::NetworkAclEntry',
      Properties: {
        CidrBlock,
        NetworkAclId: {
          Ref: name,
        },
        Egress,
        Protocol,
        RuleAction,
        RuleNumber,
      },
    },
  };
}
function buildNetworkAclEntry ( name , CidrBlock , { Egress = false , Protocol = - 1 , RuleAction = 'allow' , RuleNumber = 100 } = { } , ) { const direction = Egress ? 'Egress' : 'Ingress' ; const cfName = ` ${ name } ${ direction } ${ RuleNumber } ` ; return { [ cfName ] : { Type : 'AWS::EC2::NetworkAclEntry' , Properties : { CidrBlock , NetworkAclId : { Ref : name , } , Egress , Protocol , RuleAction , RuleNumber , } , } , } ; }
Build a Network ACL entry

@param {String} name
@param {String} CidrBlock
@param {Object} params
@return {Object}
Build a Network ACL entry