Closed vienleidl closed 1 year ago
Hi @vienleidl ,
I've added a policy and made a pull request to the repository. It might not be 100% perfect but hopefully it will assist you in the progress of displaying these resources. I believe perhaps that a resource graph query on a dashboard might be more helpful for you thought :)
Closed as completed.
Hi @vienleidl ,
I've added a policy and made a pull request to the repository. It might not be 100% perfect but hopefully it will assist you in the progress of displaying these resources. I believe perhaps that a resource graph query on a dashboard might be more helpful for you thought :)
PR: #259
Thanks @SebastianClaesson! I found the replicationLinks property here. However, I'm not sure if it works. But I think it's really promised and hope that Azure Policy will support that 'field' property/alias (replicationLinks) soon.
If the database has been configured the geo-replica, we have the response as below:
{
"value": [
{
"properties": {
"partnerServer": "NAME_OF_REPLICA_SERVER",
"partnerDatabase": "NAME_OF_REPLICA_DATABASE",
"partnerLocation": "North Europe",
"role": "Primary",
"partnerRole": "Secondary",
"replicationMode": "ASYNC",
"startTime": "2018-01-03T09:02:54.723Z",
"percentComplete": 100,
"replicationState": "CATCH_UP",
"isTerminationAllowed": true,
"linkType": "GEO"
},
"id": "/subscriptions/SUBSCRIPTION_ID/resourceGroups/RESOURCE_GROUP_NAME/providers/Microsoft.Sql/servers/NAME_OF_REPLICA_SERVER/databases/NAME_OF_REPLICA_DATABASE/replicationLinks/XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
"name": "XXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
]
}
If not enabled yet, the value is empty:
{
"value": []
}
There should be an Azure Policy for auditing the active geo-replications which are not enabled on Azure SQL databases.