From 08434893663fd2b92fb4e8847c058f69ddd3cc45 Mon Sep 17 00:00:00 2001 From: Venelin Date: Wed, 6 Nov 2024 12:42:44 +0000 Subject: [PATCH] add assert about lifecycle in config --- pkg/internal/tests/cross-tests/impl/hclwrite/hclwrite.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/internal/tests/cross-tests/impl/hclwrite/hclwrite.go b/pkg/internal/tests/cross-tests/impl/hclwrite/hclwrite.go index b543c6810..f72064b61 100644 --- a/pkg/internal/tests/cross-tests/impl/hclwrite/hclwrite.go +++ b/pkg/internal/tests/cross-tests/impl/hclwrite/hclwrite.go @@ -94,6 +94,7 @@ func WriteResource( writeBlock(block.Body(), schema, config) // lifecycle block + contract.Assertf(config["lifecycle"].IsNull(), "lifecycle block should be specified with a lifecycle option") lifecycle := map[string]cty.Value{} if o.lifecycleArgs.CreateBeforeDestroy { lifecycle["create_before_destroy"] = cty.True