Aug 25, 2021
In the Ansible GCP modules (I would imagine similarly for other Ansible Cloud provider modules), there's a state attribute. If you set it to present, the resource gets created. If you set it to absent, it gets destroyed. You can parametrize that attriute, passing it in as a run-time extra-var.