Hello,
I’m generating some certificates using tls_locally_signed_cert
. So these are, let’s say, tls_locally_signed_cert.server1, .server2, .server3 etc.
I want to inject these certificate for all these servers through cloudinit inside template_cloudinit_config
using a templatefile.
What I tried inside the templatefile block was:
server_certificates = tls_locally_signed_cert.${each.key}.cert_pem
But I realised afterwards that this cannot be done, because you can’t call resources using variables, and I get “This character is not used within the language.”
Is there any trick that I can use in this case?