Open piran-cabiri opened 4 days ago
Hi @piran-cabiri, thank you for reporting this. We've noticed this happen at times as well, especially when integration tests (which capture the behaviour of this resource) keep failing sometimes, owing to some of these attributes not being populated on time.
While we do not have a rigid workaround/fix at the moment, we'll keep you posted when we pick this up and further investigate into this, so we can come up with an apt solution.
In https://github.com/newrelic/terraform-provider-newrelic/issues/2577 the ability for
newrelic_browser_application
to return the createdapplication_id
was added, and was released in 3.35.2.However, I'm not seeing the created
application_id
being consistently returned on the first apply. Sometimes it is, sometimes it isn't, and a second apply shows the state updating the application_id. Checked with 3.35.2 and 3.38.1.From the debug log when it fails, it looks like a newrelic query doesn't find the created mutation. As it works sometimes, I guess newrelic takes a while to create the resource.
I've attached a minimal main.tf with an output which I'm using to prove the bug.
Terraform Version
Affected Resource(s)
newrelic_browser_application
Terraform Configuration
See attached main.tf for full file, but:
Actual Behavior
application_id
not always available after NewRelic Browser resource is created (it mostly fails).Expected Behavior
application_id
to always be available after NewRelic Browser resource is created.Steps to Reproduce
The first apply I get:
On the second apply, the state gets updated with the application_id, and the output is set:
I would expect the
application_id
to be available immediately after the resource has been created in the first apply. It sometimes is, but not usually.Debug Output
Debug log from a similarly failing first apply is in: https://gist.github.com/piran-cabiri/bcd4b82be1efb681dad3d2474edde506
References
newrelic_browser_application
'sapplication_id
return created in response to https://github.com/newrelic/terraform-provider-newrelic/issues/2577