Merge pull request #15575 from hakman/automated-cherry-pick-of-#15573-upstream-release-1.26

Automated cherry pick of #15573: aws: Avoid spurious changes in EBSVolume for KmsKeyId
This commit is contained in:
Kubernetes Prow Robot 2023-07-02 14:56:50 -07:00 committed by GitHub
commit 7d83895444
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -90,8 +90,10 @@ func (e *EBSVolume) Find(context *fi.CloudupContext) (*EBSVolume, error) {
// Avoid spurious changes
actual.Lifecycle = e.Lifecycle
e.ID = actual.ID
if fi.ValueOf(e.Encrypted) && e.KmsKeyId == nil {
e.KmsKeyId = actual.KmsKeyId
}
return actual, nil
}