Closed pedro-te closed 1 year ago
/review @sfreitas-te @brumarqu-te
@pedro-te i think ipAddress
matters in agent tests (check agents.sourceIpAddress
in the test metadata) but that's for a different PR i guess, since we were already stripping out all the fields and just using the agent_id.
@pedro-te i think ipAddress matters in agent tests (check agents.sourceIpAddress in the test metadata) but that's for a different PR i guess, since we were already stripping out all the fields and just using the agent_id.
Yeah that's the thing, it seems we never supported it. But we can add this functionality in a different PR for sure. 👍🏻
… always.
Addresses:
I can provide an explanation on why this fixes the issue via slack if needed. But essentially, during the apply phase, terraform compares what it had in the plan with what was learned during apply, but it was unable to compare the agents as per the error message:
This is due to the fact that it's trying to match these two, I think: This is what is present in the test resource
and this is what it learns during the apply for the data resource:
I think all those nulls being compared to the empty strings were causing the issue. Since only
agent_id
matters here, since everything else is removed here https://github.com/thousandeyes/terraform-provider-thousandeyes/blob/main/thousandeyes/util.go#L164 , I removed all other fields, so now onlyagent_id
is compared, which is always set.