> 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/appsec-rules/iac-security/storage/appsec2-gcp-21.md).

# Vertex AI instance disks not encrypted with a Customer Managed Key (CMK) misconfiguration detected i

## Rule Details

|                        |                           |
| ---------------------- | ------------------------- |
| Cortex AppSec Rule ID  | APPSEC2\_GCP\_21          |
| Category - Subcategory | Storage - Encryption      |
| Provider               | GCP                       |
| Severity               | MEDIUM                    |
| Framework              | Terraform, Terraform Plan |

## Impact

This rule is assessing whether instance disks in Vertex AI are encrypted using a Customer Managed Key (CMK). This is critical in providing a higher level of security for your data at rest. By using CMK, you have more control over your cryptographic key, increasing data protection. Forgoing use of a CMK could potentially lead to sensitive data being exposed or compromised. The encryption you employ should be as strong as possible to ensure maximum data security.

## How to Fix

*Resource:* google\_notebooks\_instance

* *Arguments:* kms\_key, disk\_encryption

To fix this issue, you need to specify a Customer Managed Key (CMK) for encrypting the Vertex AI instance disks. You can do this by setting the `kms_key` field and the `disk_encryption` to `CMEK`.

## The above code is secure because it ensures that the Vertex AI instance disks are encrypted with a CMK. This provides better encryption management and control, as well as an added layer of security for the data stored in these disks. The data can only be decrypted with the specified key which is under the control of the customer, making it much harder for unauthorized persons to access the data. \[source,go]

## resource "google\_notebooks\_instance" "instance\_good\_vm" { ... disk\_encryption = "CMEK" kms\_key = var.kms\_key ... }


---

# 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://cortex-docs.paloaltonetworks.com/appsec-rules/iac-security/storage/appsec2-gcp-21.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.
