-
Notifications
You must be signed in to change notification settings - Fork 103
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
tls_cert_request not recreated when private_key_pem changes #255
Comments
I just checked with hashicorp/tls v3.4.0. There a change of So this is a bug that was introduced in version 4.
|
…xp used identifies that BEGIN and END text can contain spaces, for instance -----BEGIN RSA PRIVATE KEY----- (#255)
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Terraform CLI and Provider Versions
Terraform Configuration
Expected Behavior
When the private key changes, the CSR should be recreated.
Actual Behavior
The CSR stays unchanged. Only the private_key_pem attribute in terraform state is changed.
Steps to Reproduce
terraform apply
terraform state pull | jq -r '.resources[] | select(.type == "tls_cert_request") | .instances[0].attributes.cert_request_pem' | openssl req -noout -modulus | openssl md5
terraform state pull | jq -r '.resources[] | select(.type == "tls_private_key").instances[0].attributes.private_key_pem' | openssl rsa -noout -modulus | openssl md5
→ Both md5 hashes match at this point.
terraform taint tls_private_key.this
terraform apply
terraform state pull | jq -r '.resources[] | select(.type == "tls_cert_request") | .instances[0].attributes.cert_request_pem' | openssl req -noout -modulus | openssl md5
terraform state pull | jq -r '.resources[] | select(.type == "tls_private_key").instances[0].attributes.private_key_pem' | openssl rsa -noout -modulus | openssl md5
→ CSR is unchanged. md5 hashes do not match
How much impact is this issue causing?
High
Code of Conduct
The text was updated successfully, but these errors were encountered: