From dfda2fecd69945e123d7bcd9f0e4c4c04db2bcf0 Mon Sep 17 00:00:00 2001 From: Graham Davison Date: Wed, 9 Dec 2020 12:39:48 -0800 Subject: [PATCH] Adds support for AWS_CONTAINER_CREDENTIALS_FULL_URI for authentication --- aws/provider_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aws/provider_test.go b/aws/provider_test.go index c83a667ca6f..8cbab7ba700 100644 --- a/aws/provider_test.go +++ b/aws/provider_test.go @@ -191,8 +191,8 @@ func testAccPreCheck(t *testing.T) { // Since we are outside the scope of the Terraform configuration we must // call Configure() to properly initialize the provider configuration. testAccProviderConfigure.Do(func() { - if os.Getenv("AWS_PROFILE") == "" && os.Getenv("AWS_ACCESS_KEY_ID") == "" { - t.Fatal("AWS_ACCESS_KEY_ID or AWS_PROFILE must be set for acceptance tests") + if os.Getenv("AWS_PROFILE") == "" && os.Getenv("AWS_ACCESS_KEY_ID") == "" && os.Getenv("AWS_CONTAINER_CREDENTIALS_FULL_URI") == "" { + t.Fatal("AWS_ACCESS_KEY_ID, AWS_PROFILE, or AWS_CONTAINER_CREDENTIALS_FULL_URI must be set for acceptance tests") } if os.Getenv("AWS_ACCESS_KEY_ID") != "" && os.Getenv("AWS_SECRET_ACCESS_KEY") == "" {