Skip to content

Instantly share code, notes, and snippets.

View welshstew's full-sized avatar
😎
henlo world

Stuart Winchester welshstew

😎
henlo world
View GitHub Profile
@welshstew
welshstew / aurora_cluster.tf
Created April 6, 2020 16:11 — forked from hartzell/aurora_cluster.tf
Creates a AWS RDS Aurora Cluster with Terraform
########################
## Variables
########################
variable "environment_name" {
description = "The name of the environment"
}
variable "vpc_id" {
# Create Project
curl -XGET --insecure --header "Authorization: Bearer AA1Pvl4ITa9ZtYO9wvALU0Sck1JUd-PzptUTGSyqdZc" https://10.2.2.2:8443/oapi/v1/projectrequests
curl -XPOST --insecure --header "Authorization: Bearer AA1Pvl4ITa9ZtYO9wvALU0Sck1JUd-PzptUTGSyqdZc" --header "Content-Type: application/json" https://10.2.2.2:8443/oapi/v1/projectrequests -d @projectrequest.json
# Create template
wget https://raw.githubusercontent.com/openshift/origin/master/examples/quickstarts/cakephp-mysql.json
curl -XPOST --insecure --header "Authorization: Bearer AA1Pvl4ITa9ZtYO9wvALU0Sck1JUd-PzptUTGSyqdZc" --header "Content-Type: application/json" https://10.2.2.2:8443/oapi/v1/namespaces/test2/processedtemplates -d @cakephp-mysql.json -o processed-cakephp-mysql.json
# Now loop over the items, and create the "objects"
NUMBER_OF_RESOURCES=$(cat processed-cakephp-mysql.json| jq '.objects | length')