update test fixtures for better imports

This commit is contained in:
James Bardin 2022-06-20 14:19:41 -04:00
parent e97ae28441
commit c002bab730
2 changed files with 15 additions and 2 deletions

View File

@ -52,9 +52,20 @@ func TestContextImport_basic(t *testing.T) {
}
}
// import 1 of count instances in the configuration
func TestContextImport_countIndex(t *testing.T) {
p := testProvider("aws")
m := testModule(t, "import-provider")
m := testModuleInline(t, map[string]string{
"main.tf": `
provider "aws" {
foo = "bar"
}
resource "aws_instance" "foo" {
count = 2
}
`})
ctx := testContext2(t, &ContextOpts{
Providers: map[addrs.Provider]providers.Factory{
addrs.NewDefaultProvider("aws"): testProviderFuncFixed(p),
@ -797,6 +808,9 @@ module "b" {
source = "./b"
y = module.a[each.key].y
}
resource "test_resource" "test" {
}
`,
"a/main.tf": `
output "y" {

View File

@ -3,5 +3,4 @@ provider "aws" {
}
resource "aws_instance" "foo" {
#id = "bar"
}