Skip to content

Commit 6acec0d

Browse files
authored
Merge pull request #4 from oracle-community/aws-odb-3
Aws odb 3
2 parents 0a129fd + ab50b3f commit 6acec0d

16 files changed

+864
-253
lines changed
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
2+
3+
//Autonomous VM Cluster with default maintenance window
4+
resource "aws_odb_cloud_autonomous_vm_cluster" "test" {
5+
cloud_exadata_infrastructure_id = "<exadata_infra_id>" //refer your exadata infra id
6+
odb_network_id = "<odb_net_id>" //refer_your_odb_net_id
7+
display_name = "Ofake-avmc-my_avmc"
8+
autonomous_data_storage_size_in_tbs = 5
9+
memory_per_oracle_compute_unit_in_gbs = 2
10+
total_container_databases = 1
11+
cpu_core_count_per_node = 40
12+
license_model = "LICENSE_INCLUDED"
13+
db_servers = [] //ids of db server. refer your exa infra
14+
scan_listener_port_tls = 8561
15+
scan_listener_port_non_tls = 1024
16+
maintenance_window = {
17+
preference = "NO_PREFERENCE"
18+
days_of_week = []
19+
hours_of_day = []
20+
months = []
21+
weeks_of_month =[]
22+
lead_time_in_weeks = 0
23+
}
24+
25+
}

examples/odb/exadata_infra.tf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
2+
3+
//Exadata Infrastructure with customer managed maintenance window
4+
resource "aws_odb_cloud_exadata_infrastructure" "test" {
5+
display_name = "Ofake_odb_exadata_infra" //Required Field
6+
shape = "Exadata.X11M" //Required Field
7+
storage_count = 3
8+
compute_count = 2
9+
availability_zone_id = "use1-az6" //Required Field
10+
customer_contacts_to_send_to_oci = ["[email protected]"]
11+
database_server_type = "X11M"
12+
storage_server_type = "X11M-HC"
13+
maintenance_window = { //Required
14+
custom_action_timeout_in_mins = 16
15+
days_of_week = ["MONDAY", "TUESDAY"]
16+
hours_of_day = [11, 16]
17+
is_custom_action_timeout_enabled = true
18+
lead_time_in_weeks = 3
19+
months = ["FEBRUARY", "MAY", "AUGUST", "NOVEMBER"]
20+
patching_mode = "ROLLING"
21+
preference = "CUSTOM_PREFERENCE"
22+
weeks_of_month = [2, 4]
23+
}
24+
tags = {
25+
"env" = "dev"
26+
}
27+
28+
}
29+
30+
//Exadata Infrastructure with default maintenance window

examples/odb/main.tf

Lines changed: 7 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,10 @@
11
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
2-
3-
provider "aws" {
4-
region = "us-east-1"
5-
}
6-
7-
resource "aws_odb_cloud_exadata_infrastructure" "test" {
8-
display_name = "Ofake-exa-4157426154220451194"
9-
shape = "Exadata.X9M"
10-
storage_count = 3
11-
compute_count = 2
12-
availability_zone_id = "use1-az6"
13-
customer_contacts_to_send_to_oci = ["[email protected]"]
14-
maintenance_window = {
15-
custom_action_timeout_in_mins = 16
16-
days_of_week = []
17-
hours_of_day = []
18-
is_custom_action_timeout_enabled = true
19-
lead_time_in_weeks = 0
20-
months = []
21-
patching_mode = "ROLLING"
22-
preference = "NO_PREFERENCE"
23-
weeks_of_month =[]
2+
terraform {
3+
required_version = ">= 0.15.3"
4+
required_providers {
5+
aws = {
6+
source = "hashicorp/aws"
7+
version = "3.50.0"
8+
}
249
}
25-
}
26-
27-
28-
29-
30-
31-
32-
resource "aws_odb_network" "test" {
33-
display_name = "odb-net-6310376148776971562"
34-
availability_zone_id = "use1-az6"
35-
client_subnet_cidr = "10.2.0.0/24"
36-
backup_subnet_cidr = "10.2.1.0/24"
37-
s3_access = "DISABLED"
38-
zero_etl_access = "DISABLED"
39-
}
40-
41-
42-
43-
data "aws_odb_db_servers_list" "test" {
44-
cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id
45-
}
46-
47-
resource "aws_odb_cloud_autonomous_vm_cluster" "test" {
48-
cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id
49-
odb_network_id =aws_odb_network.test.id
50-
display_name = "Ofake-avmc-1515523754357569237"
51-
autonomous_data_storage_size_in_tbs = 5
52-
memory_per_oracle_compute_unit_in_gbs = 2
53-
total_container_databases = 1
54-
cpu_core_count_per_node = 40
55-
license_model = "LICENSE_INCLUDED"
56-
db_servers = [ for db_server in data.aws_odb_db_servers_list.test.db_servers : db_server.id]
57-
scan_listener_port_tls = 8561
58-
scan_listener_port_non_tls = 1024
59-
maintenance_window = {
60-
preference = "NO_PREFERENCE"
61-
days_of_week = []
62-
hours_of_day = []
63-
months = []
64-
weeks_of_month =[]
65-
lead_time_in_weeks = 0
66-
}
67-
68-
}
69-
70-
71-
data "aws_odb_cloud_autonomous_vm_cluster" "test" {
72-
id = aws_odb_cloud_autonomous_vm_cluster.test.id
73-
7410
}

examples/odb/odb_network.tf

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
2+
3+
//odb network without managed service
4+
resource "aws_odb_network" "test" {
5+
display_name = "odb-my-net"
6+
availability_zone_id = "use1-az6"
7+
client_subnet_cidr = "10.2.0.0/24"
8+
backup_subnet_cidr = "10.2.1.0/24"
9+
s3_access = "DISABLED"
10+
zero_etl_access = "DISABLED"
11+
tags = {
12+
"env" = "dev"
13+
}
14+
}
15+
16+
//odb network with managed service
17+
resource "aws_odb_network" "test" {
18+
display_name = "odb-my-net"
19+
availability_zone_id = "use1-az6"
20+
client_subnet_cidr = "10.2.0.0/24"
21+
backup_subnet_cidr = "10.2.1.0/24"
22+
s3_access = "ENABLED"
23+
zero_etl_access = "ENABLED"
24+
tags = {
25+
"env" = "dev"
26+
}
27+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
2+
3+
resource "aws_odb_network_peering_connection" "test" {
4+
display_name = "my_odb_net_peering"
5+
odb_network_id = aws_odb_network.test.id
6+
peer_network_id = "vpc_id"
7+
}

examples/odb/variables.tf

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/odb/vm_cluster.tf

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
//Copyright © 2025, Oracle and/or its affiliates. All rights reserved.
2+
3+
resource "aws_odb_cloud_vm_cluster" "vmcluster" {
4+
display_name = "Ofake_my_vmc"
5+
cloud_exadata_infrastructure_id = aws_odb_cloud_exadata_infrastructure.test.id
6+
cpu_core_count = 6
7+
gi_version = "23.0.0.0"
8+
hostname_prefix = "apollo12"
9+
ssh_public_keys = [""] //public ssh keys
10+
odb_network_id = aws_odb_network.test.id
11+
is_local_backup_enabled = true
12+
is_sparse_diskgroup_enabled = true
13+
license_model = "LICENSE_INCLUDED"
14+
data_storage_size_in_tbs = 20.0
15+
db_servers = [""] //db-servers
16+
db_node_storage_size_in_gbs = 120.0
17+
memory_size_in_gbs = 60
18+
tags = {
19+
"env" = "dev"
20+
}
21+
}

0 commit comments

Comments
 (0)