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
eksctl create cluster --region us-east-1 --enable-types all --fargate --name cluster-name |
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
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: mongocli | |
namespace: mongodb | |
spec: | |
template: | |
spec: | |
restartPolicy: Never | |
containers: |
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
#!/usr/bin/env bash | |
# Fetch latest mongocli for bundling | |
TARBALL=$(curl -sL https://github.com/mongodb/mongocli/releases/latest | grep ".tar.gz" | head -1 | cut -d'=' -f2 | cut -d' ' -f1) | |
echo "Fetching ${TARBALL}" | |
curl -OL "https://github.com${TARBALL}" | |
tar xvf ${TARBALL} | |
cp ${TARBALL}/mongocli ./mongocli.latest | |
rm ${TARBALL} | |
ls -l ./*mongocli* |
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
#!/usr/bin/env bash | |
echo "MongoDB Atlas CloudFormation Resource Devloper Docker Shell" | |
echo "-----------------------------------------------------------" | |
if [ -x "$(command -v mongocli)" ]; then | |
echo 'No apikey arguments detected and mongocli installed, will use default mongocli profile.' | |
MCLI_ARGS=$(./export-mongocli-config.py default spaces) | |
export MCLI_PUBLIC_API_KEY=$(echo ${MCLI_ARGS} | cut -d' ' -f1) | |
export MCLI_PRIVATE_API_KEY=$(echo ${MCLI_ARGS} | cut -d' ' -f2) |
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
# syntax=docker/dockerfile:1.0.0-experimental | |
FROM ubuntu:20.04 | |
ARG DEBIAN_FRONTEND=noninteractive | |
ARG AWS_DEFAULT_REGION | |
ARG AWS_ACCESS_KEY_ID | |
ARG AWS_SECRET_ACCESS_KEY | |
ARG AWS_SESSION_TOKEN | |
ARG CFN_CLI_SDK | |
RUN apt-get update && apt-get install -y \ |
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
#!/usr/bin/env bash | |
echo "MongoDB Atlas CloudFormation Resource Devloper Docker Shell" | |
echo "-----------------------------------------------------------" | |
if [ -x "$(command -v mongocli)" ]; then | |
echo 'No apikey arguments detected and mongocli installed, will use default mongocli profile.' | |
MCLI_ARGS=$(./export-mongocli-config.py default spaces) | |
export MCLI_PUBLIC_API_KEY=$(echo ${MCLI_ARGS} | cut -d' ' -f1) | |
export MCLI_PRIVATE_API_KEY=$(echo ${MCLI_ARGS} | cut -d' ' -f2) |
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
#!/usr/bin/env bash | |
# | |
# aws-access-lister.sh | |
# | |
# This utility script can be used to maintain the Access List for | |
# a MongoDB Atlas Programatic API Key. For example, when running on AWS lambda | |
# the IP-address of the host is not know beforehand and thus it's not possible to | |
# securly configure an api key. This script will dynamically fetch a valid set of | |
# IP ranges directly from AWS and then either create a new apikey or modify an existing key |
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
#!/usr/bin/env bash | |
#PUBLIC_KEY=${1:-${ATLAS_PUBLIC_KEY}} | |
#PRIVATE_KEY=${1:-${ATLAS_PRIVATE_KEY}} | |
#ORG_ID=${1:-${ATLAS_ORG_ID}} | |
# | |
# aws-access-lister.sh | |
# |
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
#!/usr/bin/env bash | |
REGION="${1:-us-east-1}" | |
FILTER="${2:-XXX}" | |
STACKS=$(aws cloudformation describe-stacks --region ${REGION} --output text --query 'Stacks[*].{Stack:StackName}' | grep "${FILTER}") | |
if [[ "$*" == *killall* ]] | |
then | |
echo "*********** killall initiated ******************" | |
STACKS=$(aws cloudformation describe-stacks --region ${REGION} --output text --query 'Stacks[*].{Stack:StackName}') | |
echo "Region: ${REGION} Stacks: ${STACKS}" | |
fi |
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
{ | |
"typeName": "MongoDB::Atlas::Deployment", | |
"description": "An example resource schema demonstrating some basic constructs and validation rules.", | |
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git", | |
"definitions": { | |
"ApiKey": { | |
"type": "object", | |
"$comment": "A valid MongoDB Cloud API Key", | |
"properties": { | |
"PublicKey": { |
NewerOlder