Skip to content

Instantly share code, notes, and snippets.

@jeremyyeo
jeremyyeo / README.md
Last active September 14, 2023 21:30
Overriding dbt Cloud default database / schema on CI runs #dbt

Overriding dbt Cloud default database / schema on CI runs

-!  🚨                                          WARNING                                          🚨  !-
You probably do not want to do this because dbt Cloud will not be able to drop the relevant schema 
upon PR merge / close so you will end up with clutter if you are not on top of this.

The following is the default behaviour of [dbt Cloud CI runs][1] when:

@takemikami
takemikami / README.md
Last active July 1, 2022 13:08
terraform for mwaa
@ThePredators
ThePredators / readme-mde.md
Last active June 8, 2024 09:56
Setup Mobile Development Environment

⭐ Setup Mobile Development Environment

⚠️ The following configuration has been tested on Intel, M1 & M2 Ships ⚠️

Pre-requisit :

If you have any issues with macOS, or need anything related to it check this documentation

Install Xcode Command Line tools :

@bogue1979
bogue1979 / Nomad_Agent_Autoscaling.tf
Last active May 1, 2022 11:15
Nomad Agent autoscaling
# SNS topic lifecycle hooks are sent to
resource "aws_sns_topic" "nomad_graceful_termination_topic" {
name = "${local.instance_prefix}-nomad_graceful_termination_topic"
}
resource "aws_sns_topic_policy" "nomad_graceful_termination_topic" {
arn = aws_sns_topic.nomad_graceful_termination_topic.arn
policy = data.aws_iam_policy_document.nomad_graceful_termination_topic_policy.json
}
data "aws_iam_policy_document" "nomad_graceful_termination_topic_policy" {
policy_id = "__default_policy_ID"
@jehptes
jehptes / aws_glue.tf
Last active December 14, 2020 12:53
Terraform Set up for AWS Glue
# Create an IAM role
resource "aws_iam_role" "glue" {
name = "AWSGlueServiceRoleDefault"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement": [
{
resource "vault_jwt_auth_backend" "oidc" {
description = "vault + OKTA + oidc"
path = "oidc"
type = "oidc"
oidc_discovery_url = "${var.OKTA_URL}"
oidc_client_id = "${var.OKTA_CLIENT_ID}"
oidc_client_secret = "${var.OKTA_CLIENT_SECRET}"
bound_issuer = "${var.OKTA_URL}"
default_role = "oidc"
@nicolasdao
nicolasdao / aws_serverless_recipes.md
Last active September 26, 2023 17:17
Recipes for AWS Lambda with Serverless Framework. A series of recipes to get shit done using the Serverless Framework. Keywords: serverless recipe code recipes lambda lambdas function

Lab 1: Lab Setup

Duration: 10 minutes

Each student should have received the lab workstation log in information from the instructor. This lab ensures that everyone can connect to the workstation, and verify that a Vault server is running so that vault commands can run against it.

  • Task 1: Connect to the Student Workstation
  • Task 2: Getting Help
  • Task 3: Enable Audit Logging
  • Task 4: Access Vault UI
@greenbrian
greenbrian / vault_demo.sh
Created June 23, 2019 20:06
Quick Vault demo usage
#!/bin/bash
## The following command starts Vault in development mode
## specifiying a root token value of 'root'
##
# VAULT_UI=true vault server -dev -dev-root-token-id="root"
## Login with root token
## Good for demo mode, should only be used on production cluster
## during initial configuration

Terraforming API Gateway to SQS queue

Example of a bare-minimum terraform script to setup an API Gateway endpoint that takes records and puts them into an SQS queue.

SQS

Start by creating the SQS queue.

resource "aws_sqs_queue" "queue" {