Skip to content

Commit 2f4aec1

Browse files
authored
Merge pull request #1183 from terraform-providers/release_gh
Releasing version 3.94.0
2 parents 540c95f + 161a8b4 commit 2f4aec1

File tree

116 files changed

+1770
-183
lines changed

Some content is hidden

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

116 files changed

+1770
-183
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
## 3.94.0 (Unreleased)
2+
3+
### Added
4+
- Support for ExaCC Customer Contacts
5+
- Support for KMS Software Keys added
6+
- Open mode and Permission level added to autonomous database resource
7+
- Support for Flexible Infrastructure - Flexible Memory
8+
- Support for resizing of boot_volume in `oci_core_instance` resource
9+
10+
### Fixed
11+
- Fix logging to provide better feedback to the user to contact service when there are 401 and 500 status codes as response
12+
213
## 3.93.0 (September 16, 2020)
314

415
### Added

examples/compute/instance/instance.tf

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,17 @@ variable "num_paravirtualized_volumes_per_instance" {
5050
}
5151

5252
variable "instance_shape" {
53-
default = "VM.Standard2.1"
53+
default = "VM.Standard.E3.Flex"
5454
}
5555

5656
variable "instance_ocpus" {
5757
default = 1
5858
}
5959

60+
variable "instance_shape_config_memory_in_gbs" {
61+
default = 1.1
62+
}
63+
6064
variable "instance_image_ocid" {
6165
type = map(string)
6266

@@ -70,6 +74,16 @@ variable "instance_image_ocid" {
7074
}
7175
}
7276

77+
variable "flex_instance_image_ocid" {
78+
type = map(string)
79+
default = {
80+
us-phoenix-1 = "ocid1.image.oc1.phx.aaaaaaaa6hooptnlbfwr5lwemqjbu3uqidntrlhnt45yihfj222zahe7p3wq"
81+
us-ashburn-1 = "ocid1.image.oc1.iad.aaaaaaaa6tp7lhyrcokdtf7vrbmxyp2pctgg4uxvt4jz4vc47qoc2ec4anha"
82+
eu-frankfurt-1 = "ocid1.image.oc1.eu-frankfurt-1.aaaaaaaadvi77prh3vjijhwe5xbd6kjg3n5ndxjcpod6om6qaiqeu3csof7a"
83+
uk-london-1 = "ocid1.image.oc1.uk-london-1.aaaaaaaaw5gvriwzjhzt2tnylrfnpanz5ndztyrv3zpwhlzxdbkqsjfkwxaq"
84+
}
85+
}
86+
7387
variable "db_size" {
7488
default = "50" # size in GBs
7589
}
@@ -90,7 +104,8 @@ resource "oci_core_instance" "test_instance" {
90104
shape = var.instance_shape
91105

92106
shape_config {
93-
ocpus = var.instance_ocpus
107+
ocpus = "${var.instance_ocpus}"
108+
memory_in_gbs = "${var.instance_shape_config_memory_in_gbs}"
94109
}
95110

96111
create_vnic_details {
@@ -102,7 +117,7 @@ resource "oci_core_instance" "test_instance" {
102117

103118
source_details {
104119
source_type = "image"
105-
source_id = var.instance_image_ocid[var.region]
120+
source_id = var.flex_instance_image_ocid[var.region]
106121
# Apply this to set the size of the boot volume that's created for this instance.
107122
# Otherwise, the default boot volume size of the image is used.
108123
# This should only be specified when source_type is set to "image".

examples/database/exadata_cc/exadata-infrastructure.tf

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,27 @@ provider "oci" {
3333
resource "oci_database_exadata_infrastructure" "test_exadata_infrastructure" {
3434
#Required
3535
admin_network_cidr = "192.168.0.0/16"
36-
cloud_control_plane_server1 = "192.168.19.1"
37-
cloud_control_plane_server2 = "192.168.19.2"
36+
cloud_control_plane_server1 = "10.32.88.1"
37+
cloud_control_plane_server2 = "10.32.88.3"
3838
compartment_id = var.compartment_id
3939
display_name = "tstExaInfra"
40-
dns_server = ["192.168.10.10"]
41-
gateway = "192.168.20.1"
42-
infini_band_network_cidr = "10.172.0.0/19"
43-
netmask = "255.255.0.0"
44-
ntp_server = ["192.168.10.20"]
40+
dns_server = ["10.231.225.65"]
41+
gateway = "10.32.88.5"
42+
infini_band_network_cidr = "10.31.8.0/21"
43+
netmask = "255.255.255.0"
44+
ntp_server = ["10.231.225.76"]
4545
shape = "ExadataCC.Quarter3.100"
4646
time_zone = "US/Pacific"
4747
activation_file = "activation.zip"
4848

4949
#Optional
50+
contacts = {
51+
"email" = "[email protected]"
52+
"is_primary" = "true"
53+
"name" = "name"
54+
"phone_number" = "1234567891"
55+
}
56+
5057
corporate_proxy = "http://192.168.19.1:80"
5158
defined_tags = {
5259
"${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}" = "updatedvalue"

examples/storage/block/volume_grow/volume_grow.tf

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,27 @@ data "oci_identity_availability_domain" "ad" {
188188
compartment_id = var.tenancy_ocid
189189
ad_number = 1
190190
}
191+
192+
resource "null_resource" "remote-exec-boot-volume-rescan" {
193+
depends_on = ["oci_core_instance.test_instance"]
194+
195+
provisioner "remote-exec" {
196+
connection {
197+
agent = false
198+
timeout = "30m"
199+
host = "${oci_core_instance.test_instance.public_ip}"
200+
user = "opc"
201+
private_key = "${file(var.ssh_private_key)}"
202+
}
203+
204+
inline = [
205+
"touch ~/IMadeAFile.Right.Here",
206+
"sudo dd iflag=direct if=/dev/sda of=/dev/null count=1",
207+
"echo '1' | sudo tee /sys/class/block/sda/device/rescan",
208+
]
209+
}
210+
211+
triggers = {
212+
always_run = "${oci_core_instance.test_instance.source_details.0.boot_volume_size_in_gbs}"
213+
}
214+
}

go.mod

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@ 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/v25 v25.0.0
10+
github.com/oracle/oci-go-sdk/v25 v25.1.0
1111
github.com/stretchr/objx v0.1.1 // indirect
12-
github.com/stretchr/testify v1.3.0
12+
github.com/stretchr/testify v1.6.1
1313
gopkg.in/yaml.v2 v2.2.2
1414
)
1515

1616
// Uncomment this line to get OCI Go SDK from local source instead of github
1717
//replace github.com/oracle/oci-go-sdk => ../../oracle/oci-go-sdk
18+
19+
replace github.com/oracle/oci-go-sdk/v25 => ../../oracle/oci-go-sdk

oci/core_image_shape_data_source.go

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,27 @@ func CoreImageShapeDataSource() *schema.Resource {
2727
Required: true,
2828
},
2929
// Computed
30+
"memory_constraints": {
31+
Type: schema.TypeList,
32+
Computed: true,
33+
Elem: &schema.Resource{
34+
Schema: map[string]*schema.Schema{
35+
// Required
36+
37+
// Optional
38+
39+
// Computed
40+
"max_in_gbs": {
41+
Type: schema.TypeInt,
42+
Computed: true,
43+
},
44+
"min_in_gbs": {
45+
Type: schema.TypeInt,
46+
Computed: true,
47+
},
48+
},
49+
},
50+
},
3051
"ocpu_constraints": {
3152
Type: schema.TypeList,
3253
Computed: true,
@@ -105,6 +126,12 @@ func (s *CoreImageShapeDataSourceCrud) SetData() error {
105126

106127
s.D.SetId(GenerateDataSourceID())
107128

129+
if s.Res.MemoryConstraints != nil {
130+
s.D.Set("memory_constraints", []interface{}{ImageMemoryConstraintsToMap(s.Res.MemoryConstraints)})
131+
} else {
132+
s.D.Set("memory_constraints", nil)
133+
}
134+
108135
if s.Res.OcpuConstraints != nil {
109136
s.D.Set("ocpu_constraints", []interface{}{ImageOcpuConstraintsToMap(s.Res.OcpuConstraints)})
110137
} else {
@@ -118,6 +145,20 @@ func (s *CoreImageShapeDataSourceCrud) SetData() error {
118145
return nil
119146
}
120147

148+
func ImageMemoryConstraintsToMap(obj *oci_core.ImageMemoryConstraints) map[string]interface{} {
149+
result := map[string]interface{}{}
150+
151+
if obj.MaxInGBs != nil {
152+
result["max_in_gbs"] = int(*obj.MaxInGBs)
153+
}
154+
155+
if obj.MinInGBs != nil {
156+
result["min_in_gbs"] = int(*obj.MinInGBs)
157+
}
158+
159+
return result
160+
}
161+
121162
func ImageOcpuConstraintsToMap(obj *oci_core.ImageOcpuConstraints) map[string]interface{} {
122163
result := map[string]interface{}{}
123164

oci/core_image_shapes_data_source.go

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,29 @@ func CoreImageShapesDataSource() *schema.Resource {
3737
Type: schema.TypeString,
3838
Computed: true,
3939
},
40+
"memory_constraints": {
41+
Type: schema.TypeList,
42+
Computed: true,
43+
MaxItems: 1,
44+
MinItems: 1,
45+
Elem: &schema.Resource{
46+
Schema: map[string]*schema.Schema{
47+
// Required
48+
49+
// Optional
50+
51+
// Computed
52+
"max_in_gbs": {
53+
Type: schema.TypeInt,
54+
Computed: true,
55+
},
56+
"min_in_gbs": {
57+
Type: schema.TypeInt,
58+
Computed: true,
59+
},
60+
},
61+
},
62+
},
4063
"ocpu_constraints": {
4164
Type: schema.TypeList,
4265
Computed: true,
@@ -133,6 +156,12 @@ func (s *CoreImageShapesDataSourceCrud) SetData() error {
133156
"image_id": *r.ImageId,
134157
}
135158

159+
if r.MemoryConstraints != nil {
160+
imageShape["memory_constraints"] = []interface{}{ImageMemoryConstraintsToMap(r.MemoryConstraints)}
161+
} else {
162+
imageShape["memory_constraints"] = nil
163+
}
164+
136165
if r.OcpuConstraints != nil {
137166
imageShape["ocpu_constraints"] = []interface{}{ImageOcpuConstraintsToMap(r.OcpuConstraints)}
138167
} else {

0 commit comments

Comments
 (0)