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