Google Cloud Platform (GCP) Resource Inventory' pattern should not be triggered via Cloud DiscoveryDescription“Google Cloud Platform (GCP) Resource Inventory” pattern is triggered in Cloud Service Account discovery schedules, but the pattern always fails because a bucket url is not passed to it as input parameter. The pattern expects and checks if a valid bucket url is passed to it in the input parameter “full_path_file”. If it does not find the parameter or the input parameter format is wrong it will stop the pattern, because if it continues it will try to create a new bucket in the Google Cloud Platform, which will cost more money. Currently there is no Cloud Service Account field that may contain such data, but modifying the table and formats is not possible, because they are heavily used in Cloud Management plugins/application, so any change will have impact on them. Because of the above-mentioned reasoning the “Google Cloud Platform (GCP) Resource Inventory” pattern was designed to be working only when triggered from a serverless discovery schedule and the “full_path_file” populated as input parameter.Steps to Reproduce 1. Configure GCP Account2. Run Cloud Discovery on the GCP account3. Observe that the Google Cloud Platform (GCP) Resource Inventory' pattern triggers and fails with the error :Inventory Bucket URI data not populated in the pattern input parameter.WorkaroundThis is expected behavior and by design in all currently supported releases. The simpler workaround: The cloud discovery patterns are launched based on the logic in the getPatternsToRun function of the CloudServiceAccountPatterns script include.var saCiToPattern = new GlideRecord('sa_ci_to_pattern');saCiToPattern.addQuery('ci_type', provider);saCiToPattern.addQuery('pattern.active', '1');saCiToPattern.addQuery('pattern.cpattern_type','3');saCiToPattern.addQuery('pattern.ci_type','cmdb_ci_cloud_service_account');saCiToPattern.addQuery('pattern', 'NOT IN', excludedPatterns);saCiToPattern.query();The 'Google Cloud Platform (GCP) Resource Inventory' pattern is meeting this criteria and is consequently launched as part of GCP cloud discovery.The pattern can be modified to no longer meet the mentioned query conditions, so that the pattern will not launch in cloud discovery. Enter "sa_pattern.LIST" in the navigator to open a list of the patterns table. (Don't open "Discovery Patterns", which is sn_discovery_patterns, and not the same thing)Search for the pattern "Google Cloud Platform (GCP) Resource Inventory"Change the pattern type to 4- Cloud Resource, and the pattern will be not the triggered as part of the cloud discovery. A more complicated workaround: The way the pattern behaves can be modified though and currently this is offered as possible workarounds: In case there is only 1 account and only 1 resource inventory file in the Cloud Account - Add a new “Set Variable” step in the pattern at the beginning of the pattern, in which assig the bucket and inventory file path to “full_path_file” pattern parameter.In case of multiple GCP Accounts and/or multiple inventory files: Populate the bucket/inventory file data into the datacenter_url field in the Cloud Service Account record. Then add a new “Set Variable” step at the start of the pattern that will assign the datacenter_url value to the “full_path_file” pattern parameter. This is possible because the datacenter_url field value is passed to the pattern, but the problem is that this field value is used in CMP application operations, so it is possible to have some unexpected results if this application is being usedCurrently this is the last available option that requires the most effort, but it is the safest and most agile one – to create a new text field in the “Cloud Service Account” table and make it visible in the GCP accounts formats. Then Pre Sensor Scripts has to be created so that the script is triggered before the “Google Cloud Platform (GCP) Resource Inventory” pattern and checks if this is google account and if it is Google account to check if this field has values, if this is true to make the value available in the pattern. The last step required here is to add a “Set Variable” step at the start of the pattern that checks if “full_path_file” is empty and if it is empty to assign the value from the newly added field value to it. Related Problem: PRB1393783