`mongodbatlas_cluster` is regarded "created" before it's operational, which breaks things if you need to use attributes that aren't yet available, like `connection_strings`.
This issue is acknowledged in the provider docs:
> connection_strings - Set of connection strings that your applications use to connect to this cluster. More info in Connection-strings. Use the parameters in this object to connect your applications to this cluster. To learn more about the formats of connection strings, see Connection String Options. NOTE: Atlas returns the contents of this object after the cluster is operational, not while it builds the cluster.
>
> (...)
>
> Private connection strings may not be available immediately as the reciprocal connections may not have finalized by end of the Terraform run. If the expected connection string(s) do not contain a value a terraform refresh may need to be performed to obtain the value. One can also view the status of the peered connection in the Atlas UI.