https://pulumi.com logo
#aws
Title
# aws
b

breezy-kangaroo-6997

01/17/2024, 2:49 PM
how you can add rule to existing security group that is already created by another pulumi project ?
l

little-cartoon-10569

01/17/2024, 8:32 PM
You only need a security group ID to do that, so export the ID from one project and import to the other as a StackReference.
It's not bad practice per se, but I'd strongly recommend adding a comment to the code that creates the group, listing all the projects that use that ID. If the group needs to be recreated (e.g. a name change), you'll need to remove all the rules in all the other projects first, to allow that to happen. Very awkward.
b

breezy-kangaroo-6997

01/18/2024, 9:00 AM
thank you a lot @little-cartoon-10569 🙂