Skip to content

Instantly share code, notes, and snippets.

View andresvia's full-sized avatar
💭
adsking

Andres Villarroel andresvia

💭
adsking
View GitHub Profile
module "ue1" {
source = "git::https://gist.github.com/0ddd58161ecc62163f2bd0bfef09e79c.git//?ref=master"
}
module "uw2" {
source = "git::https://gist.github.com/0ddd58161ecc62163f2bd0bfef09e79c.git//?ref=master"
}
output "result" {
value = {
module "core1" {
source = "git::https://gist.github.com/a0757d5396e36c10a5dee7ba00f16307.git//?ref=master"
}
// normally there are other things here...
// adding core2 just as filler
module "core2" {
source = "git::https://gist.github.com/a0757d5396e36c10a5dee7ba00f16307.git//?ref=master"
}
module "config" {
source = "git::https://gist.github.com/7ee8813d4f1df942bb21a9386b457888.git//?ref=master"
}
resource "random_pet" "core" {
prefix = join("-", module.config.config)
}
output "core" {
value = random_pet.core.id
locals {
configs = {
prod = [
"prodconfiga",
"and",
"prodconfigb",
]
other = [
"configa",
"configb",
./locals.tf.json.real
root@60b4defcedf2:/tmp/tf012# ls -lhart
total 41M
-rwxrwxr-x 1 root root 41M Feb 28 21:12 terraform
-rw-r--r-- 1 root root 73 Mar 19 00:54 main.tf
drwxr-xr-x 4 root root 128 Mar 19 00:58 .
drwxrwxrwt 1 root root 4.0K Mar 19 00:58 ..
root@60b4defcedf2:/tmp/tf012# cat main.tf
resource "random_pet" "random_pet" {
name_prefix = "random_pet_"
@andresvia
andresvia / aws
Last active August 1, 2018 22:02
aws
#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
trap - INT TERM
docker run --rm \
-t $(tty &>/dev/null && echo "-i") \
@andresvia
andresvia / main.tf
Last active July 13, 2018 21:31
terragrunt repro child repo
terraform { backend "s3" {} }
resource "random_pet" "pet" {}
@andresvia
andresvia / main.tf
Last active July 13, 2018 21:31
terragrunt repro parent repo
terraform { backend "s3" {} }
module "module" {
source = "git::https://gist.github.com/2df54ba3bfff410c38fd9cf7acc59f5d.git//?ref=master"
}