Skip to content

Commit 45681d2

Browse files
authored
Releasing version 3.85.0
Releasing version 3.85.0
2 parents 78b748b + be85651 commit 45681d2

File tree

257 files changed

+13656
-573
lines changed

Some content is hidden

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

257 files changed

+13656
-573
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
## 3.85.0 (Unreleased)
2+
3+
### Added
4+
- Support for DBaaS - ADB - Serverless Extreme Availibility
5+
- Support for Switchover action in autonomous database added
6+
- Support for datasource of `core` with optional `vcn_id`
7+
- Support for Oracle Blockchain Platform service
8+
- Support for resource discovery of vlan resource
9+
210
## 3.84.0 (July 08, 2020)
311

412
### Added

examples/blockchain/main.tf

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
// Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
// These variables would commonly be defined as environment variables or sourced in a .env file
5+
variable "tenancy_ocid" {}
6+
7+
variable "user_ocid" {}
8+
variable "fingerprint" {}
9+
variable "private_key_path" {}
10+
variable "compartment_ocid" {}
11+
variable "region" {}
12+
13+
variable "idcs_access_token" {}
14+
15+
provider "oci" {
16+
region = "${var.region}"
17+
tenancy_ocid = "${var.tenancy_ocid}"
18+
user_ocid = "${var.user_ocid}"
19+
fingerprint = "${var.fingerprint}"
20+
private_key_path = "${var.private_key_path}"
21+
}
22+
23+
resource "oci_blockchain_blockchain_platform" "test_blockchain_platform" {
24+
#Required
25+
compartment_id = "${var.compartment_ocid}"
26+
compute_shape = "ENTERPRISE_MEDIUM"
27+
display_name = "displayname3"
28+
platform_role = "FOUNDER"
29+
30+
#Optional
31+
storage_size_in_tbs = "1.0"
32+
total_ocpu_capacity = "16"
33+
idcs_access_token = "${var.idcs_access_token}"
34+
35+
replicas {
36+
#Optional
37+
ca_count = "4"
38+
console_count = "3"
39+
proxy_count = "4"
40+
}
41+
}
42+
43+
data "oci_blockchain_blockchain_platform" "test_blockchain_platforms" {
44+
#Required
45+
blockchain_platform_id = "${oci_blockchain_blockchain_platform.test_blockchain_platform.id}"
46+
}
47+
48+
resource "oci_blockchain_osn" "test_osn" {
49+
#Required
50+
ad = "AD1"
51+
blockchain_platform_id = "${oci_blockchain_blockchain_platform.test_blockchain_platform.id}"
52+
}
53+
54+
data "oci_blockchain_osn" "test_osn" {
55+
#Required
56+
osn_id = "${oci_blockchain_osn.test_osn.id}"
57+
blockchain_platform_id = "${oci_blockchain_blockchain_platform.test_blockchain_platform.id}"
58+
}
59+
60+
resource "oci_blockchain_peer" "test_peer" {
61+
#Required
62+
ad = "AD1"
63+
blockchain_platform_id = "${oci_blockchain_blockchain_platform.test_blockchain_platform.id}"
64+
65+
ocpu_allocation_param {
66+
#Required
67+
ocpu_allocation_number = "0.5"
68+
}
69+
70+
role = "MEMBER"
71+
}
72+
73+
data "oci_blockchain_peer" "test_peer" {
74+
#Required
75+
peer_id = "${oci_blockchain_peer.test_peer.id}"
76+
blockchain_platform_id = "${oci_blockchain_blockchain_platform.test_blockchain_platform.id}"
77+
}

examples/compute/vlan/vlan.tf

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,6 @@ data "oci_identity_availability_domains" "test_availability_domains" {
4141
compartment_id = "${var.tenancy_ocid}"
4242
}
4343

44-
resource "oci_identity_tag_namespace" "tag-namespace1" {
45-
compartment_id = "${var.tenancy_ocid}"
46-
description = "example tag namespace"
47-
name = "${var.defined_tag_namespace_name != "" ? var.defined_tag_namespace_name : "example-tag-namespace-all"}"
48-
49-
is_retired = false
50-
}
51-
52-
resource "oci_identity_tag" "tag1" {
53-
description = "example tag"
54-
name = "example-tag"
55-
tag_namespace_id = "${oci_identity_tag_namespace.tag-namespace1.id}"
56-
is_retired = false
57-
}
58-
5944
resource "oci_core_vlan" "test_vlan" {
6045
#Required
6146
availability_domain = "${data.oci_identity_availability_domains.test_availability_domains.availability_domains.0.name}"
@@ -68,7 +53,8 @@ resource "oci_core_vlan" "test_vlan" {
6853
nsg_ids = ["${oci_core_network_security_group.test_network_security_group.id}"]
6954
route_table_id = "${oci_core_route_table.test_route_table.id}"
7055
vlan_tag = "10"
71-
defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}"
56+
57+
// defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "value")}"
7258

7359
freeform_tags = {
7460
"Department" = "Finance"

examples/identity/group.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ resource "oci_identity_dynamic_group" "dynamic-group-1" {
4848
compartment_id = "${var.tenancy_ocid}"
4949
name = "tf-example-dynamic-group"
5050
description = "dynamic group created by terraform"
51-
matching_rule = "instance.compartment.id = ${data.oci_identity_compartments.compartments1.compartments.0.id}"
51+
matching_rule = "ANY {instance.compartment.id = '${data.oci_identity_compartments.compartments1.compartments.0.id}'}"
5252

5353
#Optional
5454
defined_tags = "${map("${oci_identity_tag_namespace.tag-namespace1.name}.${oci_identity_tag.tag1.name}", "${var.dynamic_group_defined_tags_value}")}"

examples/identity/identity_providers/group.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ resource "oci_identity_dynamic_group" "dynamic-group-1" {
3636
compartment_id = "${var.tenancy_ocid}"
3737
name = "tf-example-dynamic-group"
3838
description = "dynamic group created by terraform"
39-
matching_rule = "instance.compartment.id = ${oci_identity_compartment.compartment1.id}"
39+
matching_rule = "ANY {instance.compartment.id ='${oci_identity_compartment.compartment1.id}'}"
4040
}
4141

4242
data "oci_identity_dynamic_groups" "dynamic-groups-1" {

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ 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 v21.2.0+incompatible
10+
github.com/oracle/oci-go-sdk v21.3.0+incompatible
1111
github.com/stretchr/objx v0.1.1 // indirect
1212
github.com/stretchr/testify v1.3.0
1313
gopkg.in/yaml.v2 v2.2.2

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,6 +459,8 @@ github.com/oracle/oci-go-sdk v21.1.0+incompatible h1:VFYs6hcxQ8plUGWbIcZAGbDhQtt
459459
github.com/oracle/oci-go-sdk v21.1.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
460460
github.com/oracle/oci-go-sdk v21.2.0+incompatible h1:iaZTdpIQjd73yYCju+s+3dgG49ZCxtj2O25eqDfrgsE=
461461
github.com/oracle/oci-go-sdk v21.2.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
462+
github.com/oracle/oci-go-sdk v21.3.0+incompatible h1:MB9osCinobSml7oDBfph+7Jv9M1yqH4I/iC/BJuURPM=
463+
github.com/oracle/oci-go-sdk v21.3.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
462464
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58 h1:m3CEgv3ah1Rhy82L+c0QG/U3VyY1UsvsIdkh0/rU97Y=
463465
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
464466
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=

oci/apigateway_deployment_resource_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ var (
1919
"specification.request_policies.authentication.type",
2020
Representation{repType: Required, create: `JWT_AUTHENTICATION`, update: `JWT_AUTHENTICATION`},
2121
deploymentRepresentation)
22-
deploymentRepresentationJwtRemoteJWKS = getMultipleUpdatedNestedRepresenationCopy([]string{
22+
deploymentRepresentationJwtRemoteJWKS = getRepresentationCopyWithMultipleRemovedProperties([]string{
2323
"specification.request_policies.authentication.function_id",
2424
"specification.request_policies.authentication.public_keys.keys",
2525
}, deploymentRepresentationJwt)
26-
deploymentRepresentationJwtStaticKeys = getMultipleUpdatedNestedRepresenationCopy([]string{
26+
deploymentRepresentationJwtStaticKeys = getRepresentationCopyWithMultipleRemovedProperties([]string{
2727
"specification.request_policies.authentication.function_id",
2828
"specification.request_policies.authentication.public_keys.uri",
2929
"specification.request_policies.authentication.public_keys.max_cache_duration_in_hours",

oci/apigateway_deployment_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ var (
169169
generateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", Required, Create, vcnRepresentation) +
170170
DefinedTagsDependencies
171171

172-
deploymentRepresentationCustomAuth = getMultipleUpdatedNestedRepresenationCopy([]string{
172+
deploymentRepresentationCustomAuth = getRepresentationCopyWithMultipleRemovedProperties([]string{
173173
"specification.request_policies.authentication.audiences",
174174
"specification.request_policies.authentication.issuers",
175175
"specification.request_policies.authentication.max_clock_skew_in_seconds",
Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
// Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
package oci
5+
6+
import (
7+
"context"
8+
9+
"github.com/hashicorp/terraform/helper/schema"
10+
oci_blockchain "github.com/oracle/oci-go-sdk/blockchain"
11+
)
12+
13+
func init() {
14+
RegisterDatasource("oci_blockchain_blockchain_platform", BlockchainBlockchainPlatformDataSource())
15+
}
16+
17+
func BlockchainBlockchainPlatformDataSource() *schema.Resource {
18+
fieldMap := make(map[string]*schema.Schema)
19+
fieldMap["blockchain_platform_id"] = &schema.Schema{
20+
Type: schema.TypeString,
21+
Required: true,
22+
}
23+
return GetSingularDataSourceItemSchema(BlockchainBlockchainPlatformResource(), fieldMap, readSingularBlockchainBlockchainPlatform)
24+
}
25+
26+
func readSingularBlockchainBlockchainPlatform(d *schema.ResourceData, m interface{}) error {
27+
sync := &BlockchainBlockchainPlatformDataSourceCrud{}
28+
sync.D = d
29+
sync.Client = m.(*OracleClients).blockchainPlatformClient()
30+
31+
return ReadResource(sync)
32+
}
33+
34+
type BlockchainBlockchainPlatformDataSourceCrud struct {
35+
D *schema.ResourceData
36+
Client *oci_blockchain.BlockchainPlatformClient
37+
Res *oci_blockchain.GetBlockchainPlatformResponse
38+
}
39+
40+
func (s *BlockchainBlockchainPlatformDataSourceCrud) VoidState() {
41+
s.D.SetId("")
42+
}
43+
44+
func (s *BlockchainBlockchainPlatformDataSourceCrud) Get() error {
45+
request := oci_blockchain.GetBlockchainPlatformRequest{}
46+
47+
if blockchainPlatformId, ok := s.D.GetOkExists("blockchain_platform_id"); ok {
48+
tmp := blockchainPlatformId.(string)
49+
request.BlockchainPlatformId = &tmp
50+
}
51+
52+
request.RequestMetadata.RetryPolicy = getRetryPolicy(false, "blockchain")
53+
54+
response, err := s.Client.GetBlockchainPlatform(context.Background(), request)
55+
if err != nil {
56+
return err
57+
}
58+
59+
s.Res = &response
60+
return nil
61+
}
62+
63+
func (s *BlockchainBlockchainPlatformDataSourceCrud) SetData() error {
64+
if s.Res == nil {
65+
return nil
66+
}
67+
68+
s.D.SetId(*s.Res.Id)
69+
70+
if s.Res.CompartmentId != nil {
71+
s.D.Set("compartment_id", *s.Res.CompartmentId)
72+
}
73+
74+
if s.Res.ComponentDetails != nil {
75+
s.D.Set("component_details", []interface{}{BlockchainPlatformComponentDetailsToMap(s.Res.ComponentDetails)})
76+
} else {
77+
s.D.Set("component_details", nil)
78+
}
79+
80+
s.D.Set("compute_shape", s.Res.ComputeShape)
81+
82+
if s.Res.DefinedTags != nil {
83+
s.D.Set("defined_tags", definedTagsToMap(s.Res.DefinedTags))
84+
}
85+
86+
if s.Res.Description != nil {
87+
s.D.Set("description", *s.Res.Description)
88+
}
89+
90+
if s.Res.DisplayName != nil {
91+
s.D.Set("display_name", *s.Res.DisplayName)
92+
}
93+
94+
s.D.Set("freeform_tags", s.Res.FreeformTags)
95+
96+
hostOcpuUtilizationInfo := []interface{}{}
97+
for _, item := range s.Res.HostOcpuUtilizationInfo {
98+
hostOcpuUtilizationInfo = append(hostOcpuUtilizationInfo, OcpuUtilizationInfoToMap(item))
99+
}
100+
s.D.Set("host_ocpu_utilization_info", hostOcpuUtilizationInfo)
101+
102+
if s.Res.IsByol != nil {
103+
s.D.Set("is_byol", *s.Res.IsByol)
104+
}
105+
106+
if s.Res.IsMultiAD != nil {
107+
s.D.Set("is_multi_ad", *s.Res.IsMultiAD)
108+
}
109+
110+
if s.Res.LifecycleDetails != nil {
111+
s.D.Set("lifecycle_details", *s.Res.LifecycleDetails)
112+
}
113+
114+
s.D.Set("platform_role", s.Res.PlatformRole)
115+
116+
if s.Res.Replicas != nil {
117+
s.D.Set("replicas", []interface{}{ReplicaDetailsToMap(s.Res.Replicas)})
118+
} else {
119+
s.D.Set("replicas", nil)
120+
}
121+
122+
if s.Res.ServiceEndpoint != nil {
123+
s.D.Set("service_endpoint", *s.Res.ServiceEndpoint)
124+
}
125+
126+
if s.Res.ServiceVersion != nil {
127+
s.D.Set("service_version", *s.Res.ServiceVersion)
128+
}
129+
130+
s.D.Set("state", s.Res.LifecycleState)
131+
132+
if s.Res.StorageSizeInTBs != nil {
133+
s.D.Set("storage_size_in_tbs", *s.Res.StorageSizeInTBs)
134+
}
135+
136+
if s.Res.StorageUsedInTBs != nil {
137+
s.D.Set("storage_used_in_tbs", *s.Res.StorageUsedInTBs)
138+
}
139+
140+
if s.Res.TimeCreated != nil {
141+
s.D.Set("time_created", s.Res.TimeCreated.String())
142+
}
143+
144+
if s.Res.TimeUpdated != nil {
145+
s.D.Set("time_updated", s.Res.TimeUpdated.String())
146+
}
147+
148+
if s.Res.TotalOcpuCapacity != nil {
149+
s.D.Set("total_ocpu_capacity", *s.Res.TotalOcpuCapacity)
150+
}
151+
152+
return nil
153+
}

0 commit comments

Comments
 (0)