Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.x is breaking the usage of KMS key #10

Open
mmiranda opened this issue Dec 22, 2023 · 1 comment
Open

v0.3.x is breaking the usage of KMS key #10

mmiranda opened this issue Dec 22, 2023 · 1 comment

Comments

@mmiranda
Copy link

It seems the new version 0.3.x broke the usage of KMS keys instead of public/private key.

As I can see, according to the comment https://github.com/syndbg/terraform-provider-vaulted-null/blob/main/internal/provider/provider.go#L191-L193

// NOTE: AWS KMS Asymmetric encryption is assumed.
// Public key here would be one retrieved from AWS KMS.
publicKey, err := readPublicKey(d, osExecutor, rsaSvc)

the method readPublicKey always expects the param public_key_content and completely ignores the kms usage.

func readPublicKey(
   d *schema.ResourceData,
   osExecutor os.OsExecutor,
   rsaSvc *rsa.Service,
) (*stdRsa.PublicKey, error) {
   var publicKey *stdRsa.PublicKey

   publicKeyContentTypeless := d.Get("public_key_content")
@maxforasteiro
Copy link

this is a solution attempt: #11

Since there are no tests, I'm not sure if I'm breaking any other expected behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants