Skip to content

Commit ea54d22

Browse files
authored
feat: Added Custom KMS support for boot volume encryption, support for in-transit encryption (#62)
* feat: Added Custom KMS Key encryption support for Boot Volume. Signed-off-by: Nikhil Kota <[email protected]> * feat: Added support for in-transit encryption for the data volume's paravirtualized attachment.
1 parent 1dac894 commit ea54d22

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

compute.tf

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ resource "oci_core_instance" "operator" {
3838
network_type = "PARAVIRTUALIZED"
3939
}
4040

41-
# prevent the operator from destroying and recreating itself if the image ocid changes
41+
is_pv_encryption_in_transit_enabled = var.enable_pv_encryption_in_transit
42+
# prevent the operator from destroying and recreating itself if the image ocid changes
4243
lifecycle {
4344
ignore_changes = [source_details[0].source_id]
4445
}
@@ -61,6 +62,7 @@ resource "oci_core_instance" "operator" {
6162
source_details {
6263
source_type = "image"
6364
source_id = local.operator_image_id
65+
kms_key_id = var.boot_volume_encryption_key
6466
}
6567

6668
state = var.operator_state

docs/terraformoptions.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,16 @@ Ensure you review the {uri-terraform-dependencies}[dependencies].
123123
|imageid/Oracle
124124
|Oracle
125125

126+
|`enable_pv_encryption_in_transit`
127+
|Whether to enable in-transit encryption for the data volume's paravirtualized attachment
128+
|true/false
129+
|false
130+
131+
|`boot_volume_encryption_key`
132+
|The OCID of the OCI KMS key to assign as the master encryption key for the boot volume.
133+
|""
134+
|
135+
126136
|`enable_operator_instance_principal`
127137
|Whether to enable instance_principal on the operator.
128138
|true/false

variables.tf

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,18 @@ variable "upgrade_operator" {
126126
type = bool
127127
}
128128

129+
variable "enable_pv_encryption_in_transit" {
130+
description = "Whether to enable in-transit encryption for the data volume's paravirtualized attachment. The default value is false"
131+
default = false
132+
type = bool
133+
}
134+
135+
variable "boot_volume_encryption_key" {
136+
description = "The OCID of the OCI KMS key to assign as the master encryption key for the boot volume."
137+
default = ""
138+
type = string
139+
}
140+
129141
# operator notification
130142
variable "enable_operator_notification" {
131143
description = "Whether to enable ONS notification for the operator host."
@@ -150,3 +162,4 @@ variable "operator_notification_topic" {
150162
default = "operator"
151163
type = string
152164
}
165+

0 commit comments

Comments
 (0)