you cannot do this with Pulumi, it’s an imperative action. you need to just define the security group and let pulumi create it, not do conditional logic
p
prehistoric-book-85014
08/25/2022, 9:48 AM
@billowy-army-68599
But what if I need to make a condition? for example before creating an EKS cluster I need to validate if it exists
Just like VPC for example... How do I check if the VPC with the name "XPTO" exists?
a
ambitious-father-68746
08/25/2022, 10:42 AM
If you really want to do this the best way is to make a call to boto3 directly.
But I agree with jaxxstorm, it's not a regular pattern, you should just let Pulumi do it's job in a declarative way.