This repository has been archived by the owner on Mar 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
975 additions
and
12 deletions.
There are no files selected for viewing
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,141 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "gcore_lifecyclepolicy Resource - terraform-provider-gcorelabs" | ||
subcategory: "" | ||
description: |- | ||
Represent lifecycle policy. Use to periodically take snapshots | ||
--- | ||
|
||
# gcore_lifecyclepolicy (Resource) | ||
|
||
Represent lifecycle policy. Use to periodically take snapshots | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
provider gcore { | ||
user_name = "test" | ||
password = "test" | ||
gcore_platform = "https://api.gcdn.co" | ||
gcore_api = "https://api.cloud.gcorelabs.com" | ||
} | ||
resource "gcore_lifecyclepolicy" "lp" { | ||
project_id = 1 | ||
region_id = 1 | ||
name = "test" | ||
status = "active" | ||
action = "volume_snapshot" | ||
volume { | ||
id = "fe93bfdd-4ce3-4041-b89b-4f10d0d49498" | ||
} | ||
schedule { | ||
max_quantity = 4 | ||
interval { | ||
weeks = 1 | ||
days = 2 | ||
hours = 3 | ||
minutes = 4 | ||
} | ||
resource_name_template = "reserve snap of the volume {volume_id}" | ||
retention_time { | ||
weeks = 4 | ||
days = 3 | ||
hours = 2 | ||
minutes = 1 | ||
} | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- **name** (String) | ||
|
||
### Optional | ||
|
||
- **action** (String) | ||
- **id** (String) The ID of this resource. | ||
- **project_id** (Number) | ||
- **project_name** (String) | ||
- **region_id** (Number) | ||
- **region_name** (String) | ||
- **schedule** (Block List) (see [below for nested schema](#nestedblock--schedule)) | ||
- **status** (String) | ||
- **volume** (Block Set) List of managed volumes (see [below for nested schema](#nestedblock--volume)) | ||
|
||
### Read-Only | ||
|
||
- **user_id** (Number) | ||
|
||
<a id="nestedblock--schedule"></a> | ||
### Nested Schema for `schedule` | ||
|
||
Required: | ||
|
||
- **max_quantity** (Number) Maximum number of stored resources | ||
|
||
Optional: | ||
|
||
- **cron** (Block List, Max: 1) Use for taking actions at specified moments of time. Exactly one of interval and cron blocks should be provided (see [below for nested schema](#nestedblock--schedule--cron)) | ||
- **interval** (Block List, Max: 1) Use for taking actions with equal time intervals between them. Exactly one of interval and cron blocks should be provided (see [below for nested schema](#nestedblock--schedule--interval)) | ||
- **resource_name_template** (String) Used to name snapshots. {volume_id} is substituted with volume.id on creation | ||
- **retention_time** (Block List, Max: 1) If it is set, new resource will be deleted after time (see [below for nested schema](#nestedblock--schedule--retention_time)) | ||
|
||
Read-Only: | ||
|
||
- **id** (String) The ID of this resource. | ||
- **type** (String) | ||
|
||
<a id="nestedblock--schedule--cron"></a> | ||
### Nested Schema for `schedule.cron` | ||
|
||
Optional: | ||
|
||
- **day** (String) Either single asterisk or comma-separated list of integers (1-31) | ||
- **day_of_week** (String) Either single asterisk or comma-separated list of integers (0-6) | ||
- **hour** (String) Either single asterisk or comma-separated list of integers (0-23) | ||
- **minute** (String) Either single asterisk or comma-separated list of integers (0-59) | ||
- **month** (String) Either single asterisk or comma-separated list of integers (1-12) | ||
- **timezone** (String) | ||
- **week** (String) Either single asterisk or comma-separated list of integers (1-53) | ||
|
||
|
||
<a id="nestedblock--schedule--interval"></a> | ||
### Nested Schema for `schedule.interval` | ||
|
||
Optional: | ||
|
||
- **days** (Number) Number of days to wait between actions | ||
- **hours** (Number) Number of hours to wait between actions | ||
- **minutes** (Number) Number of minutes to wait between actions | ||
- **weeks** (Number) Number of weeks to wait between actions | ||
|
||
|
||
<a id="nestedblock--schedule--retention_time"></a> | ||
### Nested Schema for `schedule.retention_time` | ||
|
||
Optional: | ||
|
||
- **days** (Number) Number of days to wait before deleting snapshot | ||
- **hours** (Number) Number of hours to wait before deleting snapshot | ||
- **minutes** (Number) Number of minutes to wait before deleting snapshot | ||
- **weeks** (Number) Number of weeks to wait before deleting snapshot | ||
|
||
|
||
|
||
<a id="nestedblock--volume"></a> | ||
### Nested Schema for `volume` | ||
|
||
Required: | ||
|
||
- **id** (String) The ID of this resource. | ||
|
||
Read-Only: | ||
|
||
- **name** (String) | ||
|
||
|
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,33 @@ | ||
provider gcore { | ||
user_name = "test" | ||
password = "test" | ||
gcore_platform = "https://api.gcdn.co" | ||
gcore_api = "https://api.cloud.gcorelabs.com" | ||
} | ||
|
||
resource "gcore_lifecyclepolicy" "lp" { | ||
project_id = 1 | ||
region_id = 1 | ||
name = "test" | ||
status = "active" | ||
action = "volume_snapshot" | ||
volume { | ||
id = "fe93bfdd-4ce3-4041-b89b-4f10d0d49498" | ||
} | ||
schedule { | ||
max_quantity = 4 | ||
interval { | ||
weeks = 1 | ||
days = 2 | ||
hours = 3 | ||
minutes = 4 | ||
} | ||
resource_name_template = "reserve snap of the volume {volume_id}" | ||
retention_time { | ||
weeks = 4 | ||
days = 3 | ||
hours = 2 | ||
minutes = 1 | ||
} | ||
} | ||
} |
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
Oops, something went wrong.