Open mheers opened 11 months ago
We're probably not doing the right thing in az-native when generating the dbforpostgresql schema. providers/Microsoft.DBforPostgreSQL
has distinct services in it, with similar resources under different paths, e.g., Firewall at Microsoft.DBforPostgreSQL/flexibleServers/ and Firewall at Microsoft.DBforPostgreSQL/serverGroupsv2/. We have only one dbforpostgresql.FirewallRule, though.
Is there any update on this one? I hit this issue when I tried to setup cosmos for postgres with firewall now.
I took a look and I see that we do expose the serverGroupsv2 version of the Firewall resource in its explicit namespace. You can import that namespace pulumi/azure-native/dbforpostgresql/v20221108
.
Similarly, pulumi/azure-native/dbforpostgresql/v20230601preview
contains a PrivateEndpointConnection resource that would work for flexible servers.
Our problem is that flexible server/cluster resources have the same name and we haven't done the job of disambiguating them in the default namespace. That's a breaking change that we should probably take in 3.0 of the provider.
Added to epic https://github.com/pulumi/home/issues/3552
There's two distinct services from Azure:
Both of these services are using the Microsoft.DBforPostgreSQL namespace which results in us combining the types and resources. This means the resources
PrivateEndpointConnection
andFirewallRule
conflict and one is ignored and is not available in the default namespace.Move each of these services into their own module name to avoid the naming conflicts:
Original Issue
What happened?
I'm using Go and the azure-native-v2 provider and try to setup resources from dbforpostgresql. I recognized that:
The PrivateEndpointConnection input just accepts a
ClusterName
(CosmosDB). There is no way to define aServerName
(FlexibleServer)The FirewallRule input just accepts a
ServerName
(FlexibleServer). There is no way to define aClusterName
(CosmosDB)It would be nice to have
ServerName
ANDClusterName
in both structs.Expected Behavior
Steps to reproduce
Output of
pulumi about
CLI
Version 3.78.0 Go Version go1.20.6 Go Compiler gc
Plugins NAME VERSION azure-native 2.6.0 azure-native 2.6.0 azure-native 2.6.0 azure-native 2.6.0 azure-native 2.6.0 go unknown
Host
OS ubuntu Version 20.04 Arch x86_64
This project is written in go: executable='/usr/bin/go' version='go version go1.21.1 linux/amd64'
Current Stack: az-azure-cosmosdb-for-postgresql-marcel
TYPE URN pulumi:pulumi:Stack urn:pulumi:az-azure-cosmosdb-for-postgresql-marcel::azure-cosmosdb-for-postgresql::pulumi:pulumi:Stack::azure-cosmosdb-for-postgresql-az-azure-cosmosdb-for-postgresql-marcel pulumi:providers:azure-native urn:pulumi:az-azure-cosmosdb-for-postgresql-marcel::azure-cosmosdb-for-postgresql::pulumi:providers:azure-native::default azure-native:resources:ResourceGroup urn:pulumi:az-azure-cosmosdb-for-postgresql-marcel::azure-cosmosdb-for-postgresql::azure-native:resources:ResourceGroup::resourceGroup azure-native:dbforpostgresql:Cluster urn:pulumi:az-azure-cosmosdb-for-postgresql-marcel::azure-cosmosdb-for-postgresql::azure-native:dbforpostgresql:Cluster::my-cosmo
Found no pending operations associated with az-azure-cosmosdb-for-postgresql-marcel
Backend
Name marcel URL file://~ User marcel Organizations
Dependencies: NAME VERSION github.com/pulumi/pulumi-azure-native-sdk/compute/v2 2.6.0 github.com/pulumi/pulumi-azure-native-sdk/dbforpostgresql/v2 2.6.0 github.com/pulumi/pulumi-azure-native-sdk/network/v2 2.6.0 github.com/pulumi/pulumi-azure-native-sdk/resources/v2 2.6.0 github.com/pulumi/pulumi/sdk/v3 3.81.0
Pulumi locates its logs in /tmp by default
Additional context
No response
Contributing
Vote on this issue by adding a 👍 reaction. To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).