Skip to content

Commit 05a5ed5

Browse files
committed
Support scheduled backups and clones for bootVolumes
1 parent be64bc2 commit 05a5ed5

20 files changed

+2541
-87
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ All notable changes to this project are documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/).
55

6+
## 2.2.1 - 2018-08-16
7+
8+
### Added
9+
- Support boot volume backup and clones
10+
- Support scheduled backup policy on boot volume creation
11+
612
## 2.2.0 - 2018-08-09
713

814
### Fixed

docs/core/boot_volume_backups.md

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# oci_core_boot_volume_backup
2+
3+
## BootVolumeBackup Resource
4+
5+
### BootVolumeBackup Reference
6+
7+
The following attributes are exported:
8+
9+
* `boot_volume_id` - The OCID of the boot volume.
10+
* `compartment_id` - The OCID of the compartment that contains the boot volume backup.
11+
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
12+
* `display_name` - A user-friendly name for the boot volume backup. Does not have to be unique and it's changeable. Avoid entering confidential information.
13+
* `expiration_time` - The date and time the volume backup will expire and be automatically deleted. Format defined by RFC3339. This parameter will always be present for backups that were created automatically by a scheduled-backup policy. For manually created backups, it will be absent, signifying that there is no expiration time and the backup will last forever until manually deleted.
14+
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
15+
* `id` - The OCID of the boot volume backup.
16+
* `image_id` - The image OCID used to create the boot volume the backup is taken from.
17+
* `size_in_gbs` - The size of the boot volume, in GBs.
18+
* `source_type` - Specifies whether the backup was created manually, or via scheduled backup policy.
19+
* `state` - The current state of a boot volume backup.
20+
* `time_created` - The date and time the boot volume backup was created. This is the time the actual point-in-time image of the volume data was taken. Format defined by RFC3339.
21+
* `time_request_received` - The date and time the request to create the boot volume backup was received. Format defined by RFC3339.
22+
* `type` - The type of a volume backup. Supported values are 'FULL' or 'INCREMENTAL'.
23+
* `unique_size_in_gbs` - The size used by the backup, in GBs. It is typically smaller than `size_in_gbs`, depending on the space consumed on the boot volume and whether the backup is full or incremental.
24+
25+
26+
27+
### Create Operation
28+
Creates a new boot volume backup of the specified boot volume. For general information about boot volume backups,
29+
see [Overview of Boot Volume Backups](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumebackups.htm)
30+
31+
When the request is received, the backup object is in a REQUEST_RECEIVED state.
32+
When the data is imaged, it goes into a CREATING state.
33+
After the backup is fully uploaded to the cloud, it goes into an AVAILABLE state.
34+
35+
36+
The following arguments are supported:
37+
38+
* `boot_volume_id` - (Required) The OCID of the boot volume that needs to be backed up.
39+
* `defined_tags` - (Optional) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
40+
* `display_name` - (Optional) A user-friendly name for the boot volume backup. Does not have to be unique and it's changeable. Avoid entering confidential information.
41+
* `freeform_tags` - (Optional) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
42+
* `type` - (Optional) The type of backup to create. If omitted, defaults to incremental. Supported values are 'FULL' or 'INCREMENTAL'.
43+
44+
45+
### Update Operation
46+
Updates the display name for the specified boot volume backup.
47+
Avoid entering confidential information.
48+
49+
50+
The following arguments support updates:
51+
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
52+
* `display_name` - A user-friendly name for the boot volume backup. Does not have to be unique and it's changeable. Avoid entering confidential information.
53+
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
54+
55+
56+
** IMPORTANT **
57+
Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
58+
59+
### Example Usage
60+
61+
```hcl
62+
resource "oci_core_boot_volume_backup" "test_boot_volume_backup" {
63+
#Required
64+
boot_volume_id = "${oci_core_boot_volume.test_boot_volume.id}"
65+
66+
#Optional
67+
defined_tags = {"Operations.CostCenter"= "42"}
68+
display_name = "${var.boot_volume_backup_display_name}"
69+
freeform_tags = {"Department"= "Finance"}
70+
type = "${var.boot_volume_backup_type}"
71+
}
72+
```
73+
74+
75+
## BootVolumeBackup Singular DataSource
76+
77+
78+
### Get Operation
79+
Gets information for the specified boot volume backup.
80+
81+
The following arguments are supported:
82+
83+
* `boot_volume_backup_id` - (Required) The OCID of the boot volume backup.
84+
85+
86+
### Example Usage
87+
88+
```hcl
89+
data "oci_core_boot_volume_backup" "test_boot_volume_backup" {
90+
#Required
91+
boot_volume_backup_id = "${var.boot_volume_backup_boot_volume_backup_id}"
92+
}
93+
```
94+
# oci_core_boot_volume_backups
95+
96+
## BootVolumeBackup DataSource
97+
98+
Gets a list of boot_volume_backups.
99+
100+
### List Operation
101+
Lists the boot volume backups in the specified compartment. You can filter the results by boot volume.
102+
103+
The following arguments are supported:
104+
105+
* `boot_volume_id` - (Optional) The OCID of the boot volume.
106+
* `compartment_id` - (Required) The OCID of the compartment.
107+
* `display_name` - (Optional) A filter to return only resources that match the given display name exactly.
108+
* `state` - (Optional) A filter to only return resources that match the given lifecycle state. The state value is case-insensitive.
109+
110+
111+
The following attributes are exported:
112+
113+
* `boot_volume_backups` - The list of boot_volume_backups.
114+
115+
### Example Usage
116+
117+
```hcl
118+
data "oci_core_boot_volume_backups" "test_boot_volume_backups" {
119+
#Required
120+
compartment_id = "${var.compartment_id}"
121+
122+
#Optional
123+
boot_volume_id = "${oci_core_boot_volume.test_boot_volume.id}"
124+
display_name = "${var.boot_volume_backup_display_name}"
125+
state = "${var.boot_volume_backup_state}"
126+
}
127+
```

docs/core/boot_volumes.md

Lines changed: 99 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,102 @@
1+
# oci_core_boot_volume
12

3+
## BootVolume Resource
4+
5+
### BootVolume Reference
6+
7+
The following attributes are exported:
8+
9+
* `availability_domain` - The Availability Domain of the boot volume. Example: `Uocm:PHX-AD-1`
10+
* `compartment_id` - The OCID of the compartment that contains the boot volume.
11+
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
12+
* `display_name` - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
13+
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
14+
* `id` - The boot volume's Oracle ID (OCID).
15+
* `image_id` - The image OCID used to create the boot volume.
16+
* `is_hydrated` - Specifies whether the boot volume's data has finished copying from the source boot volume or boot volume backup.
17+
* `size_in_gbs` - The size of the boot volume in GBs.
18+
* `size_in_mbs` - The size of the volume in MBs. The value must be a multiple of 1024. This field is deprecated. Please use `size_in_gbs`.
19+
* `source_details` - The boot volume source, either an existing boot volume in the same Availability Domain or a boot volume backup. If null, this means that the boot volume was created from an image.
20+
* `type` - The type of the boot volume source. Supported values are `bootVolumeBackup` and `bootVolume`
21+
* `id` - The OCID of the boot volume backup or the boot volume
22+
* `state` - The current state of a boot volume.
23+
* `time_created` - The date and time the boot volume was created. Format defined by RFC3339.
24+
* `volume_group_id` - The OCID of the source volume group.
25+
26+
27+
28+
### Create Operation
29+
Creates a new boot volume in the specified compartment from an existing boot volume or a boot volume backup.
30+
For general information about boot volumes, see [Boot Volumes](https://docs.us-phoenix-1.oraclecloud.com/Content/Block/Concepts/bootvolumes.htm).
31+
You may optionally specify a *display name* for the volume, which is simply a friendly name or
32+
description. It does not have to be unique, and you can change it. Avoid entering confidential information.
33+
34+
35+
The following arguments are supported:
36+
37+
* `availability_domain` - (Required) The Availability Domain of the boot volume. Example: `Uocm:PHX-AD-1`
38+
* `backup_policy_id` - (Optional) If provided, specifies the ID of the boot volume backup policy to assign to the newly created boot volume. If omitted, no policy will be assigned.
39+
* `compartment_id` - (Required) The OCID of the compartment that contains the boot volume.
40+
* `defined_tags` - (Optional) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
41+
* `display_name` - (Optional) A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
42+
* `freeform_tags` - (Optional) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
43+
* `source_details` - (Required) Specifies the boot volume source details for a new boot volume. The volume source is either another boot volume in the same Availability Domain or a boot volume backup. This is a mandatory field for a boot volume.
44+
* `type` - (Required) The type of the boot volume source. Supported values are `bootVolumeBackup` and `bootVolume`
45+
* `id` - (Required) The OCID of the boot volume backup or the boot volume
46+
47+
48+
### Update Operation
49+
Updates the specified boot volume's display name.
50+
51+
The following arguments support updates:
52+
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
53+
* `display_name` - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
54+
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
55+
56+
57+
** IMPORTANT **
58+
Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
59+
60+
### Example Usage
61+
62+
```hcl
63+
resource "oci_core_boot_volume" "test_boot_volume" {
64+
#Required
65+
availability_domain = "${var.boot_volume_availability_domain}"
66+
compartment_id = "${var.compartment_id}"
67+
source_details {
68+
#Required
69+
type = "${var.boot_volume_source_details_type}"
70+
}
71+
72+
#Optional
73+
backup_policy_id = "${oci_core_backup_policy.test_backup_policy.id}"
74+
defined_tags = {"Operations.CostCenter"= "42"}
75+
display_name = "${var.boot_volume_display_name}"
76+
freeform_tags = {"Department"= "Finance"}
77+
}
78+
```
79+
80+
81+
## BootVolume Singular DataSource
82+
83+
84+
### Get Operation
85+
Gets information for the specified boot volume.
86+
87+
The following arguments are supported:
88+
89+
* `boot_volume_id` - (Required) The OCID of the boot volume.
90+
91+
92+
### Example Usage
93+
94+
```hcl
95+
data "oci_core_boot_volume" "test_boot_volume" {
96+
#Required
97+
boot_volume_id = "${var.boot_volume_boot_volume_id}"
98+
}
99+
```
2100
# oci_core_boot_volumes
3101

4102
## BootVolume DataSource
@@ -30,20 +128,4 @@ data "oci_core_boot_volumes" "test_boot_volumes" {
30128
#Optional
31129
volume_group_id = "${oci_core_volume_group.test_volume_group.id}"
32130
}
33-
```
34-
### BootVolume Reference
35-
36-
The following attributes are exported:
37-
38-
* `availability_domain` - The Availability Domain of the boot volume. Example: `Uocm:PHX-AD-1`
39-
* `compartment_id` - The OCID of the compartment that contains the boot volume.
40-
* `defined_tags` - Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
41-
* `display_name` - A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
42-
* `freeform_tags` - Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
43-
* `id` - The boot volume's Oracle ID (OCID).
44-
* `image_id` - The image OCID used to create the boot volume.
45-
* `size_in_gbs` - The size of the boot volume in GBs.
46-
* `size_in_mbs` - The size of the volume in MBs. The value must be a multiple of 1024. This field is deprecated. Please use sizeInGBs.
47-
* `state` - The current state of a boot volume.
48-
* `time_created` - The date and time the boot volume was created. Format defined by RFC3339.
49-
* `volume_group_id` - The OCID of the source volume group.
131+
```

0 commit comments

Comments
 (0)