Description
The primary purpose of a data source is to lookup the id (or some other hard to find property) of something by a user friendly name. Just like a reference table in a DB. Take konnect_gateway_control_plane
data source for example. This is an important data source as the control plane id is required for most other resources. Therefore, given the name of a control plane, I should be able to use the konnect_gateway_control_plane
data source to lookup the control plane by name to then use the id it read as input to other resources. The konnect_gateway_control_plane
data source is currently implemented with id
as a required property and name
as a computed property. That is backwards. name
should be an required/optional input field and id
should be the computed field. If I knew the value of id
, then I wouldn't be using the data source to look it up in the first place.
Activity