This message was deleted.
# azure
s
This message was deleted.
c
this will have to do then:
Copy code
const cosmosConnectionString = pulumi.all([cosmosAccount.endpoint, cosmosAccount.primaryMasterKey]).apply(([accountEndpoint, key]) => `AccountEndpoint=${accountEndpoint};AccountKey=${key};`)
b
If that’s the correct way, we can add a mixin to make that an available func @colossal-room-15708
c
yeah, that string is correct. What's a
mixin
?
I might want to do that myself. I'll take a look.
b
If you check out the overlays in the cosmosDB folder in the nodejs sdk you should see a mixins.ts file
That’s where you would add such a function to get the connection string based on the correct parameters
c
Yeah, I read up on the pattern. I'll see if I can open a PR for it.
b
Let me know if you need help
c
Let me know if this is BS 😉
Before merging (haha, wishful thinking) I'd love to do the same for the other languages to keep everything at the same level.
t
Unfortunately, I believe mixins only exist for Node at the moment
b
Yes ☝️
It’s on the list to be added though
t
I added a comment to the PR
c
@tall-librarian-49374 let me know what you think about my changes or if I misinterpreted the doco
@tall-librarian-49374 you had a chance to take another look?
t
Not really… I’m still puzzled and want to understand the route cause.
If missing connection strings are a bug, we should fix it upstream. If it’s by design - why?
https://github.com/Azure/azure-cli/issues/4419 was fixed somewhere around 01/01/2019, so after the TF change including the doc
c
t
no, only if that’s the behavior of the Go SDK or the service itself
<http://github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb|github.com/Azure/azure-sdk-for-go/services/cosmos-db/mgmt/2015-04-08/documentdb>
maybe there is an update here
c
That would be strange. The APIs definitely expose this, at least the portal shows the values and the RP also shows the connection string. So push for MS to change it or compute in pulumi for now?
It seems like the
ListConnectionStrings
method is only implemented for the
mongodb
client? https://github.com/Azure/azure-sdk-for-go/blob/master/services/cosmos-db/mongodb/client.go#L71 Nowhere to be seen in https://github.com/Azure/azure-sdk-for-go/blob/master/services/cosmos-db/mgmt/2020-03-01/documentdb/client.go (or any other API version)
I just checked with the cosmos DB team if they can explain this
t
I would also a bug in the TF provider to track this. Any fix in there seems like a better solution.
c
😥 always takes so long for them to get to things
Fat fingers, didn't want to send this to the channel...
t
I’m just trying to avoid a confusing API that we’d have to maintain forever. Even fixing it in our fork of TF sounds okay, if TF themselves don’t cooperate.
(I think you can “un-send” messages from the channel)
c
Hmm, not in my client...
Yeah, I get what you're saying... sort of why I wished there wasn't that dependency on TF 😉
TF says "MS needs to fix"... now I'm waiting for MS to fix something, TF to pick it up and release and then pulumi... I'll stick to my workaround I think
t
So in this case having no dep on TF wouldn’t help: MS still doesn’t return it
c
Depends on if you said, "it's fine, we can compute it ourselves" or "MS needs to do it"
Hmm, started working now?! Created a documentation bug for terraform.
t
Started working just now?
c
At least in terraform, yeah. Have to test pulumi again.