We use a config file so we can set ngrok's API port (web_addr). We use
the API to get the public URL and if there's already ngrok running, it
will just choose a random API port and we won't be able to get the right
url.
- This will make the help output easier to read. To accomplish this, we
needed to not set defaults via cobra because then the default would be
printed on another line which looks bad. So now we set the defaults
ourselves.
- Also had to update spf13/pflag to the version that supports newlines
in flag descriptions.
- run terraform with TF_PLUGIN_CACHE_DIR set so that terraform init will
be faster.
- check which workspace we're in and don't switch unless we need to.
- run terraform with TF_IN_AUTOMATION set so the plan output doesn't
have instructions that don't make sense. Ex.
```
This plan was saved to: /tmp/atlantis/data/repos/lkysow/atlantis-example/3/default/default.tfplan
To perform exactly these actions, run the following command to apply:
terraform apply "/tmp/atlantis/data/repos/lkysow/atlantis-example/3/default/default.tfplan"
```
- added tests
- moved AutomaticEnv() call into the init() function of the server flag
so it's set when we run the tests. Before it was in main().
- Set SetTypeByDefaultValue to true so boolean flags can be specified as
env vars.
Saw in the TF code how they were validating workspace names
and decided to do the same. '..' is actually a valid TF workspace but we
don't support that.
* Removed reference to tfvars as this was misleading when used in
conjuntion with preplan.
* updated the terraform_version example that's referenced
when doing a mock run of the schema.
* Updated varfile name to recommended name
Add Apache 2 license and Hootsuite copyright to all golang
files. Add a disclaimer that the files have been modified
hereafter by contributors to this repo in order to abide
by the Apache 2 license requirements.
Fixes#55. GitHub will throw an error if the comment is over
65535 characters. Now we will split up a comment into multiple
comments if it's over that size.