github.com/heimweh/terraform@v0.7.4/terraform/test-fixtures/validate-cycle/main.tf (about) 1 provider "aws" { } 2 3 /* 4 * When a CBD resource depends on a non-CBD resource, 5 * a cycle is formed that only shows up when Destroy 6 * nodes are included in the graph. 7 */ 8 resource "aws_security_group" "firewall" { 9 } 10 11 resource "aws_instance" "web" { 12 security_groups = [ 13 "foo", 14 "${aws_security_group.firewall.foo}" 15 ] 16 lifecycle { 17 create_before_destroy = true 18 } 19 }