This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +33
-13
lines changed Expand file tree Collapse file tree 3 files changed +33
-13
lines changed Original file line number Diff line number Diff line change 1
1
resource "oci_database_autonomous_database" "apex_instance" {
2
- # Required
3
- compartment_id = var. compartment_ocid
4
- cpu_core_count = 1
5
- db_name = " Apex"
6
- data_storage_size_in_tbs = 1
7
- license_model = " LICENSE_INCLUDED"
8
- # Optional
9
- admin_password = var. autonomous_database_admin_password
10
-
11
- db_workload = " APEX"
12
-
13
- }
2
+ compartment_id = var. compartment_ocid
3
+ cpu_core_count = 1
4
+ db_name = " apex${ random_string . deploy_id . result } "
5
+ data_storage_size_in_tbs = 1
6
+ license_model = " LICENSE_INCLUDED"
7
+ admin_password = var. autonomous_database_admin_password
8
+
9
+ db_workload = " APEX"
10
+
11
+ }
12
+
13
+ resource "random_string" "deploy_id" {
14
+ length = 4
15
+ special = false
16
+ }
Original file line number Diff line number Diff line change
1
+
2
+ terraform {
3
+ required_providers {
4
+
5
+ oci = {
6
+ source = " hashicorp/oci"
7
+ }
8
+ random = {
9
+ source = " hashicorp/random"
10
+ }
11
+
12
+ }
13
+ required_version = " >= 0.14"
14
+ }
15
+
1
16
provider "oci" {
2
17
tenancy_ocid = var. tenancy_ocid
3
18
region = var. region
Original file line number Diff line number Diff line change 1
1
variable "tenancy_ocid" {}
2
- variable "compartment_ocid" {}
3
2
variable "region" {}
3
+
4
4
variable "fingerprint" {}
5
5
variable "private_key_path" {}
6
6
variable "user_ocid" {}
7
7
8
+ variable "compartment_ocid" {}
9
+
8
10
9
11
variable "autonomous_database_admin_password" {
10
12
description = " Password for Apex Admin user."
You can’t perform that action at this time.
0 commit comments