Skip to content

Instantly share code, notes, and snippets.

View jamengual's full-sized avatar
🎯
Focusing in life after 40

PePe Amengual jamengual

🎯
Focusing in life after 40
View GitHub Profile
@jamengual
jamengual / cleanup_many_terraform_locks.md
Created January 13, 2022 18:30 — forked from jim80net/cleanup_many_terraform_locks.md
Accidentally abort a large terragrunt run?

Oops, now you've got a bunch of locked modules. Here's a brute force method to remove every lock from dynamodb. Use this with caution.

Lets say your terraform is configured like this:

terraform {
  required_version = "= 1.0.8"

  required_providers {
    aws = {
@jamengual
jamengual / tf.plan
Created September 18, 2019 19:23
Terraform clobal databases
# module.db_secondary_cluster.aws_rds_cluster.default[0] will be updated in-place
~ resource "aws_rds_cluster" "default" {
apply_immediately = true
arn = "arn:aws:rds:us-west-2:1111111111111111:cluster:example-stage-dbsecondary"
availability_zones = [
"us-west-2a",
"us-west-2b",
"us-west-2c",
]
backtrack_window = 0
@jamengual
jamengual / containerDefinitions.json
Created June 17, 2019 18:42
terraform-datadog-ecs-ec2
[
{
"name": "datadog-agent",
"image": "datadog/agent:latest",
"cpu": ${cpu},
"memory": ${memory},
"essential": true,
"portMappings": [
{
"containerPort": 8126,
2019/04/05 12:26:46 [INFO] Terraform version: 0.11.13
2019/04/05 12:26:46 [INFO] Go runtime version: go1.11.5
2019/04/05 12:26:46 [INFO] CLI args: []string{"/usr/local/bin/terraform", "console"}
2019/04/05 12:26:46 [DEBUG] Attempting to open CLI config file: /Users/jamengual/.terraformrc
2019/04/05 12:26:46 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2019/04/05 12:26:46 [INFO] CLI command args: []string{"console"}
2019/04/05 12:26:46 [DEBUG] command: loading backend config file: /Users/jamengual/github
2019/04/05 12:26:46 [INFO] command: backend config not found, returning nil: /Users/jamengual/github
2019/04/05 12:26:46 [INFO] command: no config, returning nil
2019/04/05 12:26:46 [DEBUG] command: no data state file found for backend config
@jamengual
jamengual / ngx_pagespeed
Last active December 16, 2015 17:29
How to Build nginx 1.4.0 and ngx_pagespeed in Ubuntu/Debian
Create a directory to download necessary packages (optional) :
```
mkdir pagespeed && cd pagespeed
```
Make sure that you have latest version of nginx, I recommend using nginx repo.
To add nginx repo :
wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key