The intent is to define terse, standards-supported names for AWS regions.
This file contains 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 | |
function getStatus () { | |
ifconfig | grep $1 && return 1 | |
return 0 | |
} | |
getStatus tun0 | |
if [[ $? == 0 ]]; | |
then |
This file contains 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
# Source: https://gist.github.com/f0d35ef2260208b15ddd390007fdd552 | |
###################################################################### | |
# Production-Ready Kubernetes Clusters Using Crossplane Compositions # | |
# https://youtu.be/uMC2QQfMctg # | |
###################################################################### | |
# Referenced videos: | |
# - Crossplane - GitOps-based Infrastructure as Code through Kubernetes API: https://youtu.be/n8KjVmuHm7A | |
# - How To Shift Left Infrastructure Management Using Crossplane Composites: https://youtu.be/AtbS1u2j7po |
This file contains 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
resource "aws_default_security_group" "this" { | |
count = var.create_vpc && var.manage_default_security_group ? 1 : 0 | |
vpc_id = aws_vpc.this[0].id | |
dynamic "ingress" { | |
for_each = var.default_security_group_ingress | |
content { | |
self = lookup(ingress.value, "self", null) | |
cidr_blocks = compact(split(",", lookup(ingress.value, "cidr_blocks", ""))) |
This file contains 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 | |
bucket=$1 | |
set -e | |
echo "Removing all versions from $bucket" | |
versions=`aws s3api list-object-versions --bucket $bucket |jq '.Versions'` | |
markers=`aws s3api list-object-versions --bucket $bucket |jq '.DeleteMarkers'` |
This file contains 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 | |
if [ "$EUID" -ne 0 ] | |
then echo "Must be root" | |
exit | |
fi | |
if [[ $# -lt 1 ]]; | |
then echo "You need to pass a password!" |