https://pulumi.com logo
Title
d

dry-answer-66872

02/17/2022, 9:00 AM
Is there a way we can add/remove ingress/egress of the existing security group in AWS?
f

few-pillow-1133

02/17/2022, 9:15 AM
First import the security group, so it can be managed by Pulumi .. e.g
pulumi import aws:ec2/securityGroup:SecurityGroup <name> <nsg_id>
You can then add rules as desired like so
d

dry-answer-66872

02/17/2022, 9:21 AM
how do I import it in
___main__._py ?
It's a series of tasks and one of the tasks need an outbound to be added to an existing SG, so wondering what needs to be done to achieve this
@few-pillow-1133
f

few-pillow-1133

02/17/2022, 9:36 AM
you import on your local machine, and that would import into your state and then provide you with a yaml template you can add to your stack file
d

dry-answer-66872

02/17/2022, 9:44 AM
thank you @few-pillow-1133 let me try this