mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
update test fixtures for better imports
This commit is contained in:
parent
e97ae28441
commit
c002bab730
@ -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" {
|
||||
|
@ -3,5 +3,4 @@ provider "aws" {
|
||||
}
|
||||
|
||||
resource "aws_instance" "foo" {
|
||||
#id = "bar"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user