From 402f321abe108aa4729397bb0a92e45958912daa Mon Sep 17 00:00:00 2001 From: James Bardin Date: Tue, 17 Oct 2017 19:02:21 -0400 Subject: [PATCH] change import module inheritance test Importing into a module requires a provider config. Update the inheritance test to reflect the new import restrictions. --- terraform/context_import_test.go | 8 +++----- .../child/main.tf | 0 .../main.tf | 0 3 files changed, 3 insertions(+), 5 deletions(-) rename terraform/test-fixtures/{import-provider-inherit => import-provider-module}/child/main.tf (100%) rename terraform/test-fixtures/{import-provider-inherit => import-provider-module}/main.tf (100%) diff --git a/terraform/context_import_test.go b/terraform/context_import_test.go index df5d879949..527b74e93f 100644 --- a/terraform/context_import_test.go +++ b/terraform/context_import_test.go @@ -226,12 +226,10 @@ func TestContextImport_moduleProvider(t *testing.T) { } } -// Test that import sets up the graph properly for provider inheritance -// FIXME: import must declare a provider in an empty config. Should that go -// back to being automatically inherited? -func TestContextImport_providerInherit(t *testing.T) { +// Importing into a module requires a provider config in that module. +func TestContextImport_providerModule(t *testing.T) { p := testProvider("aws") - m := testModule(t, "import-provider-inherit") + m := testModule(t, "import-provider-module") ctx := testContext2(t, &ContextOpts{ Module: m, ProviderResolver: ResourceProviderResolverFixed( diff --git a/terraform/test-fixtures/import-provider-inherit/child/main.tf b/terraform/test-fixtures/import-provider-module/child/main.tf similarity index 100% rename from terraform/test-fixtures/import-provider-inherit/child/main.tf rename to terraform/test-fixtures/import-provider-module/child/main.tf diff --git a/terraform/test-fixtures/import-provider-inherit/main.tf b/terraform/test-fixtures/import-provider-module/main.tf similarity index 100% rename from terraform/test-fixtures/import-provider-inherit/main.tf rename to terraform/test-fixtures/import-provider-module/main.tf