Skip to content

Commit 98f0647

Browse files
Merge pull request #1151 from terraform-providers/release_merge_v3.90.0
Candidate for release_v3.90.0
2 parents 87585d4 + ecab68a commit 98f0647

File tree

81 files changed

+1411
-2681
lines changed

Some content is hidden

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

81 files changed

+1411
-2681
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,19 @@
11
## 3.90.0 (Unreleased)
2+
3+
### Added
4+
- Support to export the allowed values for `services` argument for Resource Discovery in json format
5+
- Support for DataGuard -Gen 2 Exadata Cloud at Customer (ExaCC)-V2
6+
- Support for customer choice to not recover VM on hypervisor reboot
7+
- Support for OKE Node Pool Boot Volume Sizing
8+
- Support for data flow private endpoints added
9+
- Support for change node shape for Big Data Service
10+
11+
### Fixed
12+
- Fix lifecyclestate logging to provide better feedback to the user with the OCID of the resource
13+
14+
### Discontinued
15+
- Discontinuing deprecated Autonomous Data Warehouse resources / datasources `oci_database_autonomous_data_warehouse`, `oci_database_autonomous_data_warehouse_backup`
16+
217
## 3.89.0 (August 12, 2020)
318

419
### Added

examples/container_engine/main.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,9 @@ resource "oci_containerengine_node_pool" "test_node_pool" {
161161
#Required
162162
image_id = "${data.oci_containerengine_node_pool_option.test_node_pool_option.sources.0.image_id}"
163163
source_type = "${data.oci_containerengine_node_pool_option.test_node_pool_option.sources.0.source_type}"
164+
165+
#Optional
166+
boot_volume_size_in_gbs = "60"
164167
}
165168

166169
quantity_per_subnet = 2

examples/container_engine/regional_subnet/cluster.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ resource "oci_containerengine_node_pool" "test_node_pool" {
4646
#Required
4747
image_id = "${data.oci_containerengine_node_pool_option.test_node_pool_option.sources.0.image_id}"
4848
source_type = "${data.oci_containerengine_node_pool_option.test_node_pool_option.sources.0.source_type}"
49+
50+
#Optional
51+
boot_volume_size_in_gbs = "${var.node_pool_boot_volume_size_in_gbs}"
4952
}
5053

5154
ssh_public_key = "${var.node_pool_ssh_public_key}"

examples/container_engine/regional_subnet/variables.tf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,7 @@ variable "node_pool_quantity_per_subnet" {
5252
variable "node_pool_ssh_public_key" {
5353
default = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDOuBJgh6lTmQvQJ4BA3RCJdSmxRtmiXAQEEIP68/G4gF3XuZdKEYTFeputacmRq9yO5ZnNXgO9akdUgePpf8+CfFtveQxmN5xo3HVCDKxu/70lbMgeu7+wJzrMOlzj+a4zNq2j0Ww2VWMsisJ6eV3bJTnO/9VLGCOC8M9noaOlcKcLgIYy4aDM724MxFX2lgn7o6rVADHRxkvLEXPVqYT4syvYw+8OVSnNgE4MJLxaw8/2K0qp19YlQyiriIXfQpci3ThxwLjymYRPj+kjU1xIxv6qbFQzHR7ds0pSWp1U06cIoKPfCazU9hGWW8yIe/vzfTbWrt2DK6pLwBn/G0x3 sample"
5454
}
55+
56+
variable "node_pool_boot_volume_size_in_gbs" {
57+
default = "60"
58+
}

examples/database/dataguard/existing_vm_cluster/activation.zip

Whitespace-only changes.
Lines changed: 203 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,203 @@
1+
// Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
2+
3+
variable "tenancy_ocid" {}
4+
variable "user_ocid" {}
5+
variable "fingerprint" {}
6+
variable "private_key_path" {}
7+
variable "compartment_id" {}
8+
variable "region" {}
9+
10+
variable "ssh_public_key" {
11+
default = "ssh-rsa sample"
12+
}
13+
14+
provider "oci" {
15+
tenancy_ocid = "${var.tenancy_ocid}"
16+
user_ocid = "${var.user_ocid}"
17+
fingerprint = "${var.fingerprint}"
18+
private_key_path = "${var.private_key_path}"
19+
region = "${var.region}"
20+
}
21+
22+
data "oci_identity_availability_domain" "ad" {
23+
compartment_id = "${var.tenancy_ocid}"
24+
ad_number = 1
25+
}
26+
27+
resource "oci_core_security_list" "exadata_shapes_security_list" {
28+
compartment_id = "${var.compartment_id}"
29+
vcn_id = "${oci_core_virtual_network.t.id}"
30+
display_name = "TFExampleSecurityList"
31+
32+
// allow outbound tcp traffic on all ports
33+
egress_security_rules {
34+
destination = "0.0.0.0/0"
35+
protocol = "6"
36+
}
37+
38+
ingress_security_rules {
39+
protocol = "6"
40+
source = "0.0.0.0/0"
41+
}
42+
}
43+
44+
#dataguard requires the port to be open on the subnet
45+
resource "oci_core_virtual_network" "t" {
46+
compartment_id = "${var.compartment_id}"
47+
cidr_block = "10.1.0.0/16"
48+
display_name = "-tf-vcn"
49+
dns_label = "tfvcn"
50+
}
51+
52+
// An AD based subnet will supply an Availability Domain
53+
resource "oci_core_subnet" "test_subnet" {
54+
availability_domain = "${data.oci_identity_availability_domain.ad.name}"
55+
cidr_block = "10.1.22.0/24"
56+
display_name = "ExadataSubnet"
57+
compartment_id = "${var.compartment_id}"
58+
vcn_id = "${oci_core_virtual_network.t.id}"
59+
route_table_id = "${oci_core_virtual_network.t.default_route_table_id}"
60+
dhcp_options_id = "${oci_core_virtual_network.t.default_dhcp_options_id}"
61+
security_list_ids = ["${oci_core_virtual_network.t.default_security_list_id}", "${oci_core_security_list.exadata_shapes_security_list.id}"]
62+
dns_label = "subnetexadata"
63+
}
64+
65+
resource "oci_database_exadata_infrastructure" "test_exadata_infrastructure" {
66+
#Required
67+
admin_network_cidr = "192.168.0.0/16"
68+
cloud_control_plane_server1 = "192.168.19.1"
69+
cloud_control_plane_server2 = "192.168.19.2"
70+
compartment_id = "${var.compartment_id}"
71+
display_name = "tstExaInfra"
72+
dns_server = ["192.168.10.10"]
73+
gateway = "192.168.20.1"
74+
infini_band_network_cidr = "10.172.0.0/19"
75+
netmask = "255.255.0.0"
76+
ntp_server = ["192.168.10.20"]
77+
shape = "ExadataCC.Quarter2.92"
78+
time_zone = "US/Pacific"
79+
activation_file = "activation.zip"
80+
81+
#Optional
82+
corporate_proxy = "http://192.168.19.1:80"
83+
}
84+
85+
resource "oci_database_vm_cluster_network" "test_vm_cluster_network" {
86+
compartment_id = "${var.compartment_id}"
87+
88+
display_name = "testVmClusterNw"
89+
dns = ["192.168.10.12"]
90+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
91+
92+
ntp = ["192.168.10.22"]
93+
94+
scans {
95+
hostname = "myprefix2-ivmmj-scan"
96+
ips = ["192.168.19.7", "192.168.19.8", "192.168.19.9"]
97+
port = "1522"
98+
}
99+
100+
validate_vm_cluster_network = "true"
101+
102+
vm_networks {
103+
domain_name = "oracle.com"
104+
gateway = "192.169.20.2"
105+
netmask = "255.255.0.1"
106+
network_type = "BACKUP"
107+
108+
nodes {
109+
hostname = "myprefix2-xapb24"
110+
ip = "192.169.19.19"
111+
}
112+
113+
nodes {
114+
hostname = "myprefix2-xapb28"
115+
ip = "192.169.19.21"
116+
}
117+
118+
vlan_id = "100"
119+
}
120+
121+
vm_networks {
122+
domain_name = "oracle.com"
123+
gateway = "192.168.20.2"
124+
netmask = "255.255.0.1"
125+
network_type = "CLIENT"
126+
127+
nodes {
128+
hostname = "myprefix2-xapb22"
129+
ip = "192.168.19.11"
130+
vip = "192.168.19.13"
131+
vip_hostname = "myprefix2-xapb22-vip"
132+
}
133+
134+
nodes {
135+
hostname = "myprefix2-xapb26"
136+
ip = "192.168.19.15"
137+
vip = "192.168.19.17"
138+
vip_hostname = "myprefix2-xapb26-vip"
139+
}
140+
141+
vlan_id = "101"
142+
}
143+
}
144+
145+
resource "oci_database_vm_cluster" "test_exadata_vm_cluster_for_primary_db" {
146+
compartment_id = "${var.compartment_id}"
147+
cpu_core_count = "4"
148+
depends_on = ["oci_database_vm_cluster_network.test_vm_cluster_network"]
149+
display_name = "vmClusterForPrimaryDB"
150+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
151+
gi_version = "19.1.0.0"
152+
ssh_public_keys = ["${var.ssh_public_key}"]
153+
vm_cluster_network_id = "${oci_database_vm_cluster_network.test_vm_cluster_network.id}"
154+
}
155+
156+
resource "oci_database_vm_cluster" "test_exadata_vm_cluster_for_standby_db" {
157+
compartment_id = "${var.compartment_id}"
158+
cpu_core_count = "4"
159+
depends_on = ["oci_database_vm_cluster_network.test_vm_cluster_network"]
160+
display_name = "vmClusterForStandbyDB"
161+
exadata_infrastructure_id = "${oci_database_exadata_infrastructure.test_exadata_infrastructure.id}"
162+
gi_version = "19.1.0.0"
163+
ssh_public_keys = ["${var.ssh_public_key}"]
164+
vm_cluster_network_id = "${oci_database_vm_cluster_network.test_vm_cluster_network.id}"
165+
}
166+
167+
data "oci_database_databases" "exadb" {
168+
compartment_id = "${var.compartment_id}"
169+
db_home_id = "${oci_database_db_home.test_db_home_vm_cluster.id}"
170+
}
171+
172+
resource "oci_database_db_home" "test_db_home_vm_cluster" {
173+
vm_cluster_id = "${oci_database_vm_cluster.test_exadata_vm_cluster_for_primary_db.id}"
174+
175+
database {
176+
admin_password = "BEstrO0ng_#11"
177+
db_name = "dbVMClus"
178+
character_set = "AL32UTF8"
179+
ncharacter_set = "AL16UTF16"
180+
db_workload = "OLTP"
181+
pdb_name = "pdbName"
182+
}
183+
184+
source = "VM_CLUSTER_NEW"
185+
db_version = "12.1.0.2"
186+
display_name = "TFTestDbHome1"
187+
}
188+
189+
resource "oci_database_data_guard_association" "test_exadata_data_guard_association" {
190+
creation_type = "ExistingVmCluster"
191+
database_admin_password = "BEstrO0ng_#11"
192+
database_id = "${data.oci_database_databases.exadb.databases.0.id}"
193+
delete_standby_db_home_on_delete = "true"
194+
depends_on = ["oci_database_vm_cluster.test_exadata_vm_cluster_for_primary_db", "oci_database_vm_cluster.test_exadata_vm_cluster_for_standby_db"]
195+
peer_vm_cluster_id = "${oci_database_vm_cluster.test_exadata_vm_cluster_for_standby_db.id}"
196+
protection_mode = "MAXIMUM_PERFORMANCE"
197+
transport_type = "ASYNC"
198+
}
199+
200+
data "oci_database_data_guard_association" "test_exadata_data_guard_association_for_primary" {
201+
data_guard_association_id = "${oci_database_data_guard_association.test_exadata_data_guard_association.id}"
202+
database_id = "${data.oci_database_databases.exadb.databases.0.id}"
203+
}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ require (
77
github.com/hashicorp/hcl2 v0.0.0-20190618163856-0b64543c968c
88
github.com/hashicorp/terraform v0.12.4-0.20190628193153-a74738cd35fc
99
github.com/mitchellh/cli v1.0.0
10-
github.com/oracle/oci-go-sdk v24.0.0+incompatible
10+
github.com/oracle/oci-go-sdk v24.1.0+incompatible
1111
github.com/stretchr/objx v0.1.1 // indirect
12-
github.com/stretchr/testify v1.6.1
12+
github.com/stretchr/testify v1.3.0
1313
gopkg.in/yaml.v2 v2.2.2
1414
)
1515

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,8 @@ github.com/oracle/oci-go-sdk v23.0.0+incompatible h1:Mgz+YySzvjWktkuGFrm1EYEzWy5
471471
github.com/oracle/oci-go-sdk v23.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
472472
github.com/oracle/oci-go-sdk v24.0.0+incompatible h1:jxLCpNGS9D7l7PW/t1tJAYxxj+xE+3VO/Ka3PvASAKA=
473473
github.com/oracle/oci-go-sdk v24.0.0+incompatible/go.mod h1:fVMpuTsNzaRf5tkaarJqsBLBgr0U94Ohv7XTCuVuZUc=
474+
github.com/oracle/oci-go-sdk v24.1.0+incompatible h1:SRjcoMUIns9vyz9LzvqGbXEjr09gzJudiPLA/v4Eowo=
475+
github.com/oracle/oci-go-sdk v24.1.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
474476
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58 h1:m3CEgv3ah1Rhy82L+c0QG/U3VyY1UsvsIdkh0/rU97Y=
475477
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
476478
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=

main.go

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ import (
1818
)
1919

2020
func main() {
21-
var command = flag.String("command", "", "Command to run. Supported commands include: 'export' and 'list_export_resources'")
21+
var command = flag.String("command", "", "Command to run. Supported commands include: 'export', 'list_export_resources' and 'list_export_services'. 'list_export_services' supports json format.")
22+
var listExportServicesPath = flag.String("list_export_services_path", "", "[export] Path to output list of supported services in json format")
2223
var compartmentId = flag.String("compartment_id", "", "[export] OCID of a compartment to export. If no compartment id nor name is specified, the root compartment will be used.")
2324
var compartmentName = flag.String("compartment_name", "", "[export] The name of a compartment to export.")
2425
var outputPath = flag.String("output_path", "", "[export] Path to output generated configurations and state files of the exported compartment")
@@ -86,7 +87,12 @@ func main() {
8687

8788
case "list_export_resources":
8889
if err := provider.RunListExportableResourcesCommand(); err != nil {
89-
log.Printf("%v", err)
90+
color.Red("%v", err)
91+
os.Exit(1)
92+
}
93+
case "list_export_services":
94+
if err := provider.RunListExportableServicesCommand(*listExportServicesPath); err != nil {
95+
color.Red("%v", err)
9096
os.Exit(1)
9197
}
9298
default:

oci/bds_bds_instance_resource.go

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package oci
66
import (
77
"context"
88
"fmt"
9+
"reflect"
910
"strconv"
1011
"strings"
1112
"time"
@@ -84,7 +85,6 @@ func BdsBdsInstanceResource() *schema.Resource {
8485
"shape": {
8586
Type: schema.TypeString,
8687
Required: true,
87-
ForceNew: true,
8888
},
8989
"subnet_id": {
9090
Type: schema.TypeString,
@@ -120,7 +120,6 @@ func BdsBdsInstanceResource() *schema.Resource {
120120
"shape": {
121121
Type: schema.TypeString,
122122
Required: true,
123-
ForceNew: true,
124123
},
125124
"subnet_id": {
126125
Type: schema.TypeString,
@@ -155,7 +154,6 @@ func BdsBdsInstanceResource() *schema.Resource {
155154
"shape": {
156155
Type: schema.TypeString,
157156
Required: true,
158-
ForceNew: true,
159157
},
160158
"subnet_id": {
161159
Type: schema.TypeString,
@@ -923,6 +921,9 @@ func (s *BdsBdsInstanceResourceCrud) Update() error {
923921
}
924922

925923
workerNodeFieldKeyFormat := "worker_node.0.%s"
924+
masterNodeFieldKeyFormat := "master_node.0.%s"
925+
utilNodeFieldKeyFormat := "util_node.0.%s"
926+
cloudSqlNodeFieldKeyFormat := "cloud_sql_details.0.%s"
926927

927928
_, blockVolumeSizeInGbsPresent := s.D.GetOkExists(fmt.Sprintf(workerNodeFieldKeyFormat, "block_volume_size_in_gbs"))
928929
if blockVolumeSizeInGbsPresent && s.D.HasChange(fmt.Sprintf(workerNodeFieldKeyFormat, "block_volume_size_in_gbs")) {
@@ -971,6 +972,55 @@ func (s *BdsBdsInstanceResourceCrud) Update() error {
971972
}
972973
}
973974

975+
result := oci_bds.ChangeShapeNodes{}
976+
977+
changeShapeRequest := oci_bds.ChangeShapeRequest{}
978+
workerNodeShape, ok := s.D.GetOkExists(fmt.Sprintf(workerNodeFieldKeyFormat, "shape"))
979+
if ok && s.D.HasChange(fmt.Sprintf(workerNodeFieldKeyFormat, "shape")) {
980+
tmp := workerNodeShape.(string)
981+
result.Worker = &tmp
982+
}
983+
masterNodeShape, ok := s.D.GetOkExists(fmt.Sprintf(masterNodeFieldKeyFormat, "shape"))
984+
if ok && s.D.HasChange(fmt.Sprintf(masterNodeFieldKeyFormat, "shape")) {
985+
tmp := masterNodeShape.(string)
986+
result.Master = &tmp
987+
}
988+
989+
utilNodeShape, ok := s.D.GetOkExists(fmt.Sprintf(utilNodeFieldKeyFormat, "shape"))
990+
if ok && s.D.HasChange(fmt.Sprintf(utilNodeFieldKeyFormat, "shape")) {
991+
tmp := utilNodeShape.(string)
992+
result.Utility = &tmp
993+
}
994+
995+
if _, ok := s.D.GetOkExists("is_cloud_sql_configured"); ok {
996+
cloudSqlNodeShape, ok := s.D.GetOkExists(fmt.Sprintf(cloudSqlNodeFieldKeyFormat, "shape"))
997+
if ok && s.D.HasChange(fmt.Sprintf(cloudSqlNodeFieldKeyFormat, "shape")) {
998+
tmp := cloudSqlNodeShape.(string)
999+
result.Cloudsql = &tmp
1000+
}
1001+
}
1002+
if clusterAdminPassword, ok := s.D.GetOkExists("cluster_admin_password"); ok {
1003+
clusterAdminPasswordTmp := clusterAdminPassword.(string)
1004+
changeShapeRequest.ClusterAdminPassword = &clusterAdminPasswordTmp
1005+
1006+
changeShapeRequest.Nodes = &result
1007+
if !reflect.DeepEqual(result, oci_bds.ChangeShapeNodes{}) {
1008+
tmp := s.D.Id()
1009+
changeShapeRequest.BdsInstanceId = &tmp
1010+
1011+
response, err := s.Client.ChangeShape(context.Background(), changeShapeRequest)
1012+
if err != nil {
1013+
return err
1014+
}
1015+
1016+
workId := response.OpcWorkRequestId
1017+
err = s.getBdsInstanceFromWorkRequest(workId, getRetryPolicy(s.DisableNotFoundRetries, "bds"), oci_bds.ActionTypesUpdated, s.D.Timeout(schema.TimeoutUpdate))
1018+
if err != nil {
1019+
return err
1020+
}
1021+
}
1022+
}
1023+
9741024
request := oci_bds.UpdateBdsInstanceRequest{}
9751025

9761026
tmp := s.D.Id()

0 commit comments

Comments
 (0)