Hi everyone, I'm using Go and the azure-native-v2 ...
# general
p
Hi everyone, I'm using Go and the azure-native-v2 provider and try to setup resources from
dbforpostgresql
. I recognized (from what I see) that: • I can only create a firewall rule for Server (and not for Cluster) • I can only create an private endpoint connection for Cluster (and not for Server) I also searched through
provider/cmd/pulumi-resource-azure-native/schema.json
and this makes me feel I could be right. I would love to see the
struct
s for
NewFirewall
and
NewPrivateEndpointConnection
be compatible with both
Server
AND
Cluster
. Should I create a feature request in Github? Or am I simply using it wrong?
m
The idea of making these structs compatible makes sense, but this code is auto-generated from the Azure API spec. In that sense, we’re limited by their API design here.
p
Thank you for your answer. This is quite unfortunate to hear because that would mean we can't have a PrivateEndpointConnection to a PostgreSQL-Server and we can't have a Firewall-Rule for CosmosDB. I can create these manually using the Web-UI, but I want to avoid this for sure 😉 Do you see any other chance then trying the
azure-sdk-for-go
in this case?
So, I've found https://learn.microsoft.com/en-us/rest/api/postgresqlhsc/firewall-rules/create-or-update?tabs=HTTP What would the derived pulumi resource be here? I can't find anything related at https://www.pulumi.com/registry/packages/azure-native/api-docs/dbforpostgresql/ (but maybe I'm just blind here 😄 )
m
Hmm, if you can create these resources in the web portal and the Azure SDK, you should be able to create them using Pulumi, too. Except if something went wrong on our side when generating our SDK. I see both FirewallRule and PrivateEndpointConnection in the Pulumi registry. Are these not the right resources?
p
No, unfortunately the FirewallRule just works with the FlexibleServer and the PrivateEnpointConnection just works with the CosmosDB - see my first post.
To say it a bit more clear: The PrivateEndpointConnection input just accepts a
Cluster
(CosmosDB). There is no way to define a
Server
(FlexibleServer) The FirewallRule input just accepts a
ServerName
(FlexibleServer). There is no way to define a
Cluster
(CosmosDB) That's why I wrote It would be nice to have
ServerName
AND
ClusterName
in both structs.
m
I see, thanks for the explanation. This might be a bug on our side, I’m checking with some colleagues.
p
Just created the bug ticket https://github.com/pulumi/pulumi-azure-native/issues/2753 to have notifications 🙂 Thanks for looking into it