jsiebens / terraform-equinix-faasd

Terraform Module for how to deploy a faasd instance on Equinix Metal
MIT License
2 stars 1 forks source link

Add a sample tfvars file #3

Closed alexellis closed 3 years ago

alexellis commented 3 years ago

Since this module abstracts away Equinix Metal, adding a sample tfvars file with the various values required to use this module i.e. auth_token would help new users of the module to get this working.

It seems like there's a degree of assumed knowledge that would prevent a user from consuming the module.

Adding auth_token = "" to a tfvars file also doesn't help:

terraform plan -var-file=main.tfvars
╷
│ Warning: Value for undeclared variable
│ 
│ The root module does not declare a variable named "auth_token" but a value was found in file "main.tfvars". If you meant to use this value, add a "variable" block to the configuration.
│ 
│ To silence these warnings, use TF_VAR_... environment variables to provide certain "global" settings to all configurations in your organization. To reduce the verbosity of these warnings, use the -compact-warnings option.
╵
╷
│ Error: Missing required argument
│ 
│ The argument "auth_token" is required, but was not set.
jsiebens commented 3 years ago

An auth_token is required when configuring the Equinix Metal provider and shouldn't be part of this module but instead in a root module using this module.

An example is now available to illustrate this and also has a sample tfvars file See commit 1f7567a5c5931e9d78a3e21b25fa866522e0bd3f