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-ec2: Missing CfnKeyPair #26306

Closed
SeanStockwell opened this issue Jul 10, 2023 · 2 comments
Closed

aws-ec2: Missing CfnKeyPair #26306

SeanStockwell opened this issue Jul 10, 2023 · 2 comments
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.

Comments

@SeanStockwell
Copy link

Describe the bug

I am trying to make use of aws-cdk-lib/aws-ec2 CfnKeyPair, documented here… but I consistently get a “no exported member named ‘CfnKeyPair’” error, and looking at the source code from the latest release, it doesn’t seem to exist there. Am I missing something?

Expected Behavior

I expected to be able to make use of the CfnKeyPair construct to create EC2 Key Pairs

Current Behavior

I get an error stating "no exported member named CfnKeyPair"

Reproduction Steps

import {CfnKeyPair} from 'aws-cdk-lib/aws-ec2'

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

Framework Version

No response

Node.js Version

18.x

OS

Linux

Language

Typescript

Language Version

~4.7.4

Other information

No response

@SeanStockwell SeanStockwell added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Jul 10, 2023
@github-actions github-actions bot added the @aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud label Jul 10, 2023
@peterwoodworth
Copy link
Contributor

The CloudFormation resources are autogenerated, so they won't appear in the source code.

And I'm not seeing any error, this works for me. Try reinstalling your packages

    new ec2.CfnKeyPair(this, 'adsfasd', {
      keyName: 'adsfasd',
    })

@peterwoodworth peterwoodworth added response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days. and removed needs-triage This issue or PR still needs to be triaged. labels Jul 10, 2023
@github-actions
Copy link

This issue has not received a response in a while. If you want to keep this issue open, please leave a comment below and auto-close will be canceled.

@github-actions github-actions bot added closing-soon This issue will automatically close in 4 days unless further comments are made. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. and removed closing-soon This issue will automatically close in 4 days unless further comments are made. labels Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@aws-cdk/aws-ec2 Related to Amazon Elastic Compute Cloud bug This issue is a bug. closed-for-staleness This issue was automatically closed because it hadn't received any attention in a while. response-requested Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Projects
None yet
Development

No branches or pull requests

2 participants