github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/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  }