Data source for google_compute_firewall

Hey Guys,
│ Error: Invalid data source

│ on line 10, in data “google_compute_firewall” “allow-ssh”:
│ 10: data “google_compute_firewall” “allow-ssh” {

│ The provider hashicorp/google does not support data source “google_compute_firewall”.

│ Did you intend to use the managed resource type “google_compute_firewall”? If so, declare this using a “resource” block instead of a “data” block.

is that means I can not import my existing firewalls rules to terraform ? I tried with data source.

Not a GCP or HashiCorp member, but a quick glance at registry shows me there is no such data source google_compute_firewall. Only a resource -

Have a look at import example at the bottom of the doc -

Or if you are only needing to reference something (rather than search for it or lookup lots of details) you can just use the ID wherever it needs to be used.

Thank you so much, everyone, I have resolved my issue by defining the firewall rule as a resource, as of now it does not support as the data source and you can not import existing firewalls rules however you may use import to call them.
Remember importing resources will be deleted during destroying command however if you use data sources to call them in terraform they will keep remaining even after destroy.