Skip to content

Commit ca3e66f

Browse files
authored
Add support for bastion boot-volume encryption (#1040)
1 parent 9985d52 commit ca3e66f

File tree

5 files changed

+10
-1
lines changed

5 files changed

+10
-1
lines changed

module-bastion.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ module "bastion" {
6060
timezone = var.timezone
6161
upgrade = var.bastion_upgrade
6262
user = var.bastion_user
63+
volume_kms_key_id = var.bastion_volume_kms_key_id
6364

6465
# Standard tags as defined if enabled for use, or freeform
6566
# User-provided tags are merged last and take precedence

modules/bastion/compute.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ resource "oci_core_instance" "bastion" {
6868
boot_volume_size_in_gbs = local.boot_volume_size
6969
source_id = var.image_id
7070
source_type = "image"
71+
kms_key_id = var.volume_kms_key_id
7172
}
7273

7374
lifecycle {

modules/bastion/variables.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ variable "subnet_id" { type = string }
2323
variable "timezone" { type = string }
2424
variable "upgrade" { type = bool }
2525
variable "user" { type = string }
26+
variable "volume_kms_key_id" { type = string }
2627

2728
# Tags
2829
variable "defined_tags" { type = map(string) }

variables-bastion.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,10 @@ variable "bastion_await_cloudinit" {
9393
default = true
9494
description = "Whether to block until successful connection to bastion and completion of cloud-init."
9595
type = bool
96+
}
97+
98+
variable "bastion_volume_kms_key_id" {
99+
default = null
100+
description = "The OCID of the OCI KMS key to assign as the master encryption key for the bastion host boot volume."
101+
type = string
96102
}

variables-operator.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ variable "operator_shape" {
127127

128128
variable "operator_volume_kms_key_id" {
129129
default = null
130-
description = "The OCID of the OCI KMS key to assign as the master encryption key for the boot volume."
130+
description = "The OCID of the OCI KMS key to assign as the master encryption key for the operator host boot volume."
131131
type = string
132132
}
133133

0 commit comments

Comments
 (0)