Currently the Redis resource uses a boolean to track whether TLS is enabled and generate the appropriate connection string, but the actual final value of TLS support isn't known until after BeforeStartEvent has fired. This leads to timing issues when evaluating the connection string such as seen in #13619.
We need to make the TLS state into a value provider such that it will be evaluated dynamically rather than a literal value. There are likely other resources with similar concerns, so we should evaluate if other resources have similar potential timing issues in their connection strings and consider a general solution if possible.