Before you can deploy the architecture with Terraform you will need to set the variables that Terraform will use to generate the AWS services. First, You will need to clone and change directory to the the NervesHub Terraform repo. From there you can copy the example tfvars file:
cp terraform.tfvars.example terraform.tfvars
If you haven't done so yet, you will need to configure your AWS credentials so that the AWS CLI tool can access AWS. Please note the associated profile name. Finally, fill out the variables in the newly created
terraform.tfvarswith the data that will best support your instance of NervesHub. Below is a brief description of required or important variables and suggested values:
region= the region to which you want the app deployed e.g.
profile= the profile from your AWS credentials file that will grant Terraform access to AWS
bucket_prefix= the prefix for all S3 buckets that will be generated
key= name for the Terraform state file e.g.
operators= a list of IAM users
db_username= name for db user
db_password= securely generated random string password for the DB
web_secret_key_base= securely generated random string (e.g.
erl_cookie= securely generated random string (e.g.
www_live_view_signing_salt= securely generated random string (e.g.
mix phx.gen.secret 32)
ca_image= docker repo for nerves_hub_ca e.g.
www_image= docker repo for nerves_hub_www e.g.
device_image= docker repo for nerves_hub_device e.g.
api_image= docker repo for nerves_hub_api e.g.
whitelist= a list of IP addresses that can access the site (optional, usually used for a staging environment)
WARNING: If you generate passwords and salts, make sure to avoid special characters that could cause escape issues or may be otherwise unacceptable for their intended usage.