> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/application-security/terraform-workflows/manage-resources/leverage-terraform-data-sources.md).

# Leverage Terraform data sources

Data sources allow you to dynamically look up existing Application Security configurations and reference their IDs or attributes in your new deployments, eliminating the need to copy and paste hardcoded values.

### Supported Application Security data sources

#### Policies and rules

| Action                                                                                           | Terraform data source            |
| ------------------------------------------------------------------------------------------------ | -------------------------------- |
| Retrieve the configuration details (such as conditions and triggers) of a specific AppSec policy | `cortexcloud_appsec_policy`      |
| Fetch a filtered list of AppSec policies (such as all policies currently set to enabled)         | `cortexcloud_appsec_policies`    |
| Retrieve the YAML definition and severity details of a specific custom rule                      | `cortexcloud_appsec_rule`        |
| Get a filtered list of rules based on scanner type (IaC/Secrets) or category                     | `cortexcloud_appsec_rules`       |
| List the available rule labels currently active in the tenant                                    | `cortexcloud_appsec_rule_labels` |

#### Compliance

| Action                                                                                            | Terraform data source                                                                       |
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| Retrieve details for specific compliance frameworks (such as OWASP Top 10) to fetch a Standard ID | `cortexcloud_compliance_standard` or `cortexcloud_compliance_standards`                     |
| Look up the scheduling and reporting targets for existing automated compliance audits             | `cortexcloud_compliance_assessment_profile` or `cortexcloud_compliance_assessment_profiles` |
| Retrieve configuration details for individual compliance controls                                 | `cortexcloud_compliance_control` or `cortexcloud_compliance_controls`                       |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://cortex-docs.paloaltonetworks.com/application-security/terraform-workflows/manage-resources/leverage-terraform-data-sources.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
