Closed wesselvdv closed 5 years ago
Hello @wesselvdv
Yes, you're right, no endpoints relating to Key Policies have been implemented yet. I've never used that endpoint myself, so I'm not sure how complex it would be to do. Please do go ahead and give it a go though. I'm happy to help where I can.
After taking a look at the AWS docs regarding this specific route, it seems I could add a simple 'mock' handler that will always return the name default
as the key policy. Which is actually correct since the TrentService.CreateKey
handler in this local implementation doesn't support the Policy
property.
Another approach could be to add handlers for TrentService.PutKeyPolicy
&TrentService.GetKeyPolicy
, and add the Policy
property to the TrentService.CreateKey
handler which would at least make sure that if given a custom policy it could return the correct custom one.
EDIT:
I'll try to give it a shot, my GoLang skills might be a bit rusty.
@wesselvdv Thank you for your contribution on this.
It's merged in and available under the following tags:
Seems this local implementation is missing TrentService.GetKeyPolicy for Terraform. I am able to deploy a kms key locally using this lib, but refreshing the state seems to require another route that isn't implemented. I could take a swing at it, see if I can create it myself.