Skip to content

Instantly share code, notes, and snippets.

@abuxton
Created October 6, 2020 13:55
Show Gist options
  • Save abuxton/612b83ae44551f9578366bc9f71cde92 to your computer and use it in GitHub Desktop.
Save abuxton/612b83ae44551f9578366bc9f71cde92 to your computer and use it in GitHub Desktop.
consul generate tls certs example script
#!/bin/bash
AWS_REGION="eu-west-2"
consul tls ca create
consul tls cert create -server -dc=$AWS_REGION
consul tls cert create -client -dc=$AWS_REGION
mv consul-agent-ca.pem consul_ca.pem
mv consul-agent-ca-key.pem consul_ca_key.pem
mv $AWS_REGION-server-consul-0.pem consul_server_crt.pem
mv $AWS_REGION-server-consul-0-key.pem consul_server_key.pem
cat $AWS_REGION-client-consul-0.pem consul_ca.pem > vault_crt.pem
mv $AWS_REGION-client-consul-0-key.pem vault_key.pem
rm $AWS_REGION-client-consul-0.pem
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment