There are cases where we hard code names instead of using the output of a resource.
Example, we create a DNS record for heliumedu.com in Route 53. Elsewhere, we rely on that entry, but we just hardcode heliumedu.com there as well, rather than using the output variable from the Route 53 module. The result is, on first env creation, we can experience race conditions (rerunning the Terraform will resolve this issue, since the resources are now created, but it can be a nuisance that first time you're provisioning an environment). depends_on is one way to fix this, but is sloppy, when we could instead just use outputs.
Using outputs would also like reduce the need for passing environment and environment_prefix around to as many modules.
There are cases where we hard code names instead of using the output of a resource.
Example, we create a DNS record for
heliumedu.com
in Route 53. Elsewhere, we rely on that entry, but we just hardcodeheliumedu.com
there as well, rather than using theoutput
variable from the Route 53 module. The result is, on first env creation, we can experience race conditions (rerunning the Terraform will resolve this issue, since the resources are now created, but it can be a nuisance that first time you're provisioning an environment).depends_on
is one way to fix this, but is sloppy, when we could instead just use outputs.Using outputs would also like reduce the need for passing
environment
andenvironment_prefix
around to as many modules.