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

Add ability to add private keys to trust store #3

Open
pmiles opened this issue Aug 15, 2022 · 0 comments
Open

Add ability to add private keys to trust store #3

pmiles opened this issue Aug 15, 2022 · 0 comments

Comments

@pmiles
Copy link

pmiles commented Aug 15, 2022

@kdubb - I have a use case where I need the following in my trust store:

CA cert
self signed cert
self signed cert's private key (in PEM format)

When I attempt to the the following TF, I get the error Error: chain 1, certificate 0: expected CERTIFICATE but found "EC PRIVATE KEY"

resource "tls_private_key" "es_key" {
  algorithm = "ECDSA"
}

resource "jks_trust_store" "ca" {
  certificates = [
    tls_private_key.es_key.private_key_pem,
  ]
  password = "none"
}

The small PR #2 fixes this.

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

1 participant