feat: Add KMS policy to Velero IAM policy for CMK KMS keys #578
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds and option to specify ARNs of KMS keys, for which additional policy blocks will be created containing actions to operate with these keys.
Motivation and Context
Using this module, if the
var.velero_s3_kms_key_arns
is set to an S3 bucket with default encryption set to customer managed KMS key (CMK), the backup will fail since the policy doesn't include statement with policies allowing operating this KMS keys (such askms:Encrypt
,kms:Decrypt
etc.).This is similar to the cases of EBS (
var.ebs_csi_kms_cmk_ids
) and S3 mountpoint (var.mountpoint_s3_csi_kms_arns
) controllers IAM policies created by this module that contain similar blocks for the same reason.Breaking Changes
No breaking changes, the newly introduced
var.velero_s3_kms_key_arns
variable has default of[]
which doesn't change the behaviour of the current configuration.How Has This Been Tested?
examples/*
to demonstrate and validate my change(s)examples/*
projectspre-commit run -a
on my pull request