-
Notifications
You must be signed in to change notification settings - Fork 4.5k
(AWS Config): EC2_INTERNET_GATEWAY maps to the wrong Resource Type #16463
Copy link
Copy link
Closed
Labels
@aws-cdk/aws-configRelated to AWS ConfigRelated to AWS ConfigbugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.
Description
EC2_INTERNET_GATEWAY maps to the wrong Resource Type
Reproduction Steps
This bug can be replicated by below snippet:
new config.ManagedRule(this, "myRule", {
identifier: config.ManagedRuleIdentifiers.INTERNET_GATEWAY_AUTHORIZED_VPC_ONLY,
ruleScope: config.RuleScope.fromResource(config.ResourceType.EC2_INTERNET_GATEWAY),
})
Synthesized template looked like:
Resources:
myRule463F9234:
Type: AWS::Config::ConfigRule
Properties:
Source:
Owner: AWS
SourceIdentifier: INTERNET_GATEWAY_AUTHORIZED_VPC_ONLY
Scope:
ComplianceResourceTypes:
- AWS::EC2::CustomerGateway
What did you expect to happen?
ComplianceResourceTypes in synthesized template should be AWS::EC2::InternetGateway rather than AWS::EC2::CustomerGateway
What actually happened?
aws-cdk/packages/@aws-cdk/aws-config/lib/rule.ts
Line 1358 in ae09c16
| public static readonly EC2_INTERNET_GATEWAY = new ResourceType('AWS::EC2::CustomerGateway'); |
Which should be mapped to AWS::EC2::InternetGateway
Environment
- CDK CLI Version :
- Framework Version:
- Node.js Version:
- OS :
- Language (Version):
Other
This is 🐛 Bug Report
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
@aws-cdk/aws-configRelated to AWS ConfigRelated to AWS ConfigbugThis issue is a bug.This issue is a bug.needs-triageThis issue or PR still needs to be triaged.This issue or PR still needs to be triaged.