Closed dossy closed 2 months ago
Thanks for raising! It seems like the docs are a little misleading, in that there are some destination types that allow multiple instances and some that do not. You should not be able to create to GA4 Web instances for the same source. More info here. Feel free to reopen this if you have any further questions.
Description
Trying to create two GA4 Web destinations when Terraform state is first initialized results in the following error:
According to the documentation:
I interpret this to mean that it should be possible to do this using the Segment Terraform provider, then.
To Reproduce
Example Terraform code that triggers the issue:
There seems to be a kind of race condition, as it only works if you start with a non-existent
terraform.tfstate
file, you do the firstterraform apply
that fails, thenterraform destroy
the source and first destination, and now using theterraform.tfstate
that now exists, quickly do anotherterraform apply
and it works, creating the source and two destinations.I don't know if this is a problem with the Segment Terraform provider, or the Segment Public API, or what, but this is pretty consistently reproducible for me.