You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These schemas are expected to be identical, we shouldn't be defining them twice.
Similarly, but slight more involved is the code which reads these blocks. NewApiClientFunc reads the provider level configuration whilst NewApiClient reads the resource level configuration. At a high level, their behaviour is the same, we should refactor the common code. NewApiClient currently returns an error, but the consuming code promptly turns this in a Diagnostics so we should be able to just return the Diagnostics directly.
@tobio@webfella , ahmmmm not sure if you folks mean to keep the same schema but still two connection methods? or remove the per-resource connection method completely?
Currently just sharing the schema between the two connection methods.
That said, we should remove the elasticsearch_connection block from resources. It doesn't work during import, so creates a bad initial user experience. The same functionality is already provided by the core Terraform configuration language, so we're just needlessly adding complexity to the provider.
Currently the provider defines an
elasticsearch
block which is duplicated by theelasticsearch_connection
block added to each resource.These schemas are expected to be identical, we shouldn't be defining them twice.
Similarly, but slight more involved is the code which reads these blocks.
NewApiClientFunc
reads the provider level configuration whilstNewApiClient
reads the resource level configuration. At a high level, their behaviour is the same, we should refactor the common code.NewApiClient
currently returns anerror
, but the consuming code promptly turns this in aDiagnostics
so we should be able to just return theDiagnostics
directly.Related to #191
The text was updated successfully, but these errors were encountered: