Skip to content

Commit

Permalink
d/datacenter: Remove redundant datacenter_id variable
Browse files Browse the repository at this point in the history
We now just focus on the ID attribute to provide the managed object ID.
  • Loading branch information
vancluever committed Aug 30, 2017
1 parent effd718 commit 03ef7d2
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 19 deletions.
6 changes: 0 additions & 6 deletions vsphere/data_source_vsphere_datacenter.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,6 @@ func dataSourceVSphereDatacenter() *schema.Resource {
Description: "The name of the datacenter. This can be a name or path. If not provided, the default datacenter is used.",
Optional: true,
},
"datacenter_id": &schema.Schema{
Type: schema.TypeString,
Description: "The managed object ID of the datacenter.",
Computed: true,
},
},
}
}
Expand All @@ -35,7 +30,6 @@ func dataSourceVSphereDatacenterRead(d *schema.ResourceData, meta interface{}) e
}
id := dc.Reference().Value
d.SetId(id)
d.Set("datacenter_id", id)

return nil
}
10 changes: 0 additions & 10 deletions vsphere/data_source_vsphere_datacenter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,6 @@ func TestAccDataSourceVSphereDatacenter(t *testing.T) {
"id",
testAccDataSourceVSphereDatacenterExpectedRegexp,
),
resource.TestMatchResourceAttr(
"data.vsphere_datacenter.dc",
"datacenter_id",
testAccDataSourceVSphereDatacenterExpectedRegexp,
),
),
},
},
Expand All @@ -61,11 +56,6 @@ func TestAccDataSourceVSphereDatacenter(t *testing.T) {
"id",
testAccDataSourceVSphereDatacenterExpectedRegexp,
),
resource.TestMatchResourceAttr(
"data.vsphere_datacenter.dc",
"datacenter_id",
testAccDataSourceVSphereDatacenterExpectedRegexp,
),
),
},
},
Expand Down
5 changes: 2 additions & 3 deletions website/docs/d/datacenter.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ The following arguments are supported:

## Attribute Reference

* `id` - The managed object ID of this datacenter.
* `datacenter_id` - (String) The managed object ID of this datacenter (same as
`id`).
The only exported attribute is `id`, which is the managed object ID of this
datacenter.

0 comments on commit 03ef7d2

Please sign in to comment.