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
variable "TRANSFER_HOST_KEY" {} | |
locals { | |
transfer = { | |
az_count = 2 | |
} | |
} | |
resource "aws_eip" "transfer" { | |
count = local.transfer.az_count |
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
$ chmod +x install.sh | |
$ docker build -t pipenv . | |
$ docker create --name pipenv pipenv | |
$ docker cp pipenv:/pipenv . | |
$ diff pipenv/2018.11.14/Pipfile pipenv/2018.05.18/Pipfile && echo "no difference" | |
2d1 | |
< name = "pypi" | |
5,6c4 | |
< | |
< [dev-packages] |
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
Error: Error in function call | |
on .terraform/modules/client_vpc/terraform-aws-vpc-2.39.0/main.tf line 20, in locals: | |
20: vpce_tags = merge( | |
21: var.tags, | |
22: var.vpc_endpoint_tags, | |
23: ) | |
|---------------- | |
| var.tags is empty map of string | |
| var.vpc_endpoint_tags is empty map of string |
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
import logging | |
from concurrent import futures | |
from typing import List, Tuple | |
import boto3 | |
from django.conf import settings | |
from django.core.management import BaseCommand | |
from whitenoise.middleware import WhiteNoiseMiddleware | |
log = logging.getLogger(__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
FROM golang:1.12-alpine as builder | |
ARG VERSION=2.3.930.0 | |
RUN set -ex && apk add --no-cache make git gcc libc-dev curl bash && \ | |
curl -sLO https://github.com/aws/amazon-ssm-agent/archive/${VERSION}.tar.gz && \ | |
mkdir -p /go/src/github.com && \ | |
tar xzf ${VERSION}.tar.gz && \ | |
mv amazon-ssm-agent-${VERSION} /go/src/github.com/amazon-ssm-agent && \ | |
cd /go/src/github.com/amazon-ssm-agent && \ | |
echo ${VERSION} > VERSION && \ | |
gofmt -w agent && make checkstyle || ./Tools/bin/goimports -w agent && \ |
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
""" | |
S3 Storage served via private Cloudfront URL | |
https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/PrivateContent.html | |
https://github.com/boto/boto3/blob/develop/boto3/examples/cloudfront.rst | |
""" | |
import datetime | |
from botocore.signers import CloudFrontSigner | |
from cryptography.hazmat.backends import default_backend | |
from cryptography.hazmat.primitives import hashes, serialization |
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 | |
# USAGE: CLUSTER=mycluster SERVICE=myservice ./docker-exec-ecs.sh | |
set -euf -o pipefail | |
TASK_ARN=$(aws ecs list-tasks --cluster=$CLUSTER --service=$SERVICE \ | |
| jq -r .taskArns[0]) | |
if [ "$TASK_ARN" = "null" ]; then | |
echo "Could not find any running tasks for $SERVICE on cluster:$CLUSTER." | |
exit 1 | |
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
import logging.config | |
from django.utils.log import DEFAULT_LOGGING | |
# ======= | |
# LOGGING | |
# ======= | |
LOGGING_CONFIG = None | |
LOGLEVEL = os.getenv("LOGLEVEL", "info").upper() |
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
# Add CORS header for Origin's which match a regexp | |
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Access-Control-Allow-Origin#Examples | |
route-if = regexp:${HTTP_ORIGIN};^.*\.example\.com$ addheader:Access-Control-Allow-Origin: ${HTTP_ORIGIN} |
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
[tool.poetry] | |
name = "tmp" | |
version = "0.1.0" | |
description = "" | |
authors = ["User <[email protected]>"] | |
[tool.poetry.dependencies] | |
python = "^3.7" | |
requests = "^2.21" | |
sentry-sdk = "^0.7.11" |