Share via

Problem with Postgresql Flexible Server

Kenneth Sparre 1 Reputation point
2021-09-30T10:27:03.91+00:00

I am utilizing the terraform to provisioning a PostgreSQL Flexible Server. But when I am trying restore the database (PointInTimeRestore) I am getting the following error "Invalid value given for parameter sourceResourceGroupName" but it is not possible to set this value only the SourceResourceId.

2021-09-28T12:53:47.106Z [DEBUG] provider.terraform-provider-azurerm_v2.78.0_x5: AzureRM Request:
PUT /subscriptions/08c19e7b-58c0-4871-b002-0e730a29c512/resourceGroups/RG-SSE-SUBEDM-S-2/providers/Microsoft.DBforPostgreSQL/flexibleServers/salt-sse-subedm-s-2?api-version=2021-06-01 HTTP/1.1
Host: management.azure.com
User-Agent: Go/go1.16.7 (amd64-linux) go-autorest/v14.2.1 Azure-SDK-For-Go/v57.4.0 postgresqlflexibleservers/2021-06-01 HashiCorp Terraform/1.0.6 (+https://www.terraform.io) Terraform Plugin SDK/2.7.0 terraform-provider-azurerm/2.78.0 pid-222c6c49-1b0a-5959-a213-6608f9eb8820
Content-Length: 1152
Content-Type: application/json; charset=utf-8
X-Ms-Correlation-Request-Id: af7bb5d8-f798-1b84-a1b4-1258ee0eb022
Accept-Encoding: gzip

{"location":"westeurope","properties":{"administratorLogin":"adminsalt","administratorLoginPassword":"12345PsqlEDM-UDG-SANDBOX-MAN_ES_2020_December","backup":{"backupRetentionDays":7},"createMode":"PointInTimeRestore","highAvailability":{"mode":"Disabled"},"network":{"delegatedSubnetResourceId":"/subscriptions/08c19e7b-58c0-4871-b002-0e730a29c512/resourceGroups/RG-SSE-SUBEDM-S-2/providers/Microsoft.Network/virtualNetworks/VNET-SSE-SUBEDM-S-2/subnets/subnet-postgres-sse-subedm-s-2","privateDnsZoneArmResourceId":"/subscriptions/08c19e7b-58c0-4871-b002-0e730a29c512/resourceGroups/RG-SSE-SUBEDM-S-2/providers/Microsoft.Network/privateDnsZones/private.postgres.database.azure.com"},"pointInTimeUTC":"2021-09-28T12:48:46Z","sourceServerResourceId":"/subscriptions/08c19e7b-58c0-4871-b002-0e730a29c512/resourceGroups/RG-SSE-SUBEDM-S-1/providers/Microsoft.DBforPostgreSQL/flexibleServers/salt-sse-subedm-s-1","storage":{"storageSizeGB":64},"version":"13"},"sku":{"name":"Standard_D2s_v3","tier":"GeneralPurpose"},"tags":{"application":"EDM","created_using":"TFE","createdby":"EDM-Team","environment":"SANDBOX","projectID":"U-40747","purpose":"SANDBOX"}}: timestamp=2021-09-28T12:53:47.106Z
2021-09-28T12:53:49.993Z [TRACE] dag/walk: vertex "module.saltmaster_controller_vm_extensions (close)" is waiting for "module.saltmaster_controller_vm_extensions.azurerm_virtual_machine_extension.linux_extension[0]"
2021-09-28T12:53:49.993Z [TRACE] dag/walk: vertex "module.postgresql (close)" is waiting for "module.postgresql.output.private_dns (expand)"
2021-09-28T12:53:49.993Z [TRACE] dag/walk: vertex "module.postgresql.output.private_dns (expand)" is waiting for "module.postgresql.azurerm_postgresql_flexible_server.postgresql_server"
2021-09-28T12:53:49.993Z [TRACE] dag/walk: vertex "module.postgresql.output.administrator_login (expand)" is waiting for "module.postgresql.azurerm_postgresql_flexible_server.postgresql_server"
2021-09-28T12:53:49.993Z [TRACE] dag/walk: vertex "root" is waiting for "provider[\"registry.terraform.io/hashicorp/azurerm\"] (close)"
2021-09-28T12:53:49.993Z [TRACE] dag/walk: vertex "provider[\"registry.terraform.io/hashicorp/azurerm\"] (close)" is waiting for "module.saltmaster_controller_vm_extensions.azurerm_virtual_machine_extension.linux_extension[0]"
2021-09-28T12:53:51.259Z [DEBUG] provider.terraform-provider-azurerm_v2.78.0_x5: AzureRM Response for https://management.azure.com/subscriptions/08c19e7b-58c0-4871-b002-0e730a29c512/resourceGroups/RG-SSE-SUBEDM-S-2/providers/Microsoft.DBforPostgreSQL/flexibleServers/salt-sse-subedm-s-2?api-version=2021-06-01:
HTTP/2.0 400 Bad Request
Content-Length: 146
Cache-Control: no-cache
Content-Type: application/json; charset=utf-8
Date: Tue, 28 Sep 2021 12:53:51 GMT
Expires: -1
Pragma: no-cache
Server: Microsoft-HTTPAPI/2.0
Strict-Transport-Security: max-age=31536000; includeSubDomains
X-Content-Type-Options: nosniff
X-Ms-Correlation-Request-Id: af7bb5d8-f798-1b84-a1b4-1258ee0eb022
X-Ms-Ratelimit-Remaining-Subscription-Writes: 1199
X-Ms-Request-Id: 1ad8a66c-5de8-425e-b9fc-dd789a08e419
X-Ms-Routing-Request-Id: EASTUS:20210928T125351Z:4e0a3cc1-7cc7-4f27-acfb-5717f817c2e2

{"error":{"code":"InvalidParameterValue","message":"Invalid value given for parameter sourceResourceGroupName. Specify a valid parameter value."}}: timestamp=2021-09-28T12:53:51.259Z

Azure Database for PostgreSQL
0 comments No comments

1 answer

Sort by: Most helpful
  1. Oury Ba-MSFT 21,156 Reputation points Microsoft Employee Moderator
    2021-10-04T16:30:35.353+00:00

    @Kenneth Sparre Thank you for posting your question on Microsoft Q&A

    Flexible server does not support cross subscription or cross resource group PITR. This is why the error message complaining about resource group. Please feel free to reach out if you have further queries.

    Regards,
    Oury

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.