-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat : scope KMS auth policy to the exact KMS key #530
Conversation
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
1 similar comment
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
/run pipeline |
1 similar comment
/run pipeline |
/run pipeline |
Pipeline failing due to the below error but could not find any existing policy id
|
/run pipeline |
Looks like PR will fail again as same auth policy is getting created, @arya-girish-k can you please check the logic once?
|
@arya-girish-k, you need to see if terraform-ibm-icd-postgresql/main.tf Line 18 in 7ad7d55
|
/run pipeline |
Added a parser for KMS and backup encryption keys, along with an authorization policy resource for backup encryption. Also resolved pre-commit errors. Hence retriggering the pipeline. |
/run pipeline |
Pipeline(CRA scan) is failed because of this error
|
Updated the validation code in main.tf .Hence retriggering the pipeline |
/run pipeline |
Resolved the pre-commit error .Re-triggering the pipeline. |
/run pipeline |
As expected, the upgrade test fails due to the re-creation of the auth policy, however since we are using create_before_destroy = true there will be no disruption to key access so skipping upgrade test.
|
@Ak-sky ,TestRunFSCloudExample is failed because of version error.
Tested the issue locally in two ways: first, by commenting out the pg_version in the test for the specific test case, which ran successfully; and second, by setting pg_version ="v16", which resulted in an error. |
Provider version is updated .Re-triggering the pipeline. |
/run pipeline |
) | ||
) : null | ||
#validation for creating KMS and backup KMS policy | ||
create_backup_auth_policy = var.use_default_backup_encryption_key != true && var.backup_encryption_key_crn != null ? 1 : 0 |
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.
we should say create_backup_kms_auth_policy
backup_kms_service = local.backup_encryption_key_crn != null && length(module.backup_kms_crn_parser) > 0 ? module.backup_kms_crn_parser[0].service_name : null | ||
backup_kms_account_id = local.backup_encryption_key_crn != null && length(module.backup_kms_crn_parser) > 0 ? module.backup_kms_crn_parser[0].account_id : null | ||
backup_kms_key_id = local.backup_encryption_key_crn != null && length(module.backup_kms_crn_parser) > 0 ? module.backup_kms_crn_parser[0].resource : null | ||
backup_instance = local.backup_encryption_key_crn != null && length(module.backup_kms_crn_parser) > 0 ? module.backup_kms_crn_parser[0].service_instance : 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.
We should use var.backup_encryption_key_crn in conditions instead of local.backup_encryption_key_crn
Then we may not require length(module.backup_kms_crn_parser) > 0
As suggested currently paused on working in this issue until the Elastic search PR is completed, as the same changes needs to be integrated into this one. |
@arya-girish-k The Elasticsearch PR has been merged, however it contains alot of refactoring work. In order to ensure consistency across our ICD modules / DA, we should make the same changes to Postgres. So I am re-assigning this issue to @jor2 who is already working on the refactoring work as part of #541 |
Description
This PR is to scope the KMS auth policy to the exact KMS key.
Git Issue
Release required?
x.x.X
)x.X.x
)X.x.x
)Release notes content
Scope the KMS auth policy to the exact KMS key
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