Open antoine-lecomte opened 1 year ago
Thanks for the detailed writeup @antoine-lecomte!
It appears our default value to update back to is set in defaultResourcesState.
Open questions I'm not yet clear on:
put
approach we're using valid still - rather than patch. I assume either request should be fine."source":"system-default"
but newer versions use "source":"system-default"
with the empty value?source
as a string - doesn't indicate valid values.
What happened?
Trying to delete a
azure_native.dbforpostgresql.Configuration
resource fails with the following error:Steps to reproduce
testserver
in resource froupTestGroup
(Single or Flexible, both are concerned)dbforpostgresql.Configuration
resourcedbforpostgresql.Configuration
resourceExpected Behavior
Actual Behavior
Asking to delete the resource and enabling the debug output of
pulumi up
provide more informationPulumi actually do a PUT https://management.azure.com/subscriptions/xxxxxxxx-a703-434e-b344-3e31dcef3709/resourceGroups/rg-epa-postgresql-flexible-dev/providers/Microsoft.DBforPostgreSQL/flexibleServers/psql-epa-common-dev/configurations/azure.extensions?api-version=2021-06-01 with a body content :
Azure return an error 500 with response
Complete log below :
It seems that the API allow only a body content with source value user-override
{"properties":{"source":"user-override","value":"PROVIDED_VALUE"}}
Output of
pulumi about
CLI Version 3.12.0 Go Version go1.16.7 Go Compiler gc
Plugins NAME VERSION nodejs unknown
Host OS Microsoft Windows 10 Enterprise Version 10.0.19042 Build 19042 Arch x86_64
This project is written in nodejs (C:\PROGRA~1\Node\nodejs\node.exe v16.9.0)
Additional context
I switched to the Azure legacy provider with
azure.postgresql.FlexibleServerConfiguration
to work around the issue. It works as intended.The debug output of
pulumi up
during a DELETE show a different workflow with 2 operations :GET https://management.azure.com/subscriptions/xxxxxxxx-a703-434e-b344-3e31dcef3709/resourceGroups/rg-epa-postgresql-flexible-dev/providers/Microsoft.DBforPostgreSQL/flexibleServers/psql-epa-common-dev/configurations/azure.extensions?api-version=2021-06-01
Response :
PATCH https://management.azure.com/subscriptions/xxxxxxxx-a703-434e-b344-3e31dcef3709/resourceGroups/rg-epa-postgresql-flexible-dev/providers/Microsoft.DBforPostgreSQL/flexibleServers/psql-epa-common-dev/configurations/azure.extensions?api-version=2021-06-01
Body content :
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).