ec2: flowLogName property in FlowLog construct does not work #26370
Labels
@aws-cdk/aws-ec2
Related to Amazon Elastic Compute Cloud
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
Describe the bug
FlowLog L2 construct has flowLogName property.
https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_ec2.FlowLog.html
This is only assigned to physicalName here.
aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/vpc-flow-logs.ts
Lines 722 to 724 in 9fca790
However, we can't define physical name for
AWS::EC2::FlowLog
resource. The pysical name for VPC Flow Logs is always automatically generated id.So, currently flowLogName property is meaningless property.
Expected Behavior
In VPC console, a tag value for Name key is shown in Name column as below.
So, FlowLog L2 construct should add Name tag like VPC or Instance L2 construct.
aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/vpc.ts
Line 1450 in 9fca790
aws-cdk/packages/aws-cdk-lib/aws-ec2/lib/instance.ts
Line 362 in 9fca790
Current Behavior
The value of flowLogName 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 flowLogName property.
Additional Information/Context
No response
CDK CLI Version
v2.87.0
Framework Version
No response
Node.js Version
v18.16.0
OS
Amazon Linux 2
Language
Typescript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: