Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions examples/odb/autonomous_vm_cluster.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.

//Autonomous VM Cluster with default maintenance window
resource "aws_odb_cloud_autonomous_vm_cluster" "test" {
cloud_exadata_infrastructure_id = "<exadata_infra_id>" //refer your exadata infra id
odb_network_id = "<odb_net_id>" //refer_your_odb_net_id
display_name = "Ofake-avmc-my_avmc"
autonomous_data_storage_size_in_tbs = 5
memory_per_oracle_compute_unit_in_gbs = 2
total_container_databases = 1
cpu_core_count_per_node = 40
license_model = "LICENSE_INCLUDED"
db_servers = [] //ids of db server. refer your exa infra
scan_listener_port_tls = 8561
scan_listener_port_non_tls = 1024
maintenance_window = {
preference = "NO_PREFERENCE"
days_of_week = []
hours_of_day = []
months = []
weeks_of_month =[]
lead_time_in_weeks = 0
}

}
30 changes: 30 additions & 0 deletions examples/odb/exadata_infra.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.

//Exadata Infrastructure with customer managed maintenance window
resource "aws_odb_cloud_exadata_infrastructure" "test" {
display_name = "Ofake_odb_exadata_infra" //Required Field
shape = "Exadata.X11M" //Required Field
storage_count = 3
compute_count = 2
availability_zone_id = "use1-az6" //Required Field
customer_contacts_to_send_to_oci = ["abc@example.com"]
database_server_type = "X11M"
storage_server_type = "X11M-HC"
maintenance_window = { //Required
custom_action_timeout_in_mins = 16
days_of_week = ["MONDAY", "TUESDAY"]
hours_of_day = [11, 16]
is_custom_action_timeout_enabled = true
lead_time_in_weeks = 3
months = ["FEBRUARY", "MAY", "AUGUST", "NOVEMBER"]
patching_mode = "ROLLING"
preference = "CUSTOM_PREFERENCE"
weeks_of_month = [2, 4]
}
tags = {
"env" = "dev"
}

}

//Exadata Infrastructure with default maintenance window
78 changes: 7 additions & 71 deletions examples/odb/main.tf
Original file line number Diff line number Diff line change
@@ -1,74 +1,10 @@
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.

provider "aws" {
region = "us-east-1"
}

resource "aws_odb_cloud_exadata_infrastructure" "test" {
display_name = "Ofake-exa-4157426154220451194"
shape = "Exadata.X9M"
storage_count = 3
compute_count = 2
availability_zone_id = "use1-az6"
customer_contacts_to_send_to_oci = ["abc@example.com"]
maintenance_window = {
custom_action_timeout_in_mins = 16
days_of_week = []
hours_of_day = []
is_custom_action_timeout_enabled = true
lead_time_in_weeks = 0
months = []
patching_mode = "ROLLING"
preference = "NO_PREFERENCE"
weeks_of_month =[]
terraform {
required_version = ">= 0.15.3"
required_providers {
aws = {
source = "hashicorp/aws"
version = "3.50.0"
}
}
}






resource "aws_odb_network" "test" {
display_name = "odb-net-6310376148776971562"
availability_zone_id = "use1-az6"
client_subnet_cidr = "10.2.0.0/24"
backup_subnet_cidr = "10.2.1.0/24"
s3_access = "DISABLED"
zero_etl_access = "DISABLED"
}



data "aws_odb_db_servers_list" "test" {
cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id
}

resource "aws_odb_cloud_autonomous_vm_cluster" "test" {
cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id
odb_network_id =aws_odb_network.test.id
display_name = "Ofake-avmc-1515523754357569237"
autonomous_data_storage_size_in_tbs = 5
memory_per_oracle_compute_unit_in_gbs = 2
total_container_databases = 1
cpu_core_count_per_node = 40
license_model = "LICENSE_INCLUDED"
db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id]
scan_listener_port_tls = 8561
scan_listener_port_non_tls = 1024
maintenance_window = {
preference = "NO_PREFERENCE"
days_of_week = []
hours_of_day = []
months = []
weeks_of_month =[]
lead_time_in_weeks = 0
}

}


data "aws_odb_cloud_autonomous_vm_cluster" "test" {
id = aws_odb_cloud_autonomous_vm_cluster.test.id

}
27 changes: 27 additions & 0 deletions examples/odb/odb_network.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.

//odb network without managed service
resource "aws_odb_network" "test" {
display_name = "odb-my-net"
availability_zone_id = "use1-az6"
client_subnet_cidr = "10.2.0.0/24"
backup_subnet_cidr = "10.2.1.0/24"
s3_access = "DISABLED"
zero_etl_access = "DISABLED"
tags = {
"env" = "dev"
}
}

//odb network with managed service
resource "aws_odb_network" "test" {
display_name = "odb-my-net"
availability_zone_id = "use1-az6"
client_subnet_cidr = "10.2.0.0/24"
backup_subnet_cidr = "10.2.1.0/24"
s3_access = "ENABLED"
zero_etl_access = "ENABLED"
tags = {
"env" = "dev"
}
}
7 changes: 7 additions & 0 deletions examples/odb/odb_network_peering.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.

resource "aws_odb_network_peering_connection" "test" {
display_name = "my_odb_net_peering"
odb_network_id = aws_odb_network.test.id
peer_network_id = "vpc_id"
}
1 change: 0 additions & 1 deletion examples/odb/variables.tf

This file was deleted.

21 changes: 21 additions & 0 deletions examples/odb/vm_cluster.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.

resource "aws_odb_cloud_vm_cluster" "vmcluster" {
display_name = "Ofake_my_vmc"
cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id
cpu_core_count = 6
gi_version = "23.0.0.0"
hostname_prefix = "apollo12"
ssh_public_keys = [""] //public ssh keys
odb_network_id = aws_odb_network.test.id
is_local_backup_enabled = true
is_sparse_diskgroup_enabled = true
license_model = "LICENSE_INCLUDED"
data_storage_size_in_tbs = 20.0
db_servers = [""] //db-servers
db_node_storage_size_in_gbs = 120.0
memory_size_in_gbs = 60
tags = {
"env" = "dev"
}
}
Loading