AWS KMS terraform module not working on apply stage

Hi guys, need your help rectifying errors in my code.
I’m facing two errors in my code at terraform apply stage.

  1. error importing KMS External Key (xxxxxxxxxxxxxxxxxxxxxxxxxxxx) material: error importing key material: InvalidCiphertextException:

  2. error creating KMS Replica External Key: KMSInvalidStateException: arn:aws:kms:us-east-1:***:key/mrk-xxxxxxxxxxxxxxxxxxxxxxxxxx is pending import.

I’m attaching my code for reference.
variables.txt (4.3 KB)
kms_main.txt (2.6 KB)
main.txt (4.7 KB)

kms_main is calling code file
main is module file
variables is variable file