Skip to content

Commit 4f3afa9

Browse files
shubham yadavMonica Joshi
authored andcommitted
Added - Support for AWS_S3 in database provision
1 parent 4cceb5f commit 4f3afa9

20 files changed

+73
-35
lines changed

examples/database/db_systems/db_exacs/resources.tf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,36 @@ resource "oci_database_db_home" "test_db_home_vm_cluster" {
8686
is_unified_auditing_enabled = "true"
8787
}
8888

89+
resource "oci_database_db_home" "test_aws_s3_db_home_vm_cluster" {
90+
vm_cluster_id = oci_database_cloud_vm_cluster.test_cloud_vm_cluster.id
91+
92+
database {
93+
admin_password = "BEstrO0ng_#11"
94+
db_name = "dbVMAWS"
95+
character_set = "AL32UTF8"
96+
ncharacter_set = "AL16UTF16"
97+
db_workload = "OLTP"
98+
pdb_name = "pdbName"
99+
db_backup_config {
100+
auto_backup_enabled = "true"
101+
auto_backup_window = "SLOT_TWO"
102+
backup_deletion_policy = "DELETE_IMMEDIATELY"
103+
backup_destination_details {
104+
type = "AWS_S3"
105+
}
106+
}
107+
freeform_tags = {
108+
"Department" = "Finance"
109+
}
110+
}
111+
112+
# VM_CLUSTER_BACKUP can also be specified as a source for cloud VM clusters.
113+
source = "VM_CLUSTER_NEW"
114+
db_version = "19.0.0.0"
115+
display_name = "createdDbHomeAWS"
116+
is_unified_auditing_enabled = "true"
117+
}
118+
89119
resource "oci_database_db_home" "test_dbrs_db_home_vm_cluster" {
90120
vm_cluster_id = oci_database_cloud_vm_cluster.test_cloud_vm_cluster.id
91121

internal/integrationtest/database_database_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -501,7 +501,7 @@ var (
501501
}
502502

503503
DatabaseDatabaseDatabaseDbBackupConfigDbrsBackupDestinationDetailsRepresentation = map[string]interface{}{
504-
"type": acctest.Representation{RepType: acctest.Optional, Create: `AWS`, Update: `OBJECT_STORE`},
504+
"type": acctest.Representation{RepType: acctest.Optional, Create: `AWS_S3`, Update: `OBJECT_STORE`},
505505
}
506506

507507
databaseDatabaseDbBackupConfigRepresentation = map[string]interface{}{
@@ -870,7 +870,7 @@ func TestDatabaseDatabaseResource_update(t *testing.T) {
870870
resource.TestCheckResourceAttr(resourceName, "database.0.db_backup_config.0.recovery_window_in_days", "10"),
871871
resource.TestCheckResourceAttr(resourceName, "database.0.db_backup_config.0.run_immediate_full_backup", "false"),
872872
resource.TestCheckResourceAttr(resourceName, "database.0.db_backup_config.0.backup_deletion_policy", "DELETE_IMMEDIATELY"),
873-
resource.TestCheckResourceAttr(resourceName, "database.0.db_backup_config.0.backup_destination_details.0.type", "AWS"),
873+
resource.TestCheckResourceAttr(resourceName, "database.0.db_backup_config.0.backup_destination_details.0.type", "AWS_S3"),
874874
resource.TestCheckResourceAttr(resourceName, "database.0.db_name", "myTestDb"),
875875
resource.TestCheckResourceAttrSet(resourceName, "database.0.db_unique_name"),
876876
resource.TestCheckResourceAttr(resourceName, "database.0.db_workload", "OLTP"),

internal/service/database/database_database_resource.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,14 @@ func DatabaseDatabaseResource() *schema.Resource {
163163
ForceNew: true,
164164
},
165165
"type": {
166-
Type: schema.TypeString,
167-
Optional: true,
166+
Type: schema.TypeString,
167+
Optional: true,
168+
DiffSuppressFunc: tfresource.EqualIgnoreCaseSuppressDiff,
169+
ValidateFunc: validation.StringInSlice([]string{
170+
string(oci_database.BackupBackupDestinationTypeAwsS3),
171+
string(oci_database.BackupBackupDestinationTypeDbrs),
172+
string(oci_database.BackupBackupDestinationTypeObjectStore),
173+
}, true),
168174
},
169175
"vpc_user": {
170176
Type: schema.TypeString,

website/docs/d/database_autonomous_container_database.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ The following attributes are exported:
116116
* `infrastructure_type` - The infrastructure type this resource belongs to.
117117
* `is_data_guard_enabled` - **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
118118
* `is_dst_file_update_enabled` - Indicates if an automatic DST Time Zone file update is enabled for the Autonomous Container Database. If enabled along with Release Update, patching will be done in a Non-Rolling manner.
119-
* `is_multiple_standby` - Whether it is multiple standby Autonomous Dataguard
119+
* `is_multiple_standby` - Indicates if it is multiple standby Autonomous Dataguard
120120
* `key_history_entry` - Key History Entry.
121121
* `id` - The id of the Autonomous Database [Vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts) service key management history entry.
122122
* `kms_key_version_id` - The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.

website/docs/d/database_autonomous_container_database_dataguard_association.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_database_autonomous_container_database_dataguard_association
1111
This data source provides details about a specific Autonomous Container Database Dataguard Association resource in Oracle Cloud Infrastructure Database service.
1212

13-
Gets an Autonomous Container Database enabled with Autonomous Data Guard associated with the specified Autonomous Container Database.
13+
**Deprecated.** Use the [GetAutonomousContainerDatabase](https://docs.cloud.oracle.com/iaas/api/#/en/database/latest/AutonomousContainerDatabase/GetAutonomousContainerDatabase) operation to get the details of an Autonomous Container Database (ACD) enabled with Autonomous Data Guard associated with the specified ACD.
1414

1515

1616
## Example Usage

website/docs/d/database_autonomous_container_database_dataguard_associations.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_database_autonomous_container_database_dataguard_associations
1111
This data source provides the list of Autonomous Container Database Dataguard Associations in Oracle Cloud Infrastructure Database service.
1212

13-
Gets a list of the Autonomous Container Databases with Autonomous Data Guard-enabled associated with the specified Autonomous Container Database.
13+
**Deprecated.** Use the [ListAutonomousContainerDatabases](https://docs.cloud.oracle.com/iaas/api/#/en/database/latest/AutonomousContainerDatabase/ListAutonomousContainerDatabases) operation to get a list of the Autonomous Container Databases (ACDs)with Autonomous Data Guard-enabled associated with the specified ACD.
1414

1515

1616
## Example Usage

website/docs/d/database_autonomous_container_databases.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ The following attributes are exported:
141141
* `infrastructure_type` - The infrastructure type this resource belongs to.
142142
* `is_data_guard_enabled` - **Deprecated.** Indicates whether the Autonomous Database has local (in-region) Data Guard enabled. Not applicable to cross-region Autonomous Data Guard associations, or to Autonomous Databases using dedicated Exadata infrastructure or Exadata Cloud@Customer infrastructure.
143143
* `is_dst_file_update_enabled` - Indicates if an automatic DST Time Zone file update is enabled for the Autonomous Container Database. If enabled along with Release Update, patching will be done in a Non-Rolling manner.
144-
* `is_multiple_standby` - Whether it is multiple standby Autonomous Dataguard
144+
* `is_multiple_standby` - Indicates if it is multiple standby Autonomous Dataguard
145145
* `key_history_entry` - Key History Entry.
146146
* `id` - The id of the Autonomous Database [Vault](https://docs.cloud.oracle.com/iaas/Content/KeyManagement/Concepts/keyoverview.htm#concepts) service key management history entry.
147147
* `kms_key_version_id` - The OCID of the key container version that is used in database transparent data encryption (TDE) operations KMS Key can have multiple key versions. If none is specified, the current key version (latest) of the Key Id is used for the operation. Autonomous Database Serverless does not use key versions, hence is not applicable for Autonomous Database Serverless instances.

website/docs/d/database_autonomous_database_dataguard_associations.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ description: |-
1010
# Data Source: oci_database_autonomous_database_dataguard_associations
1111
This data source provides the list of Autonomous Database Dataguard Associations in Oracle Cloud Infrastructure Database service.
1212

13-
Gets a list of the Autonomous Data Guard-enabled databases associated with the specified Autonomous Database.
13+
*Deprecated.* Use the [GetAutonomousContainerDatabase](https://docs.cloud.oracle.com/iaas/api/#/en/database/latest/AutonomousContainerDatabase/GetAutonomousContainerDatabase) operation to get a list of the Autonomous Data Guard-enabled databases associated with the specified Autonomous Database.
1414

1515

1616
## Example Usage

website/docs/d/database_autonomous_vm_cluster.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ The following attributes are exported:
6969
* `preference` - The maintenance window scheduling preference.
7070
* `weeks_of_month` - Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed.
7171
* `max_acds_lowest_scaled_value` - The lowest value to which maximum number of ACDs can be scaled down.
72-
* `memory_per_oracle_compute_unit_in_gbs` - The amount of memory (in GBs) to be enabled per OCPU or ECPU.
72+
* `memory_per_oracle_compute_unit_in_gbs` - The amount of memory (in GBs) to be enabled per OCPU or ECPU.
7373
* `memory_size_in_gbs` - The memory allocated in GBs.
7474
* `next_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
7575
* `node_count` - The number of nodes in the Autonomous VM Cluster.

website/docs/d/database_autonomous_vm_clusters.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ The following attributes are exported:
8383
* `preference` - The maintenance window scheduling preference.
8484
* `weeks_of_month` - Weeks during the month when maintenance should be performed. Weeks start on the 1st, 8th, 15th, and 22nd days of the month, and have a duration of 7 days. Weeks start and end based on calendar dates, not days of the week. For example, to allow maintenance during the 2nd week of the month (from the 8th day to the 14th day of the month), use the value 2. Maintenance cannot be scheduled for the fifth week of months that contain more than 28 days. Note that this parameter works in conjunction with the daysOfWeek and hoursOfDay parameters to allow you to specify specific days of the week and hours that maintenance will be performed.
8585
* `max_acds_lowest_scaled_value` - The lowest value to which maximum number of ACDs can be scaled down.
86-
* `memory_per_oracle_compute_unit_in_gbs` - The amount of memory (in GBs) to be enabled per OCPU or ECPU.
86+
* `memory_per_oracle_compute_unit_in_gbs` - The amount of memory (in GBs) to be enabled per OCPU or ECPU.
8787
* `memory_size_in_gbs` - The memory allocated in GBs.
8888
* `next_maintenance_run_id` - The [OCID](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm) of the next maintenance run.
8989
* `node_count` - The number of nodes in the Autonomous VM Cluster.

0 commit comments

Comments
 (0)