You can conditionally deploy resources by setting the count on most resources. So you can have an environment variable with something like has_cache. Then in your terraform use a ternary or something to set the count to 1 if has_cache is true and 0 if it’s false. I have done this without much fuss.
No comments yet.