fix(kms): call GetKeyRotationStatus only for Customer Keys (#1842)

This commit is contained in:
Sergio Garcia
2023-02-06 17:07:03 +01:00
committed by GitHub
parent c2b4a8e115
commit 6c16e2bca2

View File

@@ -73,7 +73,7 @@ class KMS:
logger.info("KMS - Get Key Rotation Status...") logger.info("KMS - Get Key Rotation Status...")
try: try:
for key in self.keys: for key in self.keys:
if "EXTERNAL" not in key.origin: if "EXTERNAL" not in key.origin and "AWS" not in key.manager:
regional_client = self.regional_clients[key.region] regional_client = self.regional_clients[key.region]
key.rotation_enabled = regional_client.get_key_rotation_status( key.rotation_enabled = regional_client.get_key_rotation_status(
KeyId=key.id KeyId=key.id