> For the complete documentation index, see [llms.txt](https://docs.prismacloud.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.prismacloud.io/content-collections/application-security/risk-management/monitor-and-manage-code-build/terraform-module-scan.md).

# Terraform Module Scanning

Prisma Cloud supports rendering and scanning both public, private, and locally cached Terraform modules (modules). This capability enables users to analyze misconfigurations that may result from the module definition and the variables defined in the module block.

<figure><img src="https://3990409212-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FyqPwsbMSaogAot23rTIu%2Fuploads%2Fgit-blob-4ed6cb9c666ec5a6f2b829360f951bcffa0c61d5%2Ftf-module-scan.png?alt=media" alt="tf module scan"><figcaption></figcaption></figure>

## Public and Locally Cached Modules

Automated support for public modules is provided by the platform for all version control system (VCS) repositories that have been onboarded. For information on onboarding repositories refer to [Code Repositories](https://github.com/PaloAltoNetworks/pc-docs-md/tree/main/enterprise-edition/content-collections/application-security/get-started/connect-code-and-build-providers/code-repositories/code-repositories.md).

### Public and Local Module Scanning through Checkov CLI

When using the Checkov CLI (CLI), make sure to include the `--download-external-modules true` flag to enable the automatic download of external modules.

Additionally, the CLI supports scanning the `.terraform` directory when modules have been downloaded locally.

Nested modules are not yet supported in scans performed in the `.terraform` directory.

## Private Module Support

Prisma Cloud supports the rendering and scanning of private modules through both CLI and VCS integrations. When using the CLI, refer to [Scanning Third-Party Terraform Modules with Checkov CLI](https://www.checkov.io/7.Scan%20Examples/Terraform.html) for instructions on including your API key, and optionally, the host.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.prismacloud.io/content-collections/application-security/risk-management/monitor-and-manage-code-build/terraform-module-scan.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
