Describe the bug
NetworkAcl L2 construct has networkAclName property.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.NetworkAcl.html
This is only assigned to physicalName here.
|
super(scope, id, { |
|
physicalName: props.networkAclName, |
|
}); |
However, we can't define physical name for AWS::EC2::NetworkAcl resource. The physical name for Network ACL is always automatically generated id.
So, currently networkAclName property is meaningless property. This issue is similar to #26370.
Expected Behavior
In VPC console, a tag value for Name key is shown in Name column as below.

So, NetworkAcl L2 construct should add Name tag like Vpc or FlowLog L2 construct.
|
Tags.of(this).add(NAME_TAG, props.vpcName || this.node.path); |
|
Tags.of(this).add(NAME_TAG, props.flowLogName || this.node.path); |
Current Behavior
The value of networkAclName property is never referred in generated CloudFormation template.
Reproduction Steps
We can reproduce it with the following snippet.
const vpc = ec2.Vpc.fromLookup(this, 'Vpc', {
isDefault: true,
});
new ec2.NetworkAcl(stack, 'MyNetworkAcl', {
vpc: vpc,
networkAclName: 'CustomNetworkAclName',
});
Possible Solution
Adding Name tag with the value of networkAclName property.
Additional Information/Context
No response
CDK CLI Version
v2.93.0
Framework Version
No response
Node.js Version
v18.17.1
OS
Amazon Linux 2
Language
Typescript
Language Version
No response
Other information
No response
Describe the bug
NetworkAcl L2 construct has networkAclName property.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.NetworkAcl.html
This is only assigned to physicalName here.
aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/network-acl.ts
Lines 115 to 117 in 724bd01
However, we can't define physical name for
AWS::EC2::NetworkAclresource. The physical name for Network ACL is always automatically generated id.So, currently networkAclName property is meaningless property. This issue is similar to #26370.
Expected Behavior
In VPC console, a tag value for Name key is shown in Name column as below.

So, NetworkAcl L2 construct should add Name tag like Vpc or FlowLog L2 construct.
aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts
Line 1457 in 724bd01
aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/vpc-flow-logs.ts
Line 736 in 724bd01
Current Behavior
The value of networkAclName property is never referred in generated CloudFormation template.
Reproduction Steps
We can reproduce it with the following snippet.
Possible Solution
Adding Name tag with the value of networkAclName property.
Additional Information/Context
No response
CDK CLI Version
v2.93.0
Framework Version
No response
Node.js Version
v18.17.1
OS
Amazon Linux 2
Language
Typescript
Language Version
No response
Other information
No response