We use the terraform vault provider to manage a vault system, and started working PKI. I went through the example:
And while I had no issues withthe the example, There are a few oddities that I’m not certain is a bug, my missunderstanding, or my automation. For the example, you are constantly adding code to TF file, until the whole thing is created. My question is how to handle rotating a certificate. From what I see from the docs, you can use the “vault_pki_secret_backend_config_issuers” setting the “option default_follows_latet_issuer = true”.
While the example in the provider docs works when setting the root, the id of the issuer is not present when using set_certificate in the intermediate certificates. Additionaly, once I added the the resource “vault_pki_secret_backend_config_issuers” and set the follow_latest_issuers = true, I had to remove it to get the default to move to my next set_signed resource. Once I placed it back, it would morve default to what was coded in the resource.
Is there a guide or something on managing the rotation and creation of certificates ? Or is this one of those things - since the state will change - that does not make sense to manage in TF ?
It is fine - default goes from my v.1.3 to my v1.4. But If I run the same code again - without changes, will relink to the hardcoded ( v1.3) issuing form the config issuers block.