- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2
feat: add support to use a different KMS key for backup encryption #511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 13 commits
5554535
              e1f09e1
              8f6e9b6
              275c209
              a475c71
              51dad9c
              0007363
              f37bd49
              9920a2f
              5af863b
              6e3550d
              5e74750
              4bb7756
              f426504
              f2db8e6
              a987965
              File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -50,6 +50,12 @@ variable "pg_version" { | |
| default = null | ||
| } | ||
|  | ||
| variable "backup_crn" { | ||
| type = string | ||
| description = "The CRN of a backup resource to restore from. The backup is created by a database deployment with the same service ID. The backup is loaded after provisioning and the new deployment starts up that uses that data. A backup CRN is in the format crn:v1:<…>:backup:. If omitted, the database is provisioned empty." | ||
| default = null | ||
| } | ||
|  | ||
| ############################################################################## | ||
| # ICD hosting model properties | ||
| ############################################################################## | ||
|  | @@ -221,12 +227,12 @@ variable "kms_endpoint_type" { | |
|  | ||
| variable "existing_kms_key_crn" { | ||
| type = string | ||
| description = "The CRN of a Hyper Protect Crypto Services or Key Protect root key to use for disk encryption. If not specified, a root key is created in the KMS instance." | ||
| description = "The CRN of a Hyper Protect Crypto Services or Key Protect root key to use for disk encryption. To create a key ring and key, pass a value for the `existing_kms_instance_crn` input variable." | ||
| default = null | ||
| } | ||
|  | ||
| variable "existing_kms_instance_crn" { | ||
| description = "The CRN of a Hyper Protect Crypto Services or Key Protect instance in the same account as the PostgreSQL instance. This value is used to create an authorization policy if `skip_iam_authorization_policy` is false. If not specified, a root key is created." | ||
| description = "The CRN of a Hyper Protect Crypto Services or Key Protect that is used to create keys for encrypting the PostgreSQL instance disks. If you are not using an existing KMS root key, you must specify this CRN. If you are using an existing KMS root key and auth policy is not set for PostgreSQL to KMS, you must specify this CRN." | ||
|          | ||
| type = string | ||
| default = null | ||
| } | ||
|  | @@ -236,3 +242,18 @@ variable "skip_iam_authorization_policy" { | |
| description = "Whether to create an IAM authorization policy that permits all PostgreSQL instances in the resource group to read the encryption key from the Hyper Protect Crypto Services instance specified in the `existing_kms_instance_crn` variable." | ||
| default = false | ||
| } | ||
|  | ||
| ############################################################## | ||
| # Backup Encryption | ||
| ############################################################## | ||
| variable "existing_backup_kms_key_crn" { | ||
| type = string | ||
| description = "Optional. The CRN of a Hyper Protect Crypto Services or Key Protect root key to use for backup encryption. If no value is set for `existing_backup_kms_instance_crn` and `existing_backup_kms_key_crn`, it will use the same instance specified in `existing_kms_instance_crn` or the same key CRN specified in `existing_kms_key_crn`. BYOK for backups is available only in US regions `us-south` and `us-east`, and `eu-de`. [Learn more](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok)" | ||
|          | ||
| default = null | ||
| } | ||
|  | ||
| variable "existing_backup_kms_instance_crn" { | ||
| description = "Optional. The CRN of a Hyper Protect Crypto Services or Key Protect that is used to create keys for encrypting the PostgreSQL instance backup. If no value is set for `existing_backup_kms_instance_crn` and `existing_backup_kms_key_crn`, it will use the same instance specified in `existing_kms_instance_crn` or the same key CRN specified in `existing_kms_key_crn`. BYOK for backups is available only in US regions `us-south` and `us-east`, and `eu-de`. [Learn more](https://cloud.ibm.com/docs/cloud-databases?topic=cloud-databases-key-protect&interface=ui#key-byok)" | ||
|          | ||
| type = string | ||
| default = null | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.