terraform: test case for cycle of CBD depending on non-CBD

This commit is contained in:
Mitchell Hashimoto 2015-02-16 13:34:15 -08:00
parent e68ea0d38f
commit ad595cf254
2 changed files with 22 additions and 0 deletions

View File

@ -73,6 +73,19 @@ func TestBuiltinGraphBuilder(t *testing.T) {
}
}
// This tests a cycle we got when a CBD resource depends on a non-CBD
// resource. This cycle shouldn't happen in the general case anymore.
func TestBuiltinGraphBuilder_cbdDepNonCbd(t *testing.T) {
b := &BuiltinGraphBuilder{
Root: testModule(t, "graph-builder-cbd-non-cbd"),
}
_, err := b.Build(RootModulePath)
if err != nil {
t.Fatalf("err: %s", err)
}
}
/*
TODO: This exposes a really bad bug we need to fix after we merge
the f-ast-branch. This bug still exists in master.

View File

@ -0,0 +1,9 @@
provider "aws" {}
resource "aws_lc" "foo" {}
resource "aws_asg" "foo" {
lc = "${aws_lc.foo.id}"
lifecycle { create_before_destroy = true }
}