Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(AWS Config): EC2_INTERNET_GATEWAY maps to the wrong Resource Type #16463

Closed
Pandafriendd opened this issue Sep 11, 2021 · 1 comment · Fixed by #16464
Closed

(AWS Config): EC2_INTERNET_GATEWAY maps to the wrong Resource Type #16463

Pandafriendd opened this issue Sep 11, 2021 · 1 comment · Fixed by #16464
Assignees
Labels
@aws-cdk/aws-config Related to AWS Config bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.

Comments

@Pandafriendd
Copy link
Contributor

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?

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

@Pandafriendd Pandafriendd added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Sep 11, 2021
@github-actions github-actions bot added the @aws-cdk/aws-config Related to AWS Config label Sep 11, 2021
@mergify mergify bot closed this as completed in #16464 Sep 14, 2021
mergify bot pushed a commit that referenced this issue Sep 14, 2021
fixes: #16463 

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-config Related to AWS Config bug This issue is a bug. needs-triage This issue or PR still needs to be triaged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants