View main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
locals { | |
configs = { | |
prod = [ | |
"prodconfiga", | |
"and", | |
"prodconfigb", | |
] | |
other = [ | |
"configa", | |
"configb", |
View main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 = { |
View locals.tf.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./locals.tf.json.real |
View main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |
} |
View main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
View foo.bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 |
View tf log
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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_" |
View aws
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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") \ |
View terraform.tfvars
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terragrunt { | |
terraform { | |
source = "git::https://gist.github.com/e193045664d62fbf8b1b93fd21e5914c.git//?ref=master" | |
} | |
remote_state { | |
backend = "s3" | |
config { | |
bucket = "t-villa-tg-0162" | |
dynamodb_table = "t-villa-tg-0162" | |
encrypt = true |
View main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
terraform { backend "s3" {} } | |
resource "random_pet" "pet" {} |
NewerOlder