Skip to content

Commit d7c9573

Browse files
ccushingafedorch
authored andcommitted
Update database_db_versions data source
* Adds `is_latest_for_major_version` field * Refresh Database related documentation
1 parent 4aad5ea commit d7c9573

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

CHANGELOG.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
### Added
44
- Support for importing tag. Note tag uses custom Id(import only) format (tagNamespaces/{tagNamespaceId}/tags/{tagName}) to support import.
5+
- Support for tagging in `oci_dns_zone`
6+
- New attribute `nameservers` is added to `oci_dns_zone`
7+
- Support for in-transit encryption for paravirtualized boot and data attachment
8+
- Identify latest database version with `oci_databse_db_versions` data source using `is_latest_for_major_version` property
59

610
## 3.10.0 (December 11, 2018)
711

812
### Added
913
- Support for attaching Route Table to Subnet. Issue [#270](https://github.com/terraform-providers/terraform-provider-oci/issues/270)
10-
- Support for tagging in `oci_dns_zone`
11-
- New attribute `nameservers` is added to `oci_dns_zone`
12-
- Support for in-transit encryption for paravirtualized boot and data attachment
13-
1414

1515
## 3.9.0 (December 04, 2018)
1616

oci/database_db_version_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ func TestDatabaseDbVersionResource_basic(t *testing.T) {
5959

6060
resource.TestCheckResourceAttr(datasourceName+"_by_db_system_shape", "db_system_shape", "BM.DenseIO1.36"),
6161
resource.TestCheckResourceAttrSet(datasourceName+"_by_db_system_shape", "db_versions.#"),
62+
resource.TestCheckResourceAttrSet(datasourceName+"_by_db_system_shape", "db_versions.0.is_latest_for_major_version"),
6263
resource.TestCheckResourceAttrSet(datasourceName+"_by_db_system_shape", "db_versions.0.supports_pdb"),
6364
resource.TestCheckResourceAttrSet(datasourceName+"_by_db_system_shape", "db_versions.0.version"),
6465
),

oci/database_db_versions_data_source.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ func DbVersionsDataSource() *schema.Resource {
3636
// Optional
3737

3838
// Computed
39+
"is_latest_for_major_version": {
40+
Type: schema.TypeBool,
41+
Computed: true,
42+
},
3943
"supports_pdb": {
4044
Type: schema.TypeBool,
4145
Computed: true,
@@ -141,6 +145,10 @@ func (s *DbVersionsDataSourceCrud) SetData() error {
141145
for _, r := range s.Res.Items {
142146
dbVersion := map[string]interface{}{}
143147

148+
if r.IsLatestForMajorVersion != nil {
149+
dbVersion["is_latest_for_major_version"] = *r.IsLatestForMajorVersion
150+
}
151+
144152
if r.SupportsPdb != nil {
145153
dbVersion["supports_pdb"] = *r.SupportsPdb
146154
}

website/docs/d/database_db_versions.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ The following attributes are exported:
4343

4444
The following attributes are exported:
4545

46+
* `is_latest_for_major_version` - True if this version of the Oracle Database software is the latest version for a release.
4647
* `supports_pdb` - True if this version of the Oracle Database software supports pluggable databases.
4748
* `version` - A valid Oracle Database version.
4849

0 commit comments

Comments
 (0)