Skip to content

Commit

Permalink
add assert about lifecycle in config
Browse files Browse the repository at this point in the history
  • Loading branch information
VenelinMartinov committed Nov 6, 2024
1 parent 0b1a7d2 commit 0843489
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pkg/internal/tests/cross-tests/impl/hclwrite/hclwrite.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0843489

Please sign in to comment.