gorgeous-accountant-60580
08/02/2023, 11:28 AMazure-native:dbforpostgresql/v20210601:Server
to using azure-native:dbforpostgresql/v20221201:Server
, but this fails as Pulumi attempts to create new databases overwriting the existing ones. The azure-native documentation says that you can update API versions back and forth, and I see that our previous API version is listed as an alias in the new version of the provider (https://github.com/pulumi/pulumi-azure-native-sdk/blob/dbforpostgresql/v1.104.0/dbforpostgresql/v20221201/server.go#L105)
Are there any obvious gotchas here?melodic-tomato-39005
08/02/2023, 11:41 AMgorgeous-accountant-60580
08/02/2023, 11:41 AMmelodic-tomato-39005
08/02/2023, 11:44 AMup
?gorgeous-accountant-60580
08/02/2023, 11:47 AMjsonPayload: {
level: "debug"
caller: "services/platform/gollum/pkg/stack/stack.go:157"
message: "Updating (alert-service.dsj-alerts.azure-dev):
pulumi:pulumi:Stack postgres-alert-service.dsj-alerts.azure-dev running
cognite:database:azure:Postgres dsj-alerts-alert-service
cognite:database:Instance dsj-alerts-alert-service
@ updating....
random:index:RandomPassword dsj-alerts-alert-service-postgresql-username-password
azure-native:resources:ResourceGroup dsj-alerts-alert-service-rg
azure-native:network:PrivateZone dsj-alerts-alert-service
azure-native:network:VirtualNetworkLink dsj-alerts-alert-service-defaultVnet
@ updating.....
random:index:RandomString dsj-alerts-alert-service-sa-suffix
azure-native:network:VirtualNetworkLink dsj-alerts-alert-service-aksVnet
azure-native:operationalinsights:Workspace dsj-alerts-alert-service
azure-native:storage:StorageAccount dsj-alerts-alert-service
@ updating....
+ azure-native:dbforpostgresql/v20221201:Server dsj-alerts-alert-service creating (0s)
+ azure-native:dbforpostgresql/v20221201:Server dsj-alerts-alert-service creating (0s) error: cannot create already existing subresource '/subscriptions/531564ca-ed4c-48b5-b4d0-6363b20c3aeb/resourceGroups/rg-postgresql-dsj-alerts-alert-service/providers/Microsoft.DBforPostgreSQL/flexibleServers/dsj-alerts-alert-service-azure-dev'
+ azure-native:dbforpostgresql/v20221201:Server dsj-alerts-alert-service **creating failed** error: cannot create already existing subresource '/subscriptions/531564ca-ed4c-48b5-b4d0-6363b20c3aeb/resourceGroups/rg-postgresql-dsj-alerts-alert-service/providers/Microsoft.DBforPostgreSQL/flexibleServers/dsj-alerts-alert-service-azure-dev'
@ updating....
pulumi:pulumi:Stack postgres-alert-service.dsj-alerts.azure-dev running error: update failed
pulumi:pulumi:Stack postgres-alert-service.dsj-alerts.azure-dev **failed** 1 error
cognite:database:azure:Postgres dsj-alerts-alert-service
cognite:database:Instance dsj-alerts-alert-service
Diagnostics:
azure-native:dbforpostgresql/v20221201:Server (dsj-alerts-alert-service):
error: cannot create already existing subresource '/subscriptions/531564ca-ed4c-48b5-b4d0-6363b20c3aeb/resourceGroups/rg-postgresql-dsj-alerts-alert-service/providers/Microsoft.DBforPostgreSQL/flexibleServers/dsj-alerts-alert-service-azure-dev'
pulumi:pulumi:Stack (postgres-alert-service.dsj-alerts.azure-dev):
error: update failed
Outputs:
- AdminPassword: [secret]
- AdminUser : "postgres"
- Host : "[snip]"
- Port : "5432"
Resources:
11 unchanged
Duration: 5s
"
stack: "alert-service.dsj-alerts.azure-dev"
}
melodic-tomato-39005
08/02/2023, 11:56 AMpulumi refresh
say?>tall-librarian-49374
08/02/2023, 12:29 PMgorgeous-accountant-60580
08/02/2023, 12:29 PMtall-librarian-49374
08/02/2023, 12:29 PMgorgeous-accountant-60580
08/02/2023, 12:38 PMazure-native:dbforpostgresql/v20210601:Configuration (idle_in_transaction_session_timeout):
error: autorest/azure: Service returned an error. Status=400 Code="MissingApiVersionParameter" Message="The api-version query parameter (?api-version=) is required for all requests."
melodic-tomato-39005
08/02/2023, 2:13 PMgorgeous-accountant-60580
08/02/2023, 2:16 PMCustomResourceOptions
for the old name seems to allow Pulumi to keep the link, and avoids Pulumi wanting to delete stuff.”melodic-tomato-39005
08/02/2023, 2:20 PM