Working and non-working tests of Terraform's credential use.
Each test (each is a subdirectory of the tests/
directory) has a README and a Makefile. Follow the steps in the individual test's README and run make
:
$ make test
Adding working and, especially, non-working tests by forking and opening a pull request.
Making a new test:
git checkout -b my-awesome-test
cd tests
cp -R existing_similar_test new_name_for_your_test
cd new_name_for_your_test
README.md
, dotenv
and *.tf
files in new_name_for_your_test
make
which is equivalent to make test
) - make will setup the environment and run Terraform for you
make
will destroy
and clean up in the same passmake clean
should get rid of the resources and files (will also get rid of the logs which are helpful in debugging) (WARNING: some tests might leave resources that you'll have to manually delete in the AWS console/CLI)README.md
with the test name and statusgit add .
git commit -m "Add new test for (briefly describe the test)"
git push -u my-awesome-test
Variables affecting credentialling:
Where tests can be compared to determine the source of the problem:
Specific cases not captured in tests yet:
S3 Backend
terraform {
backend "s3" {
bucket = "mybucket"
key = "path/to/my/key"
region = "us-east-1"
}
}
Assume role
provider "aws" {
assume_role = "${var.workspace_iam_roles[terraform.workspace]}"
}