> 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/appsec-aws-362.md).

# Clusters of Neptune DB do not replicate tags to snapshots misconfiguration detected in code

## Rule Details

|                        |                           |
| ---------------------- | ------------------------- |
| Cortex AppSec Rule ID  | APPSEC\_AWS\_362          |
| Category - Subcategory | Storage - Replication     |
| Provider               | AWS                       |
| Severity               | LOW                       |
| Framework              | Terraform, Terraform Plan |

## Impact

This rule is checking if Neptune DB clusters within an AWS environment are configured to copy tags to snapshots. Tags are used for various purposes including cost tracking, operations, and security. They carry valuable metadata that explains the purpose, owner, or criticality of a snapshot.

If Neptune DB clusters are not configured to copy tags to snapshots, these valuable metadata will be lost during the process. Any automated or manual processes depending on this information for decision making (such as disaster recovery action, cost allocation, etc.) could therefore be disrupted or incorrect. This is why maintaining tag information in snapshots is considered a good practice.

## How to Fix

*Resource:* aws\_neptune\_cluster

* *Arguments:* copy\_tags\_to\_snapshot

To fix this issue, add the `copy_tags_to_snapshot` parameter to your Neptune cluster configuration and set its value to `true`. This will ensure that all tags on the DB clusters are copied to any AWS-managed backup snapshots when they're created.

\[source,hcl]

```
resource "aws_neptune_cluster" "example" {
 cluster_identifier = "example"
 engine = "neptune"
 backup_retention_period = 5
 preferred_backup_window = "07:00-09:00"
 skip_final_snapshot = true
 apply_immediately = true
 iam_database_authentication_enabled = true 
 copy_tags_to_snapshot = true 
}
```

The above code sets `copy_tags_to_snapshot` to true, this means any AWS Managed backup snapshots will also include the tags present on the DB cluster, which is useful for cost tracking or access control purposes.


---

# 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/appsec-aws-362.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.
