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 diagnostic_logs_configuration to table azure_app_service_web_app Closes #516 #517

Merged
merged 1 commit into from
Sep 14, 2022

Conversation

karanpopat
Copy link
Contributor

@karanpopat karanpopat commented Sep 7, 2022

Integration test logs

Logs
Apply complete! Resources: 4 added, 0 changed, 0 destroyed.

Outputs:

principal_id = "**********************e9"
resource_aka = "azure:///subscriptions/**********************/resourceGroups/turbottest43751/providers/Microsoft.Web/sites/turbottest43751"
resource_aka_lower = "azure:///subscriptions/**********************/resourcegroups/turbottest43751/providers/microsoft.web/sites/turbottest43751"
resource_id = "/subscriptions/**********************/resourceGroups/turbottest43751/providers/Microsoft.Web/sites/turbottest43751"
resource_name = "turbottest43751"
subscription_id = "**********************"
tenant_id = "**********************"

Running SQL query: test-get-query.sql
[
  {
    "client_affinity_enabled": false,
    "enabled": true,
    "https_only": false,
    "id": "/subscriptions/**********************/resourceGroups/turbottest43751/providers/Microsoft.Web/sites/turbottest43751",
    "identity": {
      "PrincipalID": "**********************",
      "TenantID": "**********************"
    },
    "kind": "app",
    "name": "turbottest43751",
    "region": "east us",
    "reserved": false,
    "resource_group": "turbottest43751"
  }
]
✔ PASSED

Running SQL query: test-hydrate-query.sql
[
  {
    "client_affinity_enabled": false,
    "enabled": true,
    "https_only": false,
    "id": "/subscriptions/**********************/resourceGroups/turbottest43751/providers/Microsoft.Web/sites/turbottest43751",
    "kind": "app",
    "name": "turbottest43751",
    "region": "east us",
    "resource_group": "turbottest43751"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/**********************/resourceGroups/turbottest43751/providers/Microsoft.Web/sites/turbottest43751",
    "identity": {
      "PrincipalID": "**********************",
      "TenantID": "**********************"
    },
    "name": "turbottest43751"
  }
]
✔ PASSED

Running SQL query: test-not-found-query.sql
null
✔ PASSED

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/**********************/resourceGroups/turbottest43751/providers/Microsoft.Web/sites/turbottest43751",
      "azure:///subscriptions/**********************/resourcegroups/turbottest43751/providers/microsoft.web/sites/turbottest43751"
    ],
    "name": "turbottest43751",
    "tags": {
      "name": "turbottest43751"
    },
    "title": "turbottest43751"
  }
]
✔ PASSED

POSTTEST: tests/azure_app_service_web_app

TEARDOWN: tests/azure_app_service_web_app

SUMMARY:

1/1 passed.

➜  azure-test

Example query results

Results
> select
  name,
  diagnostic_logs_configuration -> 'properties' ->> 'httpLogs' as http_logs_configuration,
  diagnostic_logs_configuration -> 'properties' ->> 'applicationLogs' as application_logs_configuration,
  diagnostic_logs_configuration -> 'properties' -> 'detailedErrorMessages' ->> 'enabled' as detailed_error_messages_enabled,
  diagnostic_logs_configuration -> 'properties' -> 'failedRequestsTracing' ->> 'enabled' as failed_requests_tracing_enabled
from
  azure_app_service_web_app;
+----------------------+-------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+---------------------------------+---------------------------------+
| name                 | http_logs_configuration                                                                         | application_logs_configuration                                                                                | detailed_error_messages_enabled | failed_requests_tracing_enabled |
+----------------------+-------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+---------------------------------+---------------------------------+
| testwebapp1231423432 | {"fileSystem": {"enabled": false, "retentionInMb": 35}, "azureBlobStorage": {"enabled": false}} | {"fileSystem": {"level": "Off"}, "azureBlobStorage": {"level": "Off"}, "azureTableStorage": {"level": "Off"}} | false                           | false                           |
+----------------------+-------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------+---------------------------------+---------------------------------+

@karanpopat karanpopat self-assigned this Sep 7, 2022
@cbruno10 cbruno10 linked an issue Sep 14, 2022 that may be closed by this pull request
@cbruno10 cbruno10 merged commit f098a31 into main Sep 14, 2022
@cbruno10 cbruno10 deleted the issue-516 branch September 14, 2022 19:55
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 diagnostic settings in table azure_app_service_web_app
3 participants