Validate that if it already exists, skip the creation from scratch and execute the code?

Thanks for this recommendation. This will work for my issue? I’m having a error message that says the resource already exists and I need to avoid this message. In my case it’s a VPC in a sandbox project, I re-use the and the VPC is created only one time.

I don’t understand well when you use the foo_bar and the condition after the equal. Can you explain more in details this?