Skip to content

Instantly share code, notes, and snippets.

View mclavel's full-sized avatar
:shipit:
Loading

Marcelo Clavel mclavel

:shipit:
Loading
View GitHub Profile
@mclavel
mclavel / self-signed-certificate-with-custom-ca.md
Created July 30, 2019 15:00 — forked from fntlnz/self-signed-certificate-with-custom-ca.md
Self Signed Certificate with Custom Root CA

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
#!/bin/sh
COMUNA='Santiago'
CALLE='Andres Bello'
NUMERO='2425'
curl -sG 'http://codigopostal.correos.cl:5004/' \
--data-urlencode 'calle='"$CALLE" \
--data-urlencode 'comuna='"$COMUNA" \
--data-urlencode 'numero='"$NUMERO" \
resource "google_container_cluster" "cluster" {
name = "example"
zone = "us-central1-a"
initial_node_count = 1
}
resource "google_container_node_pool" "pool" {
name = "pool"
cluster = "${google_container_cluster.cluster.name}"
zone = "us-central1-a"
resource "google_container_cluster" "cluster" {
name = "example"
zone = "us-central1-a"
initial_node_count = 1
}
resource "google_container_node_pool" "pool" {
name = "pool"
cluster = "${google_container_cluster.cluster.name}"
zone = "us-central1-a"
resource "random_string" "password" {
 length = 16
 special = true
}
resource "mysql_user" "root" {
 user = "root"
 host = "example.com"
 plaintext_password = "${sha256(bcrypt(random_string.password.result))}"
lifecycle {
resource "random_string" "password" {
 length = 16
 special = true
}
resource "mysql_user" "root" {
 user = "root"
 host = "example.com"
 plaintext_password = "${sha256(bcrypt(random_string.password.result))}"
}
resource "random_string" "password" {
 length = 16
 special = true
}
resource "mysql_user" "root" {
 user = "root"
 host = "example.com"
 plaintext_password = "${random_string.password.result}"
}
resource "mysql_user" "root" {
 user = "root"
 host = "example.com"
 plaintext_password = "securepassword"
}