Google Cloud - google_compute_firewall

Hi guys,

Im use Terraform to create firewall rules in my project in GCP.

But, it’s possible create rules by console GCP, and Terraform can’t delete this rule.

Exist a way delete rules create by console using terraform?

Thanks!

There isn’t a clean way currently to do it in only a single Terraform run. You could import the existing rule into your state first and then terraform destroy it, or you could use a null resource (or something like the gcloud module) to shell out to gcloud to delete it.

1 Like

Hi,

Thanks for u response.

I’ll try to make your suggestion.

Thanks for your help. :star_struck: