Anyone here managed to get the addition of the Hashicorp apt repos baked into cloud-init? The current config I have, which I havent touched for a long while, appears to have stopped working. Here is what I have in my cloud-init currently:
Earlier this year (in April) the original signing key for this repository was revoked because we were unable to prove that its private counterpart wasn’t exposed by a CircleCI security incident. If the last time this was working for you was during or before April then this might be the cause of the problem.
However, I can see that the first three lines of the public key block you shared match the public key I just fetched from the server, so this might not actually be the problem. I suggest fetching the current key (linked from the Official Packaging Guide you already found) and checking whether the whole thing matches what’s in your cloud-config YAML file.
Unfortunately at the moment I don’t have any other ideas to share. I’m not familiar with this specific technique, and the documentation for this apt cloud-config module didn’t give me any clues: what you’ve shared seems consistent with what’s mentioned in the documentation for sources, although the formatting of that part of the docs is currently a little hard to read.
I can confirm the key I am using is the current correct one.
I have found a couple of references to known bugs with cloud-init assuming that the gpg binary is available on the machine during this part of its flow, when in fact it is not. My plan is to first chase things down that rabbit hole and see what I find. Failing that, I think im just going replicate the scripted steps in the Hashicorp docs under a runcmd: section in the YAML and move on with my life.
The cloud-init docs are… something. There is a lot of them, there are a lot of examples, yet cloud-init can still be difficult to deal with. Like a lot of Hashicorp’s doco and products if im honest.
I’ll post back here with what I find. In the meantime, hopefully someone else here has solved this?