diff --git a/plugins/gcp/fix_plugin_gcp/resources/base.py b/plugins/gcp/fix_plugin_gcp/resources/base.py index 0888ea56d..54f55ee7b 100644 --- a/plugins/gcp/fix_plugin_gcp/resources/base.py +++ b/plugins/gcp/fix_plugin_gcp/resources/base.py @@ -179,6 +179,11 @@ def add_region_to_node(self, node: GcpResourceType, source: Optional[Json] = Non node._region = self.region_by_zone_name[zone_name] self.add_edge(node, node=zone, reverse=True) return + else: + log.warning( + "Zone property '%s' found in the source but no corresponding zone object is available to associate with the node.", + zone_name, + ) if InternalZoneProp in source: if zone := self.zone_by_name.get(source[InternalZoneProp]): @@ -186,6 +191,11 @@ def add_region_to_node(self, node: GcpResourceType, source: Optional[Json] = Non node._region = self.region_by_zone_name[source[InternalZoneProp]] self.add_edge(node, node=zone, reverse=True) return + else: + log.warning( + "Internal zone property '%s' exists in the source but no corresponding zone object is available to associate with the node.", + source[InternalZoneProp], + ) if RegionProp in source: region_name = source[RegionProp].rsplit("/", 1)[-1] @@ -193,6 +203,11 @@ def add_region_to_node(self, node: GcpResourceType, source: Optional[Json] = Non node._region = region self.add_edge(node, node=region, reverse=True) return + else: + log.warning( + "Region property '%s' found in the source but no corresponding region object is available to associate with the node.", + region_name, + ) # Fallback to GraphBuilder region, i.e. regional collection if self.region is not None: