Skip to content

Commit 0ead5b9

Browse files
authored
Releasing version v5.7.0
2 parents ba43519 + 7e85cdc commit 0ead5b9

File tree

276 files changed

+11120
-91
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

276 files changed

+11120
-91
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {
9+
default = "us-ashburn-1"
10+
}
11+
variable "compartment_ocid" {}
12+
13+
variable "cluster_start_credential_rotation_management_auto_completion_delay_duration" {
14+
default = "P5D"
15+
}
16+
17+
provider "oci" {
18+
tenancy_ocid = var.tenancy_ocid
19+
user_ocid = var.user_ocid
20+
fingerprint = var.fingerprint
21+
private_key_path = var.private_key_path
22+
region = var.region
23+
}
24+
25+
data "oci_identity_availability_domain" "ad1" {
26+
compartment_id = var.tenancy_ocid
27+
ad_number = 1
28+
}
29+
30+
data "oci_identity_availability_domain" "ad2" {
31+
compartment_id = var.tenancy_ocid
32+
ad_number = 2
33+
}
34+
35+
data "oci_containerengine_cluster_option" "test_cluster_option" {
36+
cluster_option_id = "all"
37+
}
38+
39+
resource "oci_core_vcn" "test_vcn" {
40+
cidr_block = "10.0.0.0/16"
41+
compartment_id = var.compartment_ocid
42+
display_name = "tfVcnForClusters"
43+
}
44+
45+
resource "oci_core_internet_gateway" "test_ig" {
46+
compartment_id = var.compartment_ocid
47+
display_name = "tfClusterInternetGateway"
48+
vcn_id = oci_core_vcn.test_vcn.id
49+
}
50+
51+
resource "oci_core_route_table" "test_route_table" {
52+
compartment_id = var.compartment_ocid
53+
vcn_id = oci_core_vcn.test_vcn.id
54+
display_name = "tfClustersRouteTable"
55+
56+
route_rules {
57+
destination = "0.0.0.0/0"
58+
destination_type = "CIDR_BLOCK"
59+
network_entity_id = oci_core_internet_gateway.test_ig.id
60+
}
61+
}
62+
63+
resource "oci_core_subnet" "clusterSubnet_1" {
64+
#Required
65+
availability_domain = data.oci_identity_availability_domain.ad1.name
66+
cidr_block = "10.0.20.0/24"
67+
compartment_id = var.compartment_ocid
68+
vcn_id = oci_core_vcn.test_vcn.id
69+
70+
# Provider code tries to maintain compatibility with old versions.
71+
security_list_ids = [oci_core_vcn.test_vcn.default_security_list_id]
72+
display_name = "tfSubNet1ForClusters"
73+
route_table_id = oci_core_route_table.test_route_table.id
74+
}
75+
76+
resource "oci_core_subnet" "clusterSubnet_2" {
77+
#Required
78+
availability_domain = data.oci_identity_availability_domain.ad2.name
79+
cidr_block = "10.0.21.0/24"
80+
compartment_id = var.compartment_ocid
81+
vcn_id = oci_core_vcn.test_vcn.id
82+
display_name = "tfSubNet1ForClusters"
83+
84+
# Provider code tries to maintain compatibility with old versions.
85+
security_list_ids = [oci_core_vcn.test_vcn.default_security_list_id]
86+
route_table_id = oci_core_route_table.test_route_table.id
87+
}
88+
89+
resource "oci_containerengine_cluster" "test_cluster" {
90+
#Required
91+
compartment_id = var.compartment_ocid
92+
kubernetes_version = reverse(data.oci_containerengine_cluster_option.test_cluster_option.kubernetes_versions)[0]
93+
name = "tfTestCluster"
94+
vcn_id = oci_core_vcn.test_vcn.id
95+
96+
#Optional
97+
options {
98+
service_lb_subnet_ids = [oci_core_subnet.clusterSubnet_1.id, oci_core_subnet.clusterSubnet_2.id]
99+
100+
#Optional
101+
add_ons {
102+
#Optional
103+
is_kubernetes_dashboard_enabled = "true"
104+
is_tiller_enabled = "true"
105+
}
106+
107+
admission_controller_options {
108+
#Optional
109+
is_pod_security_policy_enabled = false
110+
}
111+
112+
kubernetes_network_config {
113+
#Optional
114+
pods_cidr = "10.1.0.0/16"
115+
services_cidr = "10.2.0.0/16"
116+
}
117+
}
118+
}
119+
120+
// start credential rotation on a cluster
121+
resource "oci_containerengine_cluster_start_credential_rotation_management" "test_cluster_start_credential_rotation_management" {
122+
#Required
123+
auto_completion_delay_duration = var.cluster_start_credential_rotation_management_auto_completion_delay_duration
124+
cluster_id = oci_containerengine_cluster.test_cluster.id
125+
}
126+
127+
// get credential rotation status
128+
data "oci_containerengine_cluster_credential_rotation_status" "test_cluster_credential_rotation_status" {
129+
#Required
130+
cluster_id = oci_containerengine_cluster.test_cluster.id
131+
}
132+
133+
// complete credential rotation on a cluster
134+
resource "oci_containerengine_cluster_complete_credential_rotation_management" "test_cluster_complete_credential_rotation_management" {
135+
#Required
136+
cluster_id = oci_containerengine_cluster.test_cluster.id
137+
depends_on = [oci_containerengine_cluster_start_credential_rotation_management.test_cluster_start_credential_rotation_management]
138+
}
139+

examples/container_engine/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ resource "oci_containerengine_node_pool" "test_flex_shape_node_pool" {
289289

290290
node_source_details {
291291
#Required
292-
image_id = local.oracle_linux_images.0
292+
image_id = local.image_id
293293
source_type = "IMAGE"
294294
}
295295

examples/database/exadata_cc/adbd/adb.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resource "oci_database_autonomous_database" "test_autonomous_database" {
1010
#Required
1111
admin_password = random_string.autonomous_database_admin_password.result
1212
compartment_id = var.compartment_ocid
13-
compute_count = "2"
13+
ocpu_count = "2"
1414
data_storage_size_in_tbs = "1"
1515
db_name = "atpdb1"
1616

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
resource "oci_database_autonomous_vm_cluster_ords_certificate_management" "test_avm_ords_mgmt_res"{
2+
autonomous_vm_cluster_id = oci_database_autonomous_vm_cluster.test_autonomous_vm_cluster.id
3+
certificate_generation_type = "BYOC"
4+
certificate_id = var.avm_certificate_id
5+
}
6+
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
resource "oci_database_autonomous_vm_cluster_ssl_certificate_management" "test_avm_db_mgmt_res"{
2+
autonomous_vm_cluster_id = oci_database_autonomous_vm_cluster.test_autonomous_vm_cluster.id
3+
certificate_generation_type = "SYSTEM"
4+
}
5+

examples/database/exadata_cc/adbd/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,8 @@ variable "compartment_ocid" {
1717
}
1818

1919
variable "ssh_public_key" {
20+
}
21+
22+
variable "avm_certificate_id"{
23+
2024
}
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
5+
variable "tenancy_ocid" {}
6+
variable "user_ocid" {}
7+
variable "fingerprint" {}
8+
variable "private_key_path" {}
9+
variable "region" {}
10+
variable "topic_id" {}
11+
variable "compartment_ocid" {}
12+
13+
provider "oci" {
14+
tenancy_ocid = var.tenancy_ocid
15+
user_ocid = var.user_ocid
16+
fingerprint = var.fingerprint
17+
private_key_path = var.private_key_path
18+
region = var.region
19+
}
20+
21+
resource "oci_identity_tag_namespace" "tag-namespace1" {
22+
compartment_id = var.tenancy_ocid
23+
description = "example tag namespace"
24+
name = "examples-tag-namespace-all"
25+
is_retired = false
26+
}
27+
28+
resource "oci_identity_tag" "tag1" {
29+
description = "example tag"
30+
name = "example-tag"
31+
tag_namespace_id = oci_identity_tag_namespace.tag-namespace1.id
32+
is_cost_tracking = false
33+
is_retired = false
34+
}
35+
36+
variable "news_frequency" {
37+
default = "WEEKLY"
38+
}
39+
40+
variable "news_locale" {
41+
default = "EN"
42+
}
43+
44+
variable "news_report_name" {
45+
default = "Example_Report"
46+
}
47+
48+
variable "news_report_description" {
49+
default = "Example Report Description"
50+
}
51+
52+
variable "cp_resources" {
53+
default = [ "HOST","DATABASE","EXADATA" ]
54+
}
55+
56+
57+
variable "news_report_defined_tags_value" {
58+
default = "value"
59+
}
60+
61+
variable "news_report_freeform_tags" {
62+
default = { "bar-key" = "value" }
63+
}
64+
65+
variable "resource_status" {
66+
default = "ENABLED"
67+
}
68+
69+
// To Create a News Report
70+
resource "oci_opsi_news_report" "test_news_report" {
71+
compartment_id = var.compartment_ocid
72+
locale = var.news_locale
73+
name = var.news_report_name
74+
description = var.news_report_description
75+
news_frequency = var.news_frequency
76+
content_types {
77+
capacity_planning_resources = var.cp_resources
78+
}
79+
ons_topic_id = var.topic_id
80+
freeform_tags = var.news_report_freeform_tags
81+
status = var.resource_status
82+
}
83+
84+
variable "news_report_state" {
85+
default = ["ACTIVE"]
86+
}
87+
88+
variable "news_report_status" {
89+
default = ["ENABLED"]
90+
}
91+
92+
// List news reports
93+
data "oci_opsi_news_reports" "test_news_reports" {
94+
compartment_id = var.compartment_ocid
95+
state = var.news_report_state
96+
status = var.news_report_status
97+
}
98+
99+
// Get a news report
100+
data "oci_opsi_news_report" "test_news_report" {
101+
news_report_id = oci_opsi_news_report.test_news_report.id
102+
}
103+

examples/zips/adm.zip

0 Bytes
Binary file not shown.
0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)