|
| 1 | +# oci_database_autonomous_database |
| 2 | + |
| 3 | +## AutonomousDatabase Resource |
| 4 | + |
| 5 | +### AutonomousDatabase Reference |
| 6 | + |
| 7 | +The following attributes are exported: |
| 8 | + |
| 9 | +* `compartment_id` - The OCID of the compartment. |
| 10 | +* `connection_strings` - The connection string used to connect to the Autonomous Database. The username for the Service Console is ADMIN. Use the password you entered when creating the Autonomous Database for the password value. |
| 11 | + * `high` - The High database service provides the highest level of resources to each SQL statement resulting in the highest performance, but supports the fewest number of concurrent SQL statements. |
| 12 | + * `low` - The Low database service provides the least level of resources to each SQL statement, but supports the most number of concurrent SQL statements. |
| 13 | + * `medium` - The Medium database service provides a lower level of resources to each SQL statement potentially resulting a lower level of performance, but supports more concurrent SQL statements. |
| 14 | +* `cpu_core_count` - The number of CPU cores to be made available to the database. |
| 15 | +* `data_storage_size_in_tbs` - The quantity of data in the database, in terabytes. |
| 16 | +* `db_name` - The database name. |
| 17 | +* `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"}` |
| 18 | +* `display_name` - The user-friendly name for the Autonomous Database. The name does not have to be unique. |
| 19 | +* `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"}` |
| 20 | +* `id` - The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the Autonomous Database. |
| 21 | +* `license_model` - The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE. |
| 22 | +* `lifecycle_details` - Additional information about the current lifecycle state. |
| 23 | +* `service_console_url` - The URL of the Service Console for the Autonomous Database. |
| 24 | +* `state` - The current state of the database. |
| 25 | +* `time_created` - The date and time the database was created. |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | +### Create Operation |
| 30 | +Creates a new Autonomous Database. |
| 31 | + |
| 32 | + |
| 33 | +The following arguments are supported: |
| 34 | + |
| 35 | +* `admin_password` - (Required) A strong password for Admin. The password must be between 12 and 60 characters long, and must contain at least 1 uppercase, 1 lowercase and 2 numeric characters. It cannot contain the double quote symbol ("). It must be different than the last 4 passwords. |
| 36 | +* `compartment_id` - (Required) The Oracle Cloud ID (OCID) of the compartment of the DB system. |
| 37 | +* `cpu_core_count` - (Required) The number of CPU Cores to be made available to the database. |
| 38 | +* `data_storage_size_in_tbs` - (Required) Size, in terabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed. |
| 39 | +* `db_name` - (Required) The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. |
| 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) The user-friendly name for the Autonomous Database. The name does not have to be unique. |
| 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 | +* `license_model` - (Optional) The Oracle license model that applies to the Oracle Autonomous Database. The default is BRING_YOUR_OWN_LICENSE. |
| 44 | + |
| 45 | + |
| 46 | +### Update Operation |
| 47 | +Updates the specified Autonomous Database with a new CPU core count and size. |
| 48 | + |
| 49 | + |
| 50 | +The following arguments support updates: |
| 51 | +* `admin_password` - A strong password for Admin. The password must be between 12 and 60 characters long, and must contain at least 1 uppercase, 1 lowercase and 2 numeric characters. It cannot contain the double quote symbol ("). It must be different than the last 4 passwords. |
| 52 | +* `cpu_core_count` - The number of CPU Cores to be made available to the database. |
| 53 | +* `data_storage_size_in_tbs` - Size, in terabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed. |
| 54 | +* `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"}` |
| 55 | +* `display_name` - The user-friendly name for the Autonomous Database. The name does not have to be unique. |
| 56 | +* `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"}` |
| 57 | + |
| 58 | + |
| 59 | +** IMPORTANT ** |
| 60 | +Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values |
| 61 | + |
| 62 | +### Example Usage |
| 63 | + |
| 64 | +```hcl |
| 65 | +resource "oci_database_autonomous_database" "test_autonomous_database" { |
| 66 | + #Required |
| 67 | + admin_password = "${var.autonomous_database_admin_password}" |
| 68 | + compartment_id = "${var.compartment_id}" |
| 69 | + cpu_core_count = "${var.autonomous_database_cpu_core_count}" |
| 70 | + data_storage_size_in_tbs = "${var.autonomous_database_data_storage_size_in_tbs}" |
| 71 | + db_name = "${var.autonomous_database_db_name}" |
| 72 | +
|
| 73 | + #Optional |
| 74 | + defined_tags = {"Operations.CostCenter"= "42"} |
| 75 | + display_name = "${var.autonomous_database_display_name}" |
| 76 | + freeform_tags = {"Department"= "Finance"} |
| 77 | + license_model = "${var.autonomous_database_license_model}" |
| 78 | +} |
| 79 | +``` |
| 80 | + |
| 81 | + |
| 82 | +## AutonomousDatabase Singular DataSource |
| 83 | + |
| 84 | + |
| 85 | +### Get Operation |
| 86 | +Gets the details of the specified Autonomous Database. |
| 87 | + |
| 88 | + |
| 89 | +The following arguments are supported: |
| 90 | + |
| 91 | +* `autonomous_database_id` - (Required) The database [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). |
| 92 | + |
| 93 | + |
| 94 | +### Example Usage |
| 95 | + |
| 96 | +```hcl |
| 97 | +data "oci_database_autonomous_database" "test_autonomous_database" { |
| 98 | + #Required |
| 99 | + autonomous_database_id = "${var.autonomous_database_autonomous_database_id}" |
| 100 | +} |
| 101 | +``` |
| 102 | +# oci_database_autonomous_databases |
| 103 | + |
| 104 | +## AutonomousDatabase DataSource |
| 105 | + |
| 106 | +Gets a list of autonomous_databases. |
| 107 | + |
| 108 | +### List Operation |
| 109 | +Gets a list of Autonomous Databases. |
| 110 | + |
| 111 | +The following arguments are supported: |
| 112 | + |
| 113 | +* `compartment_id` - (Required) The compartment [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm). |
| 114 | +* `display_name` - (Optional) A filter to return only resources that match the entire display name given. The match is not case sensitive. |
| 115 | +* `state` - (Optional) A filter to return only resources that match the given lifecycle state exactly. |
| 116 | + |
| 117 | + |
| 118 | +The following attributes are exported: |
| 119 | + |
| 120 | +* `autonomous_databases` - The list of autonomous_databases. |
| 121 | + |
| 122 | +### Example Usage |
| 123 | + |
| 124 | +```hcl |
| 125 | +data "oci_database_autonomous_databases" "test_autonomous_databases" { |
| 126 | + #Required |
| 127 | + compartment_id = "${var.compartment_id}" |
| 128 | +
|
| 129 | + #Optional |
| 130 | + display_name = "${var.autonomous_database_display_name}" |
| 131 | + state = "${var.autonomous_database_state}" |
| 132 | +} |
| 133 | +``` |
0 commit comments