Skip to content

Instantly share code, notes, and snippets.

@yukiarrr
yukiarrr / create-cluster.sh
Created March 11, 2020 18:26
Create cluster on EKS, and install ALB Ingress Controller
#!/bin/bash -e
# Step1: Get env
if [ ! -e $CLUSTER_YAML_PATH ]; then
echo "Not found ${CLUSTER_YAML_PATH}."
exit 1
fi
cluster_name=$(yq r $CLUSTER_YAML_PATH metadata.name)
region=$(yq r $CLUSTER_YAML_PATH metadata.region)
@yukiarrr
yukiarrr / nested-stack-diff.sh
Created March 14, 2021 19:04
Check NestedStack diffs
#!/bin/bash -e
cdk synth > /dev/null
color=${1:-'--color'}
for stack_name in ${YOUR_PARENT_STACK_NAMES}; do
resources=$(aws cloudformation list-stack-resources --stack-name ${stack_name})
length=$(echo ${resources} | jq '.StackResourceSummaries | length')