Skip to content

Instantly share code, notes, and snippets.

@sgpinkus
Created September 28, 2021 21:12
Show Gist options
  • Save sgpinkus/aaea4187ad029d514756bbf5e5d3a7b0 to your computer and use it in GitHub Desktop.
Save sgpinkus/aaea4187ad029d514756bbf5e5d3a7b0 to your computer and use it in GitHub Desktop.
terraform {
required_version = ">= 0.14.9"
}
variable "random" {
type = number
}
module "my_animal_module" {
source = "./my-animal-module"
random = var.random
gtr = 7
species_if = "monkey"
}
variable species {
default = "horse"
}
variable gtr {
type = number
}
variable species_if {
type = string
}
variable random {
type = number
}
resource "local_file" "animal" {
content = var.random > var.gtr ? var.species_if : var.species
filename = "./animal.txt"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment