Created
October 6, 2020 13:55
-
-
Save abuxton/612b83ae44551f9578366bc9f71cde92 to your computer and use it in GitHub Desktop.
consul generate tls certs example script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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