~damien/ca-provision-example

f3eb637cc773a1f6390bc8f888ef0402a1da3ce6 — Damien Radtke 3 years ago a862559 master
Add consul user during provision
1 files changed, 7 insertions(+), 0 deletions(-)

M server.tf
M server.tf => server.tf +7 -0
@@ 28,6 28,13 @@ resource "linode_instance" "server" {
  type             = "g6-nanode-1"
  authorized_users = [data.linode_profile.me.username]

  provisioner "remote-exec" {
    connection {
      host = self.ip_address
    }
    inline = ["useradd consul"]
  }

  provisioner "local-exec" {
    command = "./provision-cert --addr ${self.ip_address} --ca consul-agent --name ${local.cn} --owner consul"
  }