---
title: NIFCLOUD RDB backup retention period below 7 days
description: Datadog, the leading service for cloud-scale monitoring.
breadcrumbs: >-
  Docs > Datadog Security > Code Security > Infrastructure as Code (IaC)
  Security > IaC Security Rules > NIFCLOUD RDB backup retention period below 7
  days
---

# NIFCLOUD RDB backup retention period below 7 days

{% callout %}
# Important note for users on the following Datadog sites: app.ddog-gov.com, us2.ddog-gov.com

{% alert level="danger" %}
This product is not supported for your selected [Datadog site](https://docs.datadoghq.com/getting_started/site.md). ({% placeholder "user-datadog-site-name" /%}).
{% /alert %}

{% /callout %}

## Metadata{% #metadata %}

**Id:** `terraform-nifcloud-db-does-not-have-long-backup-retention` 

**Provider:** Nifcloud

**Platform:** Terraform

**Severity:** Low

**Category:** Backup

#### Learn More{% #learn-more %}

- [Provider Reference](https://registry.terraform.io/providers/nifcloud/nifcloud/latest/docs/resources/db_instance#backup_retention_period)

### Description{% #description %}

The RDB backup retention period is below 7 days. The `nifcloud_db_instance` resource must include the `backup_retention_period` attribute set to at least 7 (days). Resources missing this attribute or with a value less than 7 will be reported as `MissingAttribute` or `IncorrectValue`.

## Compliant Code Examples{% #compliant-code-examples %}

```terraform
resource "nifcloud_db_instance" "negative" {
  identifier              = "example"
  instance_class          = "db.large8"
  backup_retention_period = 7
}
```

## Non-Compliant Code Examples{% #non-compliant-code-examples %}

```terraform
resource "nifcloud_db_instance" "positive" {
  identifier              = "example"
  instance_class          = "db.large8"
}
```

```terraform
resource "nifcloud_db_instance" "positive" {
  identifier              = "example"
  instance_class          = "db.large8"
  backup_retention_period = 1
}
```
