*The meter uses results tagged as "before meal" to find high patterns. Tagging is not necessary to find low patterns.

The Bluetoothword mark and logos are registered trademarks owned by Bluetooth SIG, Inc., and any use of such marks by LifeScan Scotland Ltd. Is under license. Other trademarks and trade names are those of their respective owners.

Not sure which meter is right for you? Use our handy tool to help you choose

Here’s the tricky part—how do we manage the infrastructure for a remote backend or, in other words, how do we solve the chicken or the egg problem?

Unfortunately, the Terraform docs didn’t give us a clear answer. Likewise, the Internet was not much help in that respect—most people simply recommended that we create a base infrastructure by hand. However, together with Robert Wysocki, our DevOps magician, we decided to avoid that particular approach, and set out to find a more portable solution—one that we would now like to share with you here.

Our first thought was to use the
-backend=false
flag in order to temporarily disable the remote backend and reuse single manifest twice:

Unfortunately, this didn't work for us as it looked like the flag simply... did nothing.

So we decided to go with a directory layout like the one outlined below:

Ultimately, we had to hardcode the configuration into the backend block itself. That meant duplicating the same variables for our backend module (responsible for the creation of the S3 bucket, DynamoDB, and other components).