github.com/muratcelep/terraform@v1.1.0-beta2-not-internal-4/not-internal/configs/testdata/escaping-blocks/resource/resource-escaping-block.tf (about) 1 2 resource "foo" "bar" { 3 count = 2 4 5 normal = "yes" 6 7 normal_block {} 8 9 _ { 10 # This "escaping block" is an escape hatch for when a resource 11 # type declares argument names that collide with meta-argument 12 # names. The examples below are not really realistic because they 13 # are long-standing names that predate the need for escaping, 14 # but we're using them as a proxy for new meta-arguments we might 15 # add in future language editions which might collide with 16 # names defined in pre-existing providers. 17 18 # note that count is set both as a meta-argument above _and_ as 19 # an resource-type-specific argument here, which is valid and 20 # should result in both being populated. 21 count = "not actually count" 22 23 # for_each is only set in here, not as a meta-argument 24 for_each = "not actually for_each" 25 26 lifecycle { 27 # This is a literal lifecycle block, not a meta-argument block 28 } 29 30 _ { 31 # It would be pretty weird for a resource type to define its own 32 # "_" block type, but that's valid to escape in here too. 33 } 34 } 35 36 provisioner "boop" { 37 when = destroy 38 _ { 39 when = "hell freezes over" 40 } 41 normal = "yep" 42 } 43 }