core: Include "id" attribute in schema for cbd depends datasource test

This attribute is referenced in order to include a computed value into
another resource, and so it must be present in the schema so that it can
be properly resolved.
This commit is contained in:
Martin Atkins 2018-05-24 16:23:33 -07:00
parent 588f4930f2
commit 7673a0d850
2 changed files with 2 additions and 1 deletions

View File

@ -3729,6 +3729,7 @@ func TestContext2Plan_createBeforeDestroy_depends_datasource(t *testing.T) {
DataSources: map[string]*configschema.Block{
"aws_vpc": {
Attributes: map[string]*configschema.Attribute{
"id": {Type: cty.String, Computed: true},
"foo": {Type: cty.Number, Optional: true},
},
},

View File

@ -10,5 +10,5 @@ resource "aws_instance" "foo" {
data "aws_vpc" "bar" {
count = 2
foo = "${count.index}"
foo = count.index
}