-
Notifications
You must be signed in to change notification settings - Fork 460
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add docs for managed backup terraform provider attribute
- Loading branch information
Showing
5 changed files
with
107 additions
and
8 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
...urrent/_includes/cockroachcloud/backups/provision-cluster-tf-managed-backups.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
You may also want to configure the [managed backups]({% link cockroachcloud/managed-backups.md %}) your CockroachDB {{ site.data.products.standard }} cluster takes automatically. To do so, include the `backup_config` attribute in the `cockroach_cluster` resource: | ||
|
||
{% include_cached copy-clipboard.html %} | ||
~~~ hcl | ||
backup_config = { | ||
enabled = true | ||
frequency_minutes = 60 | ||
retention_days = 30 | ||
} | ||
~~~ | ||
|
||
{{site.data.alerts.callout_info}} | ||
You can modify the [retention]({% link cockroachcloud/managed-backups.md %}#retention) of managed backups only once with either the [Cloud Console]({% link cockroachcloud/managed-backups.md %}#cloud-console), the [Cloud API]({% link cockroachcloud/managed-backups.md %}#cloud-api), or Terraform. | ||
{{site.data.alerts.end}} | ||
|
||
For details on setting each of the `backup_config` fields, refer to [Managed Backups]({% link cockroachcloud/managed-backups.md %}#cockroachdb-cloud-terraform-provider). |
9 changes: 9 additions & 0 deletions
9
src/current/_includes/cockroachcloud/backups/terraform-managed-backups.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Set the following for the `backup_config` attribute: | ||
|
||
- `enabled` controls whether managed backups are enabled or disabled. If you are disabling managed backups, you cannot set backup frequency or retention. Possible values are: `true` or `false`. | ||
- `frequency_minutes` determines [how often](#frequency) the managed backup will run in minutes. Possible values are: `5`, `10`, `15`, `30`, `60`, `240`, `1440`. | ||
- `retention_days` sets the number of days Cockroach Labs will [retain](#retention) the managed backup in storage. You can change `retention_days` for the cluster **once** (whether in Terraform, the [Cloud API](#cloud-api), or the [Cloud Console](#cloud-console)). Possible values are: `2`, `7`, `30`, `90`, `365`. Note that: | ||
- If the initial value of the `retention_days` attribute is the default value `30`, you'll be able to modify the backup retention setting once more. | ||
- If the initial value is not the default, you will not be able to modify `retention_days` again. You can refrain from including `retention_days` in the Terraform configuration and instead manage the retention in the Cloud Console. | ||
|
||
For more details on modifying `retention_days` more than once, refer to the [Updating Backup Retention](https://github.com/cockroachdb/terraform-provider-cockroach/blob/main/docs/guides/updating-backup-retention.md) documentation in the Terraform provider for CockroachDB {{ site.data.products.cloud }} Repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters