File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed
Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -620,3 +620,39 @@ resource "test_resource_nested_set" "bar" {
620620 },
621621 })
622622}
623+
624+ func TestResourceNestedSet_dynamicSetBlock (t * testing.T ) {
625+ resource .UnitTest (t , resource.TestCase {
626+ Providers : testAccProviders ,
627+ CheckDestroy : testAccCheckResourceDestroy ,
628+ Steps : []resource.TestStep {
629+ resource.TestStep {
630+ Config : strings .TrimSpace (`
631+ resource "test_resource" "a" {
632+ required = "ok"
633+ required_map = {
634+ a = "b"
635+ }
636+ }
637+
638+ resource "test_resource_nested_set" "foo" {
639+ dynamic "with_list" {
640+ iterator = thing
641+ for_each = test_resource.a.computed_list
642+ content {
643+ required = thing.value
644+ list = [thing.key]
645+ }
646+ }
647+ }
648+ ` ),
649+ Check : resource .ComposeTestCheckFunc (
650+ func (s * terraform.State ) error {
651+ fmt .Println (s )
652+ return nil
653+ },
654+ ),
655+ },
656+ },
657+ })
658+ }
You can’t perform that action at this time.
0 commit comments