You're using pulumi to describe the final state and then it works out how best to get there. In other words, you can't create and then delete the firewall rule.
What you could do, is use our
automation api to run two different programs back to back. The first sets up the server and db, creates the firewall rules, sets up the users and grants. The second then removes those rules.
Then just run one program after the other