ec2: networkAclName property in NetworkAcl construct does not work #26897
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
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::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.
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
The text was updated successfully, but these errors were encountered: