Skip to content

Commit 0221c12

Browse files
authored
Candidate for release_v3.63.0
Candidate for release_v3.63.0
2 parents 64d3598 + 0243bb5 commit 0221c12

File tree

132 files changed

+7647
-143
lines changed

Some content is hidden

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

132 files changed

+7647
-143
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
## 3.63.0 (Unreleased)
2+
3+
### Added
4+
- Support update DNS name for Events
5+
- Support for Oracle NoSQL Database Cloud
6+
- Support for exporting `pay_go_strategy` and `package_type` attributes in `oci_marketplace_listing_package`, `oci_marketplace_listing_packages` datasources
7+
- Support for `storage_management` attribute in `oci_database_db_versions` datasource
8+
- Support for `instance_usage_type` attribute in `oci_oce_oce_instance` resource
9+
210
## 3.62.0 (February 12, 2020)
311

412
### Added

examples/nosql/main.tf

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
// Copyright (c) 2017, 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 "region" {}
8+
variable "compartment_id" {}
9+
10+
variable "table_ddl_statement" {
11+
default = "CREATE TABLE IF NOT EXISTS test_table(id INTEGER, name STRING, age STRING, info JSON, PRIMARY KEY(SHARD(id)))"
12+
}
13+
14+
variable "index_keys_column_name" {
15+
default = "name"
16+
}
17+
18+
provider "oci" {
19+
tenancy_ocid = "${var.tenancy_ocid}"
20+
user_ocid = "${var.user_ocid}"
21+
fingerprint = "${var.fingerprint}"
22+
private_key_path = "${var.private_key_path}"
23+
region = "${var.region}"
24+
}
25+
26+
resource "oci_nosql_table" "test_table" {
27+
#Required
28+
compartment_id = "${var.compartment_id}"
29+
ddl_statement = "${var.table_ddl_statement}"
30+
name = "test_table"
31+
32+
table_limits {
33+
#Required
34+
max_read_units = "10"
35+
max_storage_in_gbs = "10"
36+
max_write_units = "10"
37+
}
38+
}
39+
40+
resource "oci_nosql_index" "test_index" {
41+
#Required
42+
keys {
43+
#Required
44+
column_name = "${var.index_keys_column_name}"
45+
}
46+
47+
name = "test_index"
48+
table_name_or_id = "${oci_nosql_table.test_table.id}"
49+
}
50+
51+
data "oci_nosql_tables" "test_tables" {
52+
#Required
53+
compartment_id = "${var.compartment_id}"
54+
55+
filter {
56+
name = "id"
57+
values = ["${oci_nosql_table.test_table.id}"]
58+
}
59+
}
60+
61+
output "table_name" {
62+
value = [
63+
"${data.oci_nosql_tables.test_tables.table_collection.0.name}",
64+
]
65+
}
66+
67+
data "oci_nosql_indexes" "test_indexes" {
68+
#Required
69+
table_name_or_id = "${oci_nosql_table.test_table.id}"
70+
}
71+
72+
output "index_name" {
73+
value = [
74+
"${data.oci_nosql_indexes.test_indexes.index_collection.0.name}",
75+
]
76+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ require (
66
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce
77
github.com/hashicorp/terraform v0.12.4-0.20190628193153-a74738cd35fc
88
github.com/mitchellh/cli v1.0.0
9-
github.com/oracle/oci-go-sdk v15.5.0+incompatible
9+
github.com/oracle/oci-go-sdk v15.6.0+incompatible
1010
github.com/stretchr/objx v0.1.1 // indirect
1111
github.com/stretchr/testify v1.3.0
1212
gopkg.in/yaml.v2 v2.2.2

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ github.com/oracle/oci-go-sdk v15.4.0+incompatible h1:340zNuNGctKSrh/hX9dgfstETss
352352
github.com/oracle/oci-go-sdk v15.4.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
353353
github.com/oracle/oci-go-sdk v15.5.0+incompatible h1:GdG5NWt+lhv0+WslpaF1dbz8KkScYba+zLdr3Nf0ElU=
354354
github.com/oracle/oci-go-sdk v15.5.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
355+
github.com/oracle/oci-go-sdk v15.6.0+incompatible h1:6kX7J6cJnFeWwCPUfiywDD5joxx6qQbJ0SyqnaaKlqU=
356+
github.com/oracle/oci-go-sdk v15.6.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukwStZIg5F66tcBccjip/j888=
355357
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58 h1:m3CEgv3ah1Rhy82L+c0QG/U3VyY1UsvsIdkh0/rU97Y=
356358
github.com/packer-community/winrmcp v0.0.0-20180102160824-81144009af58/go.mod h1:f6Izs6JvFTdnRbziASagjZ2vmf55NSIkC/weStxCHqk=
357359
github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c h1:Lgl0gzECD8GnQ5QCWA8o6BtfL6mDH5rQgM4/fX3avOs=

oci/database_db_version_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ var (
2222
dbVersionDataSourceRepresentationWithDbSystemShapeOptional = representationCopyWithNewProperties(dbVersionDataSourceRepresentationRequiredOnly, map[string]interface{}{
2323
"db_system_shape": Representation{repType: Optional, create: `BM.DenseIO2.52`},
2424
})
25+
dbVersionDataSourceRepresentationWithStorageManagementOptional = representationCopyWithNewProperties(dbVersionDataSourceRepresentationRequiredOnly, map[string]interface{}{
26+
"storage_management": Representation{repType: Optional, create: `ASM`},
27+
})
2528

2629
DbVersionResourceConfig = DbSystemResourceConfig
2730
)
@@ -50,6 +53,7 @@ func TestDatabaseDbVersionResource_basic(t *testing.T) {
5053
generateDataSourceFromRepresentationMap("oci_database_db_versions", "test_db_versions", Required, Create, dbVersionDataSourceRepresentationRequiredOnly) +
5154
generateDataSourceFromRepresentationMap("oci_database_db_versions", "test_db_versions_by_db_system_id", Optional, Create, dbVersionDataSourceRepresentationWithDbSystemIdOptional) +
5255
generateDataSourceFromRepresentationMap("oci_database_db_versions", "test_db_versions_by_db_system_shape", Optional, Create, dbVersionDataSourceRepresentationWithDbSystemShapeOptional) +
56+
generateDataSourceFromRepresentationMap("oci_database_db_versions", "test_db_versions_by_storage_management", Optional, Create, dbVersionDataSourceRepresentationWithStorageManagementOptional) +
5357
compartmentIdVariableStr + DbVersionResourceConfig,
5458
Check: resource.ComposeAggregateTestCheckFunc(
5559
resource.TestCheckResourceAttr(datasourceName, "compartment_id", compartmentId),
@@ -68,6 +72,12 @@ func TestDatabaseDbVersionResource_basic(t *testing.T) {
6872
resource.TestCheckResourceAttrSet(datasourceName+"_by_db_system_shape", "db_versions.0.is_latest_for_major_version"),
6973
resource.TestCheckResourceAttrSet(datasourceName+"_by_db_system_shape", "db_versions.0.supports_pdb"),
7074
resource.TestCheckResourceAttrSet(datasourceName+"_by_db_system_shape", "db_versions.0.version"),
75+
76+
resource.TestCheckResourceAttr(datasourceName+"_by_storage_management", "storage_management", "ASM"),
77+
resource.TestCheckResourceAttrSet(datasourceName+"_by_storage_management", "db_versions.#"),
78+
resource.TestCheckResourceAttrSet(datasourceName+"_by_storage_management", "db_versions.0.is_latest_for_major_version"),
79+
resource.TestCheckResourceAttrSet(datasourceName+"_by_storage_management", "db_versions.0.supports_pdb"),
80+
resource.TestCheckResourceAttrSet(datasourceName+"_by_storage_management", "db_versions.0.version"),
7181
),
7282
},
7383
},

oci/database_db_versions_data_source.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ func DatabaseDbVersionsDataSource() *schema.Resource {
2626
Type: schema.TypeString,
2727
Optional: true,
2828
},
29+
"storage_management": {
30+
Type: schema.TypeString,
31+
Optional: true,
32+
},
2933
"db_versions": {
3034
Type: schema.TypeList,
3135
Computed: true,
@@ -91,6 +95,10 @@ func (s *DatabaseDbVersionsDataSourceCrud) Get() error {
9195
request.DbSystemShape = &tmp
9296
}
9397

98+
if storageManagement, ok := s.D.GetOkExists("storage_management"); ok {
99+
request.StorageManagement = oci_database.DbSystemOptionsStorageManagementEnum(storageManagement.(string))
100+
}
101+
94102
request.RequestMetadata.RetryPolicy = getRetryPolicy(false, "database")
95103

96104
response, err := s.Client.ListDbVersions(context.Background(), request)

oci/events_rule_resource.go

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -512,17 +512,15 @@ func EventsActionToMap(obj oci_events.Action) map[string]interface{} {
512512
result["id"] = string(*v.Id)
513513
}
514514

515+
if v.IsEnabled != nil {
516+
result["is_enabled"] = bool(*v.IsEnabled)
517+
}
518+
515519
if v.LifecycleMessage != nil {
516520
result["lifecycle_message"] = string(*v.LifecycleMessage)
517521
}
518522

519523
result["state"] = string(v.LifecycleState)
520-
if v.LifecycleState == oci_events.ActionLifecycleStateActive {
521-
result["is_enabled"] = true
522-
}
523-
if v.LifecycleState == oci_events.ActionLifecycleStateInactive {
524-
result["is_enabled"] = false
525-
}
526524
case oci_events.NotificationServiceAction:
527525
result["action_type"] = "ONS"
528526

@@ -538,17 +536,15 @@ func EventsActionToMap(obj oci_events.Action) map[string]interface{} {
538536
result["id"] = string(*v.Id)
539537
}
540538

539+
if v.IsEnabled != nil {
540+
result["is_enabled"] = bool(*v.IsEnabled)
541+
}
542+
541543
if v.LifecycleMessage != nil {
542544
result["lifecycle_message"] = string(*v.LifecycleMessage)
543545
}
544546

545547
result["state"] = string(v.LifecycleState)
546-
if v.LifecycleState == oci_events.ActionLifecycleStateActive {
547-
result["is_enabled"] = true
548-
}
549-
if v.LifecycleState == oci_events.ActionLifecycleStateInactive {
550-
result["is_enabled"] = false
551-
}
552548
case oci_events.StreamingServiceAction:
553549
result["action_type"] = "OSS"
554550

@@ -564,17 +560,15 @@ func EventsActionToMap(obj oci_events.Action) map[string]interface{} {
564560
result["id"] = string(*v.Id)
565561
}
566562

563+
if v.IsEnabled != nil {
564+
result["is_enabled"] = bool(*v.IsEnabled)
565+
}
566+
567567
if v.LifecycleMessage != nil {
568568
result["lifecycle_message"] = string(*v.LifecycleMessage)
569569
}
570570

571571
result["state"] = string(v.LifecycleState)
572-
if v.LifecycleState == oci_events.ActionLifecycleStateActive {
573-
result["is_enabled"] = true
574-
}
575-
if v.LifecycleState == oci_events.ActionLifecycleStateInactive {
576-
result["is_enabled"] = false
577-
}
578572
default:
579573
log.Printf("[WARN] Received 'action_type' of unknown type %v", obj)
580574
return nil

oci/marketplace_listing_data_source.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ func LinkToMap(obj oci_marketplace.Link) map[string]interface{} {
662662
result["href"] = string(*obj.Href)
663663
}
664664

665+
result["rel"] = string(obj.Rel)
666+
665667
return result
666668
}
667669

oci/marketplace_listing_package_data_source.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,10 @@ func MarketplaceListingPackageDataSource() *schema.Resource {
5353
Type: schema.TypeString,
5454
Computed: true,
5555
},
56+
"pay_go_strategy": {
57+
Type: schema.TypeString,
58+
Computed: true,
59+
},
5660
"rate": {
5761
Type: schema.TypeFloat,
5862
Computed: true,
@@ -302,6 +306,8 @@ func (s *MarketplaceListingPackageDataSourceCrud) SetData() error {
302306
func OrchestrationVariableToMap(obj oci_marketplace.OrchestrationVariable) map[string]interface{} {
303307
result := map[string]interface{}{}
304308

309+
result["data_type"] = string(obj.DataType)
310+
305311
if obj.DefaultValue != nil {
306312
result["default_value"] = string(*obj.DefaultValue)
307313
}
@@ -328,8 +334,15 @@ func OrchestrationVariableToMap(obj oci_marketplace.OrchestrationVariable) map[s
328334
func PricingModelToMap(obj *oci_marketplace.PricingModel) map[string]interface{} {
329335
result := map[string]interface{}{}
330336

337+
result["currency"] = string(obj.Currency)
338+
339+
result["pay_go_strategy"] = string(obj.PayGoStrategy)
340+
331341
if obj.Rate != nil {
332342
result["rate"] = float32(*obj.Rate)
333343
}
344+
345+
result["type"] = string(obj.Type)
346+
334347
return result
335348
}

oci/marketplace_listing_package_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func TestMarketplaceListingPackageResource_basic(t *testing.T) {
5959
resource.TestCheckResourceAttrSet(datasourceName, "listing_packages.0.listing_id"),
6060
resource.TestCheckResourceAttrSet(datasourceName, "listing_packages.0.resource_id"),
6161
resource.TestCheckResourceAttrSet(datasourceName, "listing_packages.0.time_created"),
62+
resource.TestCheckResourceAttrSet(datasourceName, "listing_packages.0.package_type"),
6263
resource.TestCheckResourceAttrSet(datasourceName, "listing_packages.0.package_version"),
6364
),
6465
},
@@ -75,6 +76,9 @@ func TestMarketplaceListingPackageResource_basic(t *testing.T) {
7576
resource.TestCheckResourceAttrSet(singularDatasourceName, "app_catalog_listing_resource_version"),
7677
resource.TestCheckResourceAttrSet(singularDatasourceName, "package_type"),
7778
resource.TestCheckResourceAttr(singularDatasourceName, "pricing.#", "1"),
79+
resource.TestCheckResourceAttrSet(singularDatasourceName, "pricing.0.rate"),
80+
resource.TestCheckResourceAttrSet(singularDatasourceName, "pricing.0.type"),
81+
resource.TestCheckResourceAttrSet(singularDatasourceName, "pricing.0.currency"),
7882
resource.TestCheckResourceAttrSet(singularDatasourceName, "resource_id"),
7983
resource.TestCheckResourceAttrSet(singularDatasourceName, "time_created"),
8084
resource.TestCheckResourceAttrSet(singularDatasourceName, "version"),

0 commit comments

Comments
 (0)