You could the AWS SDK for this, but if you want to remove a resource you remove it from your code and Pulumi will tear it (assuming it has no dependencies either in AWS or the Pulumi stack)
brave-planet-10645
01/07/2021, 10:22 AM
If you've set up the VPC within Pulumi, I wouldn't advice removing it using the SDK or the console though. That leads to pain
l
limited-pager-46264
01/07/2021, 11:07 AM
But if the resource wasn’t created by Pulumi then there’s no Pulumi way of removing it, rit?
b
brave-planet-10645
01/07/2021, 11:11 AM
You can use Pulumi to import resources into the stack and then use Pulumi to delete them after (by removing them from the code) but if those resources are not part of the Pulumi stack then Pulumi won't remove them
No matter how you like to participate in developer communities, Pulumi wants to meet you there. If you want to meet other Pulumi users to share use-cases and best practices, contribute code or documentation, see us at an event, or just tell a story about something cool you did with Pulumi, you are part of our community.