Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add column backup_policy to table azure_cosmosdb_account. Closes #584 #585

Merged
merged 9 commits into from
Mar 24, 2023

Conversation

karanpopat
Copy link
Contributor

@karanpopat karanpopat commented Mar 21, 2023

  • Add column backup_policy to table azure_cosmosdb_account
  • Fix column private_endpoint_connections

Integration test logs

Logs
N/A

Example query results

Results
> select
  name,
  region,
  backup_policy -> 'periodicModeProperties' ->> 'backupIntervalInMinutes' as backup_interval_mins,
  backup_policy -> 'periodicModeProperties' ->> 'backupRetentionIntervalInHours' as backup_retention_interval_hrs,
  backup_policy -> 'periodicModeProperties' ->> 'backupStorageRedundancy' as backup_storage_redundancy
from
  azure_cosmosdb_account
where
  backup_policy ->> 'type' = 'Periodic';

+---------------------+---------+----------------------+-------------------------------+---------------------------+
| name                | region  | backup_interval_mins | backup_retention_interval_hrs | backup_storage_redundancy |
+---------------------+---------+----------------------+-------------------------------+---------------------------+
| test-insights-mongo | west us | 1440                 | 48                            | Local                     |
+---------------------+---------+----------------------+-------------------------------+---------------------------+
Change in output for `private_endpoint_connections`
OLD

> select private_endpoint_connections from azure_cosmosdb_account;
[
 {
  "private_endpoint_connections": [
   {
    "properties": {
     "privateEndpoint": {
      "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/demo/providers/Microsoft.Network/privateEndpoints/test-insight-pvt-endpoint"
     },
     "privateLinkServiceConnectionState": {
      "status": "Approved"
     }
    }
   }
  ]
 }
]

NEW

> select private_endpoint_connections from azure_cosmosdb_account;
[
 {
  "private_endpoint_connections": [
   {
    "PrivateEndpointConnectionId": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/demo/providers/Microsoft.DocumentDB/databaseAccounts/test-insight-mongo-acc/privateEndpointConnections/test-insight-pvt-endpoint",
    "PrivateEndpointConnectionName": "",
    "PrivateEndpointConnectionType": "",
    "PrivateEndpointId": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/demo/providers/Microsoft.Network/privateEndpoints/test-insight-pvt-endpoint",
    "PrivateLinkServiceConnectionStateActionsRequired": "None",
    "PrivateLinkServiceConnectionStateDescription": "",
    "PrivateLinkServiceConnectionStateStatus": "Approved",
    "ProvisioningState": ""
   }
  ]
 }
]

@karanpopat karanpopat requested a review from ParthaI March 21, 2023 16:37
@karanpopat karanpopat self-assigned this Mar 21, 2023
@karanpopat karanpopat linked an issue Mar 21, 2023 that may be closed by this pull request
@karanpopat karanpopat marked this pull request as draft March 23, 2023 10:57
@karanpopat karanpopat marked this pull request as ready for review March 24, 2023 06:52
Copy link
Contributor

@misraved misraved left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take a look at the review comment. Thanks!!

azure/table_azure_cosmosdb_account.go Show resolved Hide resolved
@karanpopat karanpopat requested a review from misraved March 24, 2023 11:12
@misraved misraved merged commit ff38265 into main Mar 24, 2023
@misraved misraved deleted the 584-backup_policy-azure_cosmosdb_account branch March 24, 2023 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add column backup_policy to table azure_cosmosdb_account
2 participants