Skip to content

Instantly share code, notes, and snippets.

View egarbi's full-sized avatar

Enrique Garbi egarbi

View GitHub Profile
@egarbi
egarbi / LocroRecipe.md
Last active January 30, 2024 12:57
Locro Recipe

Locro Recipe

Locro is a traditional dish that originated in Argentina and is also popular in other South American regions. The recipe I am sharing is my own adaptation of the Argentine version, modified to make it easier to prepare in Europe. While you can customize this recipe to your liking by adding your preferred ingredients, I believe that three essential ingredients cannot be left out or changed for it to be considered "Locro." These are:

  • White Corn
  • Calabaza
  • Spicy Chorizo

Main Ingredients

@egarbi
egarbi / gist:a194c45b58c9b9b9b1f37b76bdf0f620
Created January 17, 2024 16:55
Check providers to see if they are using full address
find ./.terraform -type f -name versions.tf -exec grep source {} \;
source = "hashicorp/aws"
source = "hashicorp/aws"
source = "hashicorp/random"
source = "hashicorp/aws"
source = "hashicorp/random"
source = "hashicorp/aws"
source = "hashicorp/random"
source = "hashicorp/null"
source = "hashicorp/aws"
@egarbi
egarbi / Makefile
Created June 7, 2016 12:22
Multienvironment Makefile
.PHONY: all-test plan-test apply-test destroy-test all-prod plan-prod apply-prod destroy-prod
all-test: plan-test apply-test
all-prod: plan-prod apply-prod
plan-test:
terraform plan -var 'env=testing' -var-file terraform.tfvars -out terraform.tfplan.test -state=terraform.tfstate.test -input=true
plan-prod:
terraform plan -var 'env=prod' -var-file terraform.tfvars -out terraform.tfplan.prod -state=terraform.tfstate.prod -input=true
@egarbi
egarbi / variable.tf
Created June 7, 2016 12:16
My multienvironment Terraform variable file
ariable "region" {
default = "eu-west-1"
}
variable "itype" {
default = {
prod = "t2.medium"
testing = "t2.small"
}
}
@egarbi
egarbi / gist:e239e1edf916f72e437a24964478b8e0
Created June 7, 2016 11:03
taint in one instance triggers the provisioning in all of them
I have this "triggers { cluster_instance_ids = "${element(aws_instance.elasticsearch.*.id, count.index)}" }"
associated to 2 elasticsearch instances
now the problem is, suppose I need to rebuild just one instance...
$ terraform taint -state=terraform.tfstate.test -module=escluster aws_instance.elasticsearch.1
the trigger is actually triggering the reprovision in both instances
not only on the one was tainted
ideas?