terraform: test case for cycle of CBD depending on non-CBD
This commit is contained in:
parent
e68ea0d38f
commit
ad595cf254
|
@ -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
|
TODO: This exposes a really bad bug we need to fix after we merge
|
||||||
the f-ast-branch. This bug still exists in master.
|
the f-ast-branch. This bug still exists in master.
|
||||||
|
|
|
@ -0,0 +1,9 @@
|
||||||
|
provider "aws" {}
|
||||||
|
|
||||||
|
resource "aws_lc" "foo" {}
|
||||||
|
|
||||||
|
resource "aws_asg" "foo" {
|
||||||
|
lc = "${aws_lc.foo.id}"
|
||||||
|
|
||||||
|
lifecycle { create_before_destroy = true }
|
||||||
|
}
|
Loading…
Reference in New Issue