Skip to content

Instantly share code, notes, and snippets.

View themathmagician's full-sized avatar

themathmagician

View GitHub Profile
@mdlavin
mdlavin / lambda-function-xray-enablement.tf
Last active July 23, 2024 14:40
Terraform configuration to enable X-Ray for a Lambda function
resource "aws_lambda_function" "service" {
# Your usual aws_lambda_function configuration settings here
tracing_config {
mode = "Active"
}
}

Tainting and Labeling Kubernetes Nodes to Run Special Workload - A quick guide that is finally NOT confusing

All right folks, I intend to keep this one short and that's what I will do. I mean, it's supposed to be easy but the official documentations(1, 2) make it unnecessary confusing. So I think maybe I can help filling in the gap.

I will be using one of our business requirements at Buffer in this project, as the example for this blog post.

Quick recap

So, we need a few nodes that are dedicated to running cronjobs, and nothing else. At the same time we want to make sure the cornjobs are scheduled to these nodes, and nowhere else. This means we need 2 things

@mattmahn
mattmahn / README.md
Last active December 4, 2024 18:16
Terraform: Get current Git commit SHA

This will return the full Git commit SHA of whichever branch is currently checkedout.

Dump the snippet into terraform console (run from within a Git repo) to see for yourself.

# Source: https://gist.github.com/808108069f709572f1bc372c65f6b5c0
###########
# Prepare #
###########
# Option 1:
# Create a Kubernetes cluster
# Install NGINX Ingress
# Install Argo CD
@rollendxavier
rollendxavier / .tflint.hcl
Created February 1, 2022 07:19
A sample tflint hcl configuration file for terraform with Azure
config {
module = true
disabled_by_default = false
varfile = ["dev.tfvars", "prod.tfvars"]
}
plugin "azurerm" {
enabled = true
version = "0.14.0"
source = "github.com/terraform-linters/tflint-ruleset-azurerm"