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

[Enhancement]: AWS_KEY_PAIR include public key during importing #32502

Open
widgetpl opened this issue Jul 13, 2023 · 1 comment
Open

[Enhancement]: AWS_KEY_PAIR include public key during importing #32502

widgetpl opened this issue Jul 13, 2023 · 1 comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@widgetpl
Copy link

Description

There is an issue while importing ec2 key pair that imports doesn't include public key. When I was looking for solution I found this issue where people mentioned lack of possibility to get public part through AWS API. I have found in AWS docs there is a way to get it:
aws ec2 describe-key-pairs --key-names key-pair-name --include-public-key
or with boto3

response = client.describe_key_pairs(
    Filters=[
        {
            'Name': 'string',
            'Values': [
                'string',
            ]
        },
    ],
    KeyNames=[
        'string',
    ],
    KeyPairIds=[
        'string',
    ],
    DryRun=True|False,
    IncludePublicKey=True|False   <==========
)

Affected Resource(s) and/or Data Source(s)

aws_key_pair

Potential Terraform Configuration

N/A

References

#1092
https://docs.aws.amazon.com/cli/latest/reference/ec2/describe-key-pairs.html
https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/ec2/client/describe_key_pairs.html#

Would you like to implement a fix?

No

@widgetpl widgetpl added enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Jul 13, 2023
@github-actions
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@justinretzolk justinretzolk added service/ec2 Issues and PRs that pertain to the ec2 service. and removed needs-triage Waiting for first response or review from a maintainer. labels Jul 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

2 participants