Skip to content

Include SecurityGroupRules when importing AWS SecurityGroups #1387

Open

Description

I have a complex security group that I want to import into pulumi, but when I run something like the example:

pulumi import aws:ec2/securityGroup:SecurityGroup elb_sg sg-903004f8

... it just gives me a blank security group, not all the rules defined in it. The docs for importing SecurityGroupRules suggest doing this one by one, but given each row doesn't have an ARN the ids to construct for importing are... convoluted. The suggestion from Customer Support via Slack was that I write my own parser for aws ec2 describe-security-groups to transform the JSON into a format pulumi import would understand which is not exactly helpful.

Affected feature

Improve pulumi import such that when I do:

pulumi import aws:ec2/securityGroup:SecurityGroup elb_sg sg-903004f8

... it not only spits imports & spits out the code for the group, it should do so for each rule within the group too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    area/importAn issue related to `pulumi import` or the import resource option.impact/usabilitySomething that impacts users' ability to use the product easily and intuitivelykind/enhancementImprovements or new features

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions