fix(entity): refactor search command to convert params to query similar to TF #1490
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[WIP - incomplete solution, testing needed]
The aim of this code change: move away from
GetEntitySearchWithContext
toGetEntitySearchByQueryWithContext
in thenewrelic entity search
command in the CLI, in order tonewrelic_entity
data source in Terraform; convert all specified parameters into a query and then retrieve the entity via the query, instead of building an input with all parameters.SERVICE
type has been deprecated, owing to which the older method now throws an error asSERVICE
is no longer an accepted type.Update: This can fix 1292 as it would allow type/domain/other parameters to be fluid, and not confined to the values listed in their respective datatypes. 1292 describes the exact same issue (that was recently reported) mentioned above, with the
SERVICE
type, which seems to be appearing with types not listed in the API undertype
.