Skip to content

Utility functions for working around terraform limitations.

License

Notifications You must be signed in to change notification settings

mediapop/terraform-aws-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform utils

This terraform module is maintained by Media Pop, a software consultancy. Hire us to solve your DevOps challenges.

Repackage awkward terraform hacks into generic modules.

If then else

Works around for conditional operator cannot be used with list values

locals = {
   use_good_letters = true
   good_letters     = "${list("a", "b")}"
   bad_letters      = "${list("c")}"
}

module "letters_lookup" {
  source = "mediapop/aws/utils/if"
  if     = "${local.use_good_letters}"
  then   = "${local.good_letters}"
  else   = "${local.bad_letters}"
}

output "letters" {
  value = "${module.letters_lookup.result}"
}

Inputs

Name Description Type Default Required
if The condition. string - yes
then Value when true list - yes
else Value when false list - yes

Outputs

Name Description Type
result The result of the evaluation any

About

Utility functions for working around terraform limitations.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages