Writing Terraform configurations
Use locals
to specify explicit dependencies between resources
locals
to specify explicit dependencies between resourcesHelpful way to give a hint to Terraform that some resources should be deleted before even when there is no direct dependency in Terraform configurations.
https://raw.githubusercontent.com/antonbabenko/terraform-best-practices/master/snippets/locals.tf
Terraform 0.12 - Required vs Optional arguments
Required argument
index_document
must be set, ifvar.website
is not an empty map.Optional argument
error_document
can be omitted.
main.tf
terraform.tfvars
Last updated