mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
CLI import target validation for incorrect for_each keys (#3106)
Signed-off-by: Ilia Gogotchuri <ilia.gogotchuri0@gmail.com>
This commit is contained in:
6
internal/command/testdata/import-keyed-module/child/main.tf
vendored
Normal file
6
internal/command/testdata/import-keyed-module/child/main.tf
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
variable "id" {
|
||||
type = string
|
||||
}
|
||||
|
||||
resource "test_instance" "this" {
|
||||
}
|
||||
10
internal/command/testdata/import-keyed-module/main.tf
vendored
Normal file
10
internal/command/testdata/import-keyed-module/main.tf
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
locals {
|
||||
items = toset(["a", "b"])
|
||||
}
|
||||
|
||||
module "child" {
|
||||
source = "./child"
|
||||
for_each = local.items
|
||||
|
||||
id = each.key
|
||||
}
|
||||
Reference in New Issue
Block a user