-
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
Conversation
|
/run pipeline |
|
/run pipeline |
solutions/standard/variables.tf
Outdated
| tcp_keepalives_count = 6 | ||
| archive_timeout = 1800 | ||
| wal_level = "replica" | ||
| wal_level = "logical" |
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.
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.
actually its coming in #514
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.
@Aashiq-J Too many changes here - check out my comments
solutions/standard/variables.tf
Outdated
| } | ||
|
|
||
| variable "existing_backup_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." |
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.
why are you saying same account? We support KMS being in any account since we have the ibmcloud_kms_api_key input. I think its safe to assume all KMS will be in same account
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.
If not specified, a root key is created.
^ This doesn't make sense here? The instance CRN is required to create the key and the auth policy. If not specified we should mention that for backup encryption, it will use the same instance specified in existing_kms_instance_crn
solutions/standard/variables.tf
Outdated
|
|
||
| variable "existing_backup_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." |
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.
description needs to be updated to say its used for backup encryption
|
/run pipeline |
|
/run pipeline |
|
/run pipeline |
|
/run pipeline |
|
/run pipeline |
|
@Aashiq-J Hold off running pipeline - I'm reviewing.. |
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.
see suggestions
solutions/standard/variables.tf
Outdated
| } | ||
|
|
||
| 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)" |
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.
Its not a "PostgreSQL instance backup" - its a database backup.
How about this for wording:
The CRN of an Hyper Protect Crypto Services or Key Protect instance that you want to use to encrypt database backups. If no value is passed, the value of the
existing_kms_instance_crninput will be used, however backup encryption is only supported in certain regions so you need to ensure the KMS for backup is coming from one of the supported regions. Learn more.
solutions/standard/variables.tf
Outdated
| ############################################################## | ||
| 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)" |
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.
The CRN of an Hyper Protect Crypto Services or Key Protect encryption key that you want to use to encrypt database backups. If no value is passed, the value of
existing_kms_key_crnis used. If no is passed for that, a new key will be created in the provided KMS instance and used for both disk encryption, and backup encryption.
solutions/standard/variables.tf
Outdated
|
|
||
| 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." |
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.
The CRN of an Hyper Protect Crypto Services or Key Protect instance that you want to use for both disk and backup encryption. Backup encryption is only supported is some regions (learn more), so if you need to use a different instance for backup encryption from a supported region, use the
existing_backup_kms_instance_crninput.
solutions/standard/variables.tf
Outdated
| 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." |
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.
The CRN of an Hyper Protect Crypto Services or Key Protect encryption key that you want to use to use for both disk and backup encryption. If no value is passed, a new key ring and key will be created in the instance provided in the
existing_kms_instance_crninput. Backup encryption is only supported is some regions (learn more), so if you need to use a key from a different region for backup encryption, use theexisting_backup_kms_key_crninput.
|
/run pipeline |
|
/run pipeline |
|
🎉 This PR is included in version 3.18.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
Description
Issue : #509
Release required?
x.x.X)x.X.x)X.x.x)Release notes content
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers