<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: RQL Query Works in Investigate &amp;gt; Search but Fails in Policy Definition (Terraform v1.5.7 Example Included) in Prisma Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-query-works-in-investigate-gt-search-but-fails-in-policy/m-p/1241204#M1538</link>
    <description>&lt;P&gt;Hello A. Putttrevu!&lt;BR /&gt;My customer uses multiple joins in Terraform "pushed" policies frequently, so I'm not sure that is your issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I read where you ran the query manually and it works.&amp;nbsp; However, have you tried creating the policy in the GUI just to see?&lt;BR /&gt;&lt;BR /&gt;Also, can you give us some more specifics as to how you're using Terraofrm to deploy policies, e.g. what provider are you using, and what version, and are you using any API endpoints, and if so, which ones?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Nov 2025 20:27:11 GMT</pubDate>
    <dc:creator>JCalloway4</dc:creator>
    <dc:date>2025-11-04T20:27:11Z</dc:date>
    <item>
      <title>RQL Query Works in Investigate &gt; Search but Fails in Policy Definition (Terraform v1.5.7 Example Included)</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-query-works-in-investigate-gt-search-but-fails-in-policy/m-p/1241193#M1537</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;
&lt;P&gt;I’m facing an issue where RQL queries that work perfectly in the Investigate &amp;gt; Search console do not work when used in policy definitions via Terraform (v1.5.7). For example:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Query that works in Investigate &amp;gt; Search:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;config from cloud.resource where api.name = 'aws-ec2-describe-internet-gateways' as X; config from cloud.resource where api.name = 'aws-ec2-describe-vpcs' as Y; filter '$.X.attachments[*].vpcId equals $.Y.vpcId'; show Y;&lt;/P&gt;
&lt;P&gt;This returns the expected results in the search console, showing VPCs with attached IGWs.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Problem:&lt;/STRONG&gt;&lt;BR /&gt;When I use this query in a policy definition, I get a 400 error:&lt;BR /&gt;&lt;CODE&gt;invalid_search_query severity:error subject:invalid_rule&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Context:&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I have 100+ similar queries that work in search but fail in policy definitions.&lt;/LI&gt;
&lt;LI&gt;I understand that policy definitions may have stricter RQL requirements, but I need to enforce these checks as policies.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;Questions:&lt;/STRONG&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Why do multi-resource/join queries work in search but not in policies?&lt;/LI&gt;
&lt;LI&gt;Is there a workaround or best practice to convert such queries for policy use?&lt;/LI&gt;
&lt;LI&gt;How can I enforce policies for conditions that require joining multiple resources?&lt;/LI&gt;
&lt;LI&gt;Is there any documentation or guidance for writing policy-compatible RQL queries?&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;STRONG&gt;Any help or examples would be greatly appreciated!!&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 16:19:46 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-query-works-in-investigate-gt-search-but-fails-in-policy/m-p/1241193#M1537</guid>
      <dc:creator>A.Putrevu</dc:creator>
      <dc:date>2025-11-04T16:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: RQL Query Works in Investigate &gt; Search but Fails in Policy Definition (Terraform v1.5.7 Example Included)</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-query-works-in-investigate-gt-search-but-fails-in-policy/m-p/1241204#M1538</link>
      <description>&lt;P&gt;Hello A. Putttrevu!&lt;BR /&gt;My customer uses multiple joins in Terraform "pushed" policies frequently, so I'm not sure that is your issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I read where you ran the query manually and it works.&amp;nbsp; However, have you tried creating the policy in the GUI just to see?&lt;BR /&gt;&lt;BR /&gt;Also, can you give us some more specifics as to how you're using Terraofrm to deploy policies, e.g. what provider are you using, and what version, and are you using any API endpoints, and if so, which ones?&lt;BR /&gt;&lt;BR /&gt;Thanks &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Nov 2025 20:27:11 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-query-works-in-investigate-gt-search-but-fails-in-policy/m-p/1241204#M1538</guid>
      <dc:creator>JCalloway4</dc:creator>
      <dc:date>2025-11-04T20:27:11Z</dc:date>
    </item>
  </channel>
</rss>

