Aren’t there functions to delete resources like VPC?
b
brave-planet-10645
01/07/2021, 10:21 AM
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)
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