Describe the bugdyntrace_entity datasource does not apply entityName to entitySelector in api call when supplying name and type attribute. This results in every dynatrace entity being read which results in a slow api call. Correct entity specified in name is still retrieved, however the call is slow.
To Reproduce
Steps to reproduce the behavior:
Prereq: Utilize the below environment variables
Should see api call take longer than usual if many entities are present in dynatrace environment.
Open the http log file and view the api call being made. What is present should be an api call without entityName included within entitySelector. Should see something like below:
12:12:36
GET
https://<environment>.live.dynatrace.com/api/v2/entities?pageSize=4000&from=now-3y&entitySelector=type%28%22SERVICE%22%29&fields=tags,properties,lastSeenTms
Expected behavior
Should have entityName present within entitySelector query param when using dynatrace_entity data source.
Additional context
Current work around is to just use entity_selector attribute:
data "dynatrace_entity" "response" {
entity_selector = <<EOT
entityName("${var.service_name}"),type("SERVICE")
EOT
}
Also the current version of dynatrace provider used within this issue is version = ">= 1.54.1 , < 2.0.0"
Describe the bug
dyntrace_entity
datasource does not apply entityName to entitySelector in api call when supplying name and type attribute. This results in every dynatrace entity being read which results in a slow api call. Correct entity specified in name is still retrieved, however the call is slow.To Reproduce Steps to reproduce the behavior: Prereq: Utilize the below environment variables
dynatrace_entity
datasourcename
andtype
Expected behavior Should have entityName present within entitySelector query param when using
dynatrace_entity
data source.Additional context Current work around is to just use
entity_selector
attribute:Also the current version of dynatrace provider used within this issue is
version = ">= 1.54.1 , < 2.0.0"