oci_database_cloud_database_management
This resource provides the Database Management resource in Oracle Cloud Infrastructure Database service.
Enable / Update / Disable database management for the specified Oracle Database instance.
Database Management requires USER_NAME
, PASSWORD_SECRET_ID
and PRIVATE_END_POINT_ID
.
database.0.database_management_config
is updated to appropriate managementType and managementStatus for the specified Oracle Database instance.
Example Usage
resource "oci_database_cloud_database_management" "test" {
database_id = oci_database_database.test_database.id
management_type = var.database_cloud_database_management_details_management_type
private_end_point_id = var.database_cloud_database_management_details_private_end_point_id
service_name = var.database_cloud_database_management_details_service_name
credentialdetails {
user_name = var.database_cloud_database_management_details_user_name
password_secret_id = var.database_cloud_database_management_details_password_secret_id
}
enable_management = var.database_cloud_database_management_details_enable_management
port = var.cloud_database_management_port
protocol = var.cloud_database_management_protocol
role = var.cloud_database_management_role
ssl_secret_id = oci_vault_secret.test_secret.id
}
Argument Reference
The following arguments are supported:
database_id
- (Required) The database OCID.port
- (Optional) The port used to connect to the database.protocol
- (Optional) Protocol used by the database connection.role
- (Optional) The role of the user that will be connecting to the database.ssl_secret_id
- (Optional) The OCID of the Oracle Cloud Infrastructure secret.private_end_point_id
- (Required) The OCID of the private endpoint.service_name
- (Required) The name of the Oracle Database service that will be used to connect to the database.management_type
- (Required) (Updatable) Specifies database management type enum:BASIC
ADVANCED
credentaildetails
- (Required) (Updatable) Credential details to connect to the databaseuser_name
- Database usernamepassword_secret_id
- Specific database username’s password OCID.
enable_management
- (Required) (Updatable) Use this flag to enable/disable database management
** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values
Attributes Reference
The following attributes are exported:
character_set
- The character set for the database.compartment_id
- The OCID of the compartment.connection_strings
- The Connection strings used to connect to the Oracle Database.all_connection_strings
- All connection strings to use to connect to the Database.cdb_default
- Host name based CDB Connection String.cdb_ip_default
- IP based CDB Connection String.
database_management_config
- The configuration of the Database Management service.management_status
- The status of the Database Management service.management_type
- The Database Management type.
database_software_image_id
- The database software image OCIDdb_backup_config
- Backup Options To use any of the API operations, you must be authorized in an IAM policy. If you’re not authorized, talk to an administrator. If you’re an administrator who needs to write policies to give users access, see Getting Started with Policies.auto_backup_enabled
- If set to true, configures automatic backups. If you previously used RMAN or dbcli to configure backups and then you switch to using the Console or the API for backups, a new backup configuration is created and associated with your database. This means that you can no longer rely on your previously configured unmanaged backups to work.auto_backup_window
- Time window selected for initiating automatic backup for the database system. There are twelve available two-hour time windows. If no option is selected, a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). Example:SLOT_TWO
auto_full_backup_day
- Day of the week the full backup should be applied on the database system. If no option is selected, the value is null and we will default to Sunday.auto_full_backup_window
- Time window selected for initiating full backup for the database system. There are twelve available two-hour time windows. If no option is selected, the value is null and a start time between 12:00 AM to 7:00 AM in the region of the database is automatically chosen. For example, if the user selects SLOT_TWO from the enum list, the automatic backup job will start in between 2:00 AM (inclusive) to 4:00 AM (exclusive). Example:SLOT_TWO
backup_deletion_policy
- This defines when the backups will be deleted. - IMMEDIATE option keep the backup for predefined time i.e 72 hours and then delete permanently… - RETAIN will keep the backups as per the policy defined for database backups.backup_destination_details
- Backup destination details.dbrs_policy_id
- The OCID of the DBRS policy used for backup.id
- The OCID of the backup destination.internet_proxy
- Proxy URL to connect to object store.type
- Type of the database backup destination.vpc_password
- For a RECOVERY_APPLIANCE backup destination, the password for the VPC user that is used to access the Recovery Appliance.vpc_user
- For a RECOVERY_APPLIANCE backup destination, the Virtual Private Catalog (VPC) user that is used to access the Recovery Appliance.
recovery_window_in_days
- Number of days between the current and the earliest point of recoverability covered by automatic backups. This value applies to automatic backups only. After a new automatic backup has been created, Oracle removes old automatic backups that are created before the window. When the value is updated, it is applied to all existing automatic backups.run_immediate_full_backup
- If set to true, configures automatic full backups in the local region (the region of the DB system) for the first backup run immediately.
db_home_id
- The OCID of the Database Home.db_name
- The database name.db_system_id
- The OCID of the DB system.db_unique_name
- A system-generated name for the database to ensure uniqueness within an Oracle Data Guard group (a primary database and its standby databases). The unique name cannot be changed.db_workload
- Deprecated. The dbWorkload field has been deprecated for Exadata Database Service on Dedicated Infrastructure, Exadata Database Service on Cloud@Customer, and Base Database Service. Support for this attribute will end in November 2023. You may choose to update your custom scripts to exclude the dbWorkload attribute. After November 2023 if you pass a value to the dbWorkload attribute, it will be ignored.The database workload type.
defined_tags
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.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. Example:{"Department": "Finance"}
id
- The OCID of the database.is_cdb
- True if the database is a container database.key_store_id
- The OCID of the key store of Oracle Vault.key_store_wallet_name
- The wallet name for Oracle Key Vault.kms_key_id
- The OCID of the key container that is used as the master encryption key in database transparent data encryption (TDE) operations.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.last_backup_duration_in_seconds
- The duration when the latest database backup created.last_backup_timestamp
- The date and time when the latest database backup was created.last_failed_backup_timestamp
- The date and time when the latest database backup failed.lifecycle_details
- Additional information about the current lifecycle state.ncharacter_set
- The national character set for the database.pdb_name
- The name of the pluggable database. The name must begin with an alphabetic character and can contain a maximum of thirty alphanumeric characters. Special characters are not permitted. Pluggable database should not be same as database name.sid_prefix
- Specifies a prefix for theOracle SID
of the database to be created.source_database_point_in_time_recovery_timestamp
- Point in time recovery timeStamp of the source database at which cloned database system is cloned from the source database system, as described in RFC 3339state
- The current state of the database.time_created
- The date and time the database was created.vault_id
- The OCID of the Oracle Cloud Infrastructure vault. This parameter andsecretId
are required for Customer Managed Keys.vm_cluster_id
- The OCID of the VM cluster.
Timeouts
The timeouts
block allows you to specify timeouts for certain operations:
* create
- (Defaults to 20 minutes), when creating the Cloud Database Management
* update
- (Defaults to 20 minutes), when updating the Cloud Database Management
* delete
- (Defaults to 20 minutes), when destroying the Cloud Database Management
Import
Import is not supported for this resource.