Skip to content

Commit d65a9e1

Browse files
authored
[PWX-28720] Added support for creating oracle encrypted block volumes (#130)
Added support for creating oracle encrypted block volumes using customer managed key Signed-off-by: Vinayak Shinde <vinayakshnd@gmail.com>
1 parent f1d6fed commit d65a9e1

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

oracle/oracle.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ func (o *oracleOps) Create(template interface{}, labels map[string]string, optio
439439
SizeInGBs: vol.SizeInGBs,
440440
VpusPerGB: vol.VpusPerGB,
441441
DisplayName: vol.DisplayName,
442+
KmsKeyId: vol.KmsKeyId,
442443
FreeformTags: labels,
443444
},
444445
}

oracle/oracle_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ const (
1515
// Minimum size supported by oracle cloud is 50 GB
1616
newDiskSizeInGB = 50
1717
newDiskPrefix = "openstorage-test"
18+
envKmsKeyID = "KMS_KEY_ID"
1819
)
1920

2021
var diskName = fmt.Sprintf("%s-%s", newDiskPrefix, uuid.New())
@@ -29,14 +30,15 @@ func TestAll(t *testing.T) {
2930
t.Skipf("skipping Oracle tests as environment is not set...\n")
3031
}
3132

32-
3333
compartmentID, _ := cloudops.GetEnvValueStrict(fmt.Sprintf("%s", envCompartmentID))
3434
availabilityDomain, _ := cloudops.GetEnvValueStrict(fmt.Sprintf("%s", envAvailabilityDomain))
35+
kmsKeyID, _ := cloudops.GetEnvValueStrict(fmt.Sprintf("%s", envKmsKeyID))
3536
oracleVol := &core.Volume{
3637
SizeInGBs: common.Int64(newDiskSizeInGB),
3738
CompartmentId: common.String(compartmentID),
3839
DisplayName: &diskName,
3940
VpusPerGB: common.Int64(10),
41+
KmsKeyId: common.String(kmsKeyID),
4042
AvailabilityDomain: common.String(availabilityDomain),
4143
}
4244
drivers[d.Name()] = d

0 commit comments

Comments
 (0)