We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
GCP: Firewalls resource policy fails with no resource attribute 'Firewall'
When running this policy custodian fails: 

- policies:
  - name: firewall-test
    resource: gcp.firewall

The error returned is:
AttributeError: 'Resource' object has no attribute 'firewall'

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `tools/c7n_gcp/c7n_gcp/resources/network.py`
Content:
```
1 # Copyright 2018 Capital One Services, LLC
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 from c7n_gcp.query import QueryResourceManager, TypeInfo
15 
16 from c7n_gcp.provider import resources
17 
18 
19 @resources.register('vpc')
20 class Network(QueryResourceManager):
21 
22     class resource_type(TypeInfo):
23         service = 'compute'
24         version = 'v1'
25         component = 'networks'
26         scope_template = "projects/{}/global/networks"
27 
28 
29 @resources.register('subnet')
30 class Subnet(QueryResourceManager):
31 
32     class resource_type(TypeInfo):
33         service = 'compute'
34         version = 'v1'
35         component = 'networks'
36         enum_spec = ('aggregatedList', 'items.*.subnetworks[]', None)
37         scope_template = "projects/{}/aggregated/subnetworks"
38 
39 
40 @resources.register('firewall')
41 class Firewall(QueryResourceManager):
42 
43     class resource_type(TypeInfo):
44         service = 'compute'
45         version = 'v1'
46         component = 'firewall'
47         scope_template = "projects/{}/global/firewalls"
48 
49 
50 @resources.register('router')
51 class Router(QueryResourceManager):
52 
53     class resource_type(TypeInfo):
54         service = 'compute'
55         version = 'v1'
56         component = 'routers'
57         enum_spec = ('aggregatedList', 'items.*.routers[]', None)
58         scope_template = "projects/{}/aggregated/routers"
59 
60 
61 @resources.register('route')
62 class Route(QueryResourceManager):
63 
64     class resource_type(TypeInfo):
65         service = 'compute'
66         version = 'v1'
67         component = 'routes'
68         scope_template = "projects/{}/global/routes"
69
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/tools/c7n_gcp/c7n_gcp/resources/network.py b/tools/c7n_gcp/c7n_gcp/resources/network.py
--- a/tools/c7n_gcp/c7n_gcp/resources/network.py
+++ b/tools/c7n_gcp/c7n_gcp/resources/network.py
@@ -43,8 +43,7 @@
     class resource_type(TypeInfo):
         service = 'compute'
         version = 'v1'
-        component = 'firewall'
-        scope_template = "projects/{}/global/firewalls"
+        component = 'firewalls'
 
 
 @resources.register('router')

{"golden_diff": "diff --git a/tools/c7n_gcp/c7n_gcp/resources/network.py b/tools/c7n_gcp/c7n_gcp/resources/network.py\n--- a/tools/c7n_gcp/c7n_gcp/resources/network.py\n+++ b/tools/c7n_gcp/c7n_gcp/resources/network.py\n@@ -43,8 +43,7 @@\n     class resource_type(TypeInfo):\n         service = 'compute'\n         version = 'v1'\n-        component = 'firewall'\n-        scope_template = \"projects/{}/global/firewalls\"\n+        component = 'firewalls'\n \n \n @resources.register('router')\n", "issue": "GCP: Firewalls resource policy fails with no resource attribute 'Firewall'\nWhen running this policy custodian fails: \r\n\r\n- policies:\r\n  - name: firewall-test\r\n    resource: gcp.firewall\r\n\r\nThe error returned is:\r\nAttributeError: 'Resource' object has no attribute 'firewall'\n", "before_files": [{"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nfrom c7n_gcp.query import QueryResourceManager, TypeInfo\n\nfrom c7n_gcp.provider import resources\n\n\n@resources.register('vpc')\nclass Network(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'networks'\n        scope_template = \"projects/{}/global/networks\"\n\n\n@resources.register('subnet')\nclass Subnet(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'networks'\n        enum_spec = ('aggregatedList', 'items.*.subnetworks[]', None)\n        scope_template = \"projects/{}/aggregated/subnetworks\"\n\n\n@resources.register('firewall')\nclass Firewall(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'firewall'\n        scope_template = \"projects/{}/global/firewalls\"\n\n\n@resources.register('router')\nclass Router(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'routers'\n        enum_spec = ('aggregatedList', 'items.*.routers[]', None)\n        scope_template = \"projects/{}/aggregated/routers\"\n\n\n@resources.register('route')\nclass Route(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'routes'\n        scope_template = \"projects/{}/global/routes\"\n", "path": "tools/c7n_gcp/c7n_gcp/resources/network.py"}], "after_files": [{"content": "# Copyright 2018 Capital One Services, LLC\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\nfrom c7n_gcp.query import QueryResourceManager, TypeInfo\n\nfrom c7n_gcp.provider import resources\n\n\n@resources.register('vpc')\nclass Network(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'networks'\n        scope_template = \"projects/{}/global/networks\"\n\n\n@resources.register('subnet')\nclass Subnet(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'networks'\n        enum_spec = ('aggregatedList', 'items.*.subnetworks[]', None)\n        scope_template = \"projects/{}/aggregated/subnetworks\"\n\n\n@resources.register('firewall')\nclass Firewall(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'firewalls'\n\n\n@resources.register('router')\nclass Router(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'routers'\n        enum_spec = ('aggregatedList', 'items.*.routers[]', None)\n        scope_template = \"projects/{}/aggregated/routers\"\n\n\n@resources.register('route')\nclass Route(QueryResourceManager):\n\n    class resource_type(TypeInfo):\n        service = 'compute'\n        version = 'v1'\n        component = 'routes'\n        scope_template = \"projects/{}/global/routes\"\n", "path": "tools/c7n_gcp/c7n_gcp/resources/network.py"}]}