From 8f7519c8d20df4e7f923242a84f84fa77fd031c1 Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Wed, 3 May 2023 12:26:02 +1000 Subject: [PATCH 01/12] Added Azure README --- infrastructure/azure/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 infrastructure/azure/README.md diff --git a/infrastructure/azure/README.md b/infrastructure/azure/README.md new file mode 100644 index 0000000..4bd7561 --- /dev/null +++ b/infrastructure/azure/README.md @@ -0,0 +1,9 @@ +Azure implementation of the Flight Controller infrastructure and code deployment. + +# Tasls +- [ ] Configure root CDKTF dependencies +- [ ] Configure Azure provider +- [ ] Define Terraform resources for Flight Controller application and database infrastructure +- [ ] Grafana deployment +- [ ] Add `make` hooks to automate development environment configuration +- [ ] Add Azure-specific configuration abstractions for database and telemetry support \ No newline at end of file From b049ae27f743544c5a2a784e9f83da8a645f3899 Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Mon, 8 May 2023 13:15:58 +1000 Subject: [PATCH 02/12] Azure config --- Pipfile | 1 + infrastructure/azure/.gitignore | 1 + infrastructure/azure/README.md | 2 +- infrastructure/azure/cdktf.json | 13 +++++++++++++ infrastructure/azure/main.py | 26 ++++++++++++++++++++++++++ 5 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 infrastructure/azure/.gitignore create mode 100644 infrastructure/azure/cdktf.json create mode 100644 infrastructure/azure/main.py diff --git a/Pipfile b/Pipfile index 1ebe50d..6077484 100644 --- a/Pipfile +++ b/Pipfile @@ -26,6 +26,7 @@ cdktf = "*" cdktf-cdktf-provider-aws = "*" cdktf-cdktf-provider-archive = "*" cdktf-cdktf-provider-google = "*" +cdktf-cdktf-provider-azure = "*" cdktf-cdktf-provider-external = "*" pytest-watch = "*" dirhash = "*" diff --git a/infrastructure/azure/.gitignore b/infrastructure/azure/.gitignore new file mode 100644 index 0000000..c51861d --- /dev/null +++ b/infrastructure/azure/.gitignore @@ -0,0 +1 @@ +.gen/ \ No newline at end of file diff --git a/infrastructure/azure/README.md b/infrastructure/azure/README.md index 4bd7561..d851e7e 100644 --- a/infrastructure/azure/README.md +++ b/infrastructure/azure/README.md @@ -1,6 +1,6 @@ Azure implementation of the Flight Controller infrastructure and code deployment. -# Tasls +# Tasks - [ ] Configure root CDKTF dependencies - [ ] Configure Azure provider - [ ] Define Terraform resources for Flight Controller application and database infrastructure diff --git a/infrastructure/azure/cdktf.json b/infrastructure/azure/cdktf.json new file mode 100644 index 0000000..c88b25d --- /dev/null +++ b/infrastructure/azure/cdktf.json @@ -0,0 +1,13 @@ +{ + "language": "python", + "app": "pipenv run python main.py", + "terraformProviders": [ + "azurerm@~> 3.10" + ], + "terraformModules": [], + "context": { + "excludeStackIdFromLogicalIds": "true", + "allowSepCharsInLogicalIds": "true" + }, + "projectId": "a887aa34-ded7-4b06-bf81-3b437731b332" +} \ No newline at end of file diff --git a/infrastructure/azure/main.py b/infrastructure/azure/main.py new file mode 100644 index 0000000..845654e --- /dev/null +++ b/infrastructure/azure/main.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +from cdktf import App, TerraformStack, TerraformOutput +from cdktf_cdktf_provider_azure.provider import AzurermProvider +from constructs import Construct + +class AzureCore(TerraformStack): + def __init__( + self, + scope: Construct, + id: str, + ): + super().__init__(scope, id) + + AzurermProvider(self, "Azure") + + self.dynamotable_name = "event_sourcing_table" + self.lambda_name = "producer_lambda_function_cdktf" + self.event_bridge_name = "main_lambda_bus_cdktf" + self.timestream_db_name = "core_timestream_db" + self.grafana_workspace_name = "grafana_dashboard" + self.grafana_lambda_name = "grafana_api_key_rotator" + +app = App() +core_stack = AzureCore(app, "azure_core") +app.synth() From 55f5ca8567706dc17c3345bf07543a3d993fee1c Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Mon, 8 May 2023 15:25:28 +1000 Subject: [PATCH 03/12] Fixed dependency name in pipfile --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 6077484..a5e77f4 100644 --- a/Pipfile +++ b/Pipfile @@ -26,7 +26,7 @@ cdktf = "*" cdktf-cdktf-provider-aws = "*" cdktf-cdktf-provider-archive = "*" cdktf-cdktf-provider-google = "*" -cdktf-cdktf-provider-azure = "*" +cdktf-cdktf-provider-azurerm = "*" cdktf-cdktf-provider-external = "*" pytest-watch = "*" dirhash = "*" From bb25800878f52e6024db31c709688e5dcec74641 Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Mon, 8 May 2023 18:34:16 +1000 Subject: [PATCH 04/12] Added build targets --- Makefile | 61 ++++++++++++++++++++++++++++++--- infrastructure/aws/cdktf.json | 2 +- infrastructure/azure/cdktf.json | 2 +- infrastructure/azure/main.py | 9 ++--- 4 files changed, 61 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 22b054f..9b86453 100644 --- a/Makefile +++ b/Makefile @@ -42,14 +42,15 @@ e2e: clean: cd infrastructure/aws; rm -rf cdktf.out cd infrastructure/gcp; rm -rf cdktf.out + cd infrastructure/azure; rm -rf cdktf.out -synth: aws-synth gcp-synth +synth: aws-synth gcp-synth azure-synth -plan: aws-plan-all gcp-plan-all +plan: aws-plan-all gcp-plan-all azure-plan-all -deploy: aws-deploy-all gcp-deploy-all +deploy: aws-deploy-all gcp-deploy-all azure-deploy-all -destroy: aws-destroy-all gcp-destroy-all +destroy: aws-destroy-all gcp-destroy-all azure-destroy-all # AWS aws-build-dependencies: @@ -174,3 +175,55 @@ gcp-destroy-grafana: gcp-destroy-all: @echo "\n\n---GCP-DESTROY-ALL---\n" cd infrastructure/gcp;cdktf destroy gcp_base gcp_core gcp_grafana + +# Azure +azure-synth: azure-build-dependencies + @echo "\n\n---AZURE-SYNTH---\n" + cd infrastructure/azure;cdktf synth + +azure-build-dependencies: + @echo "\n\n---AZURE-BUILD-DEPENDENCIES---\n" + cd infrastructure/azure; cdktf provider add grafana/grafana + +azure-plan-core: + @echo "\n\n---AZURE-PLAN-CORE---\n" + cd infrastructure/azure;cdktf plan azure_core + +azure-plan-grafana: + @echo "\n\n---AZURE-PLAN-GRAFANA---\n" + cd infrastructure/azure;cdktf plan azure_grafana_dashboard + +azure-plan-all: azure-build-dependencies azure-plan-core azure-plan-grafana azure-plan-convert + +azure-plan-convert: + @echo "\n\n---Converting AZURE plans file to json---\n" + cd infrastructure/azure/cdktf.out/stacks; \ + find . -type f -name 'plan' -exec dirname {} \; | while read file; do \ + cd "$$file"; \ + terraform show -json plan > plan.json; \ + cd -; \ + done + +azure-deploy-core: + @echo "\n\n---AZURE-DEPLOY-CORE---\n" + cd infrastructure/azure;cdktf deploy azure_core ${INFRA_ARGS} + +azure-deploy-grafana: + @echo "\n\n---AZURE-DEPLOY-GRAFANA---\n" + cd infrastructure/azure;cdktf deploy azure_grafana_dashboard ${INFRA_ARGS} + +azure-deploy-all: + @echo "\n\n---AZURE-DEPLOY-ALL---\n" + cd infrastructure/azure;cdktf deploy azure_core azure_grafana_dashboard ${INFRA_ARGS} + +azure-destroy-core: + @echo "\n\n---AZURE-DESTROY-CORE---\n" + cd infrastructure/azure;cdktf destroy azure_core + +azure-destroy-grafana: + @echo "\n\n---AZURE-DESTROY-GRAFANA---\n" + cd infrastructure/azure;cdktf destroy azure_grafana_dashboard + +azure-destroy-all: + @echo "\n\n---AZURE-DESTROY-ALL---\n" + cd infrastructure/azure;cdktf destroy azure_core azure_grafana_dashboard \ No newline at end of file diff --git a/infrastructure/aws/cdktf.json b/infrastructure/aws/cdktf.json index 38414ee..f028ecd 100644 --- a/infrastructure/aws/cdktf.json +++ b/infrastructure/aws/cdktf.json @@ -4,7 +4,7 @@ "projectId": "ab6ba306-5f3e-4a6e-88ce-c23e56898e9d", "sendCrashReports": "false", "terraformProviders": [ - "grafana/grafana@~> 1.37" + "grafana/grafana@~> 1.39" ], "terraformModules": [], "codeMakerOutput": "imports", diff --git a/infrastructure/azure/cdktf.json b/infrastructure/azure/cdktf.json index c88b25d..a797de9 100644 --- a/infrastructure/azure/cdktf.json +++ b/infrastructure/azure/cdktf.json @@ -2,7 +2,7 @@ "language": "python", "app": "pipenv run python main.py", "terraformProviders": [ - "azurerm@~> 3.10" + "grafana/grafana@~> 1.39" ], "terraformModules": [], "context": { diff --git a/infrastructure/azure/main.py b/infrastructure/azure/main.py index 845654e..765b0e2 100644 --- a/infrastructure/azure/main.py +++ b/infrastructure/azure/main.py @@ -1,7 +1,7 @@ #!/usr/bin/env python from cdktf import App, TerraformStack, TerraformOutput -from cdktf_cdktf_provider_azure.provider import AzurermProvider +from cdktf_cdktf_provider_azurerm.provider import AzurermProvider from constructs import Construct class AzureCore(TerraformStack): @@ -14,12 +14,7 @@ def __init__( AzurermProvider(self, "Azure") - self.dynamotable_name = "event_sourcing_table" - self.lambda_name = "producer_lambda_function_cdktf" - self.event_bridge_name = "main_lambda_bus_cdktf" - self.timestream_db_name = "core_timestream_db" - self.grafana_workspace_name = "grafana_dashboard" - self.grafana_lambda_name = "grafana_api_key_rotator" + self.resource_group = "rg_name" app = App() core_stack = AzureCore(app, "azure_core") From 4bfa4f1c2cc1c2372ede8b638b67518f457dc31b Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Mon, 8 May 2023 19:04:53 +1000 Subject: [PATCH 05/12] Config fix + grafana dashboard --- infrastructure/azure/.gitignore | 1 - infrastructure/azure/cdktf.json | 1 + infrastructure/azure/dashboard.json | 606 ++++++++++++++++++ .../azure/grafana_dashboard_component.py | 28 + infrastructure/azure/main.py | 39 +- 5 files changed, 671 insertions(+), 4 deletions(-) delete mode 100644 infrastructure/azure/.gitignore create mode 100644 infrastructure/azure/dashboard.json create mode 100644 infrastructure/azure/grafana_dashboard_component.py diff --git a/infrastructure/azure/.gitignore b/infrastructure/azure/.gitignore deleted file mode 100644 index c51861d..0000000 --- a/infrastructure/azure/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.gen/ \ No newline at end of file diff --git a/infrastructure/azure/cdktf.json b/infrastructure/azure/cdktf.json index a797de9..1000c9a 100644 --- a/infrastructure/azure/cdktf.json +++ b/infrastructure/azure/cdktf.json @@ -5,6 +5,7 @@ "grafana/grafana@~> 1.39" ], "terraformModules": [], + "codeMakerOutput": "imports", "context": { "excludeStackIdFromLogicalIds": "true", "allowSepCharsInLogicalIds": "true" diff --git a/infrastructure/azure/dashboard.json b/infrastructure/azure/dashboard.json new file mode 100644 index 0000000..a33f287 --- /dev/null +++ b/infrastructure/azure/dashboard.json @@ -0,0 +1,606 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + }, + { + "builtIn": "1", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "Dashboard" + }, + "type": "Dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 2, + "links": [], + "liveNow": false, + "panels": [ + { + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "custom": { + "axisLabel": "Activation Count", + "axisPlacement": "left", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "scheme", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 3, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "displayName": "Guardrail Max Activations", + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 18, + "options": { + "legend": { + "calcs": [ + "mean" + ], + "displayMode": "list", + "placement": "bottom" + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "database": "\"core_timestream_db\"", + "datasource": { + "type": "grafana-timestream-datasource", + "uid": "UcQpdeY4k" + }, + "measure": "guardrail_max_activation", + "rawQuery": "SELECT bin(time, $__interval) as binned_time, AVG(\"measure_value\"::double)\nFROM $__database.$__table\nWHERE \"measure_name\" = '$__measure' AND $__timeFilter\nGROUP BY bin(time, $__interval)\nORDER BY binned_time", + "refId": "A", + "table": "\"metrics_table\"" + } + ], + "title": "Guardrail Max Activations Average", + "type": "timeseries" + }, + { + "description": "Guardrail Total Activation Count per Resource and Guardrail ID.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "#EAB839", + "value": 25 + }, + { + "color": "red", + "value": 50 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 0 + }, + "id": 14, + "options": { + "displayMode": "basic", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "sum" + ], + "fields": "/^total_activations$/", + "values": true + }, + "showUnfilled": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "database": "\"core_timestream_db\"", + "datasource": { + "type": "grafana-timestream-datasource", + "uid": "UcQpdeY4k" + }, + "measure": "guardrail_activation_count", + "rawQuery": "SELECT \"aggregate_id\", \"guardrail_id\", MAX(\"measure_value\"::double) as \"total_activations\" FROM $__database.$__table\nWHERE \"measure_name\" = '$__measure' AND $__timeFilter\nGROUP BY \"aggregate_id\", \"guardrail_id\"\nORDER BY \"total_activations\" DESC", + "refId": "A", + "table": "\"metrics_table\"" + } + ], + "title": "Guardrail Total Activation Count", + "type": "bargauge" + }, + { + "description": "Average lead time from last pertinent activation to resolution.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 16, + "options": { + "displayMode": "gradient", + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^average_lead_time$/", + "values": true + }, + "showUnfilled": true, + "text": {} + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "database": "\"core_timestream_db\"", + "datasource": { + "type": "grafana-timestream-datasource", + "uid": "UcQpdeY4k" + }, + "measure": "guardrail_lead_time", + "rawQuery": "SELECT \"aggregate_id\", \"guardrail_id\", AVG(\"measure_value\"::double) as \"average_lead_time\" FROM $__database.$__table\nWHERE \"measure_name\" = '$__measure' AND $__timeFilter\nGROUP BY \"aggregate_id\", \"guardrail_id\"\nORDER BY \"average_lead_time\" DESC", + "refId": "A", + "table": "\"metrics_table\"" + } + ], + "title": "Guardrail Lead Time Average", + "type": "bargauge" + }, + { + "description": "Percentage based on the number of patch compliant instances.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": null + }, + { + "color": "green", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 12, + "links": [ + { + "targetBlank": true, + "title": "Patch Compliance Documentation", + "url": "https://legendary-spoon-f82c1640.pages.github.io/domains/Patching/events/PatchRunSummary/" + } + ], + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "/^measure_value::double$/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "database": "\"core_timestream_db\"", + "datasource": { + "type": "grafana-timestream-datasource", + "uid": "UcQpdeY4k" + }, + "measure": "patch_compliance_percentage", + "rawQuery": "SELECT \"measure_value\"::double FROM $__database.$__table\nWHERE \"measure_name\" = '$__measure' AND $__timeFilter\nORDER BY \"time\" ASC", + "refId": "A", + "table": "\"metrics_table\"", + "waitForResult": false + } + ], + "title": "Patch Compliance %", + "type": "gauge" + }, + { + "description": "", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 10, + "links": [ + { + "targetBlank": true, + "title": "Resource Compliance Documentation", + "url": "" + } + ], + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^measure_value::double$/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "database": "\"core_timestream_db\"", + "datasource": { + "type": "grafana-timestream-datasource", + "uid": "UcQpdeY4k" + }, + "measure": "resource_compliance_lead_time", + "rawQuery": "SELECT \"measure_value\"::double FROM $__database.$__table\nWHERE \"measure_name\" = '$__measure' AND $__timeFilter\nORDER BY \"time\" ASC", + "refId": "A", + "table": "\"metrics_table\"", + "waitForResult": true + } + ], + "title": "Resource Compliance Lead Time (Average)", + "type": "gauge" + }, + { + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 6, + "links": [ + { + "targetBlank": true, + "title": "Project Documentation", + "url": "https://legendary-spoon-f82c1640.pages.github.io/domains/Account/" + } + ], + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^measure_value::double$/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "database": "\"core_timestream_db\"", + "datasource": { + "type": "grafana-timestream-datasource", + "uid": "UcQpdeY4k" + }, + "measure": "project_lead_time", + "rawQuery": "SELECT \"measure_value\"::double FROM $__database.$__table\nWHERE \"measure_name\" = '$__measure' AND $__timeFilter\nORDER BY \"time\" ASC", + "refId": "A", + "table": "\"metrics_table\"", + "waitForResult": true + } + ], + "title": "Project Lead Time (Average)", + "type": "gauge" + }, + { + "description": "", + "fieldConfig": { + "defaults": { + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "id": 8, + "links": [ + { + "targetBlank": true, + "title": "Account Documentation", + "url": "https://legendary-spoon-f82c1640.pages.github.io/domains/Account/" + } + ], + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "/^measure_value::double$/", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "database": "\"core_timestream_db\"", + "datasource": { + "type": "grafana-timestream-datasource", + "uid": "UcQpdeY4k" + }, + "measure": "account_lead_time", + "rawQuery": "SELECT \"measure_value\"::double FROM $__database.$__table\nWHERE \"measure_name\" = '$__measure' AND $__timeFilter\nORDER BY \"time\" ASC", + "refId": "A", + "table": "\"metrics_table\"", + "waitForResult": true + } + ], + "title": "Account Lead Time (Average)", + "type": "gauge" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "id": 20, + "options": { + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showThresholdLabels": false, + "showThresholdMarkers": true + }, + "pluginVersion": "8.4.7", + "targets": [ + { + "database": "\"core_timestream_db\"", + "datasource": { + "type": "grafana-timestream-datasource", + "uid": "UcQpdeY4k" + }, + "measure": "identity_lead_time", + "rawQuery": "SELECT \"measure_value\"::double FROM $__database.$__table\nWHERE \"measure_name\" = '$__measure' AND $__timeFilter\nORDER BY \"time\" ASC", + "refId": "A", + "table": "\"metrics_table\"" + } + ], + "title": "Identity Lead Time (Average)", + "type": "gauge" + } + ], + "schemaVersion": 35, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Flight Controller dashboard", + "uid": "test", + "version": 1, + "weekStart": "" +} \ No newline at end of file diff --git a/infrastructure/azure/grafana_dashboard_component.py b/infrastructure/azure/grafana_dashboard_component.py new file mode 100644 index 0000000..dc7acbd --- /dev/null +++ b/infrastructure/azure/grafana_dashboard_component.py @@ -0,0 +1,28 @@ +# Import the necessary modules +from constructs import Construct +import json + +from imports.grafana.folder import Folder +from imports.grafana.dashboard import Dashboard + +with open("dashboard.json", "r") as config: + data = json.load(config) + +data = json.dumps(data) + +class GrafanaDashboardComponent(Construct): + def __init__( + self, + scope: Construct, + id: str, + ): + super().__init__(scope, id) + + self.folder = Folder(self, "folder", title="Azure Flight Controller") + self.dashboard = Dashboard( + self, + "azure-dashboard", + config_json=data, + overwrite=True, + folder=self.folder.id, + ) diff --git a/infrastructure/azure/main.py b/infrastructure/azure/main.py index 765b0e2..62c45d8 100644 --- a/infrastructure/azure/main.py +++ b/infrastructure/azure/main.py @@ -1,8 +1,10 @@ #!/usr/bin/env python +from constructs import Construct from cdktf import App, TerraformStack, TerraformOutput from cdktf_cdktf_provider_azurerm.provider import AzurermProvider -from constructs import Construct +from imports.grafana.provider import GrafanaProvider +from grafana_dashboard_component import GrafanaDashboardComponent class AzureCore(TerraformStack): def __init__( @@ -11,11 +13,42 @@ def __init__( id: str, ): super().__init__(scope, id) + self.resource_group = "flight_controller" + self.azure_function = "azfcdev" + self.azure_sql = "azfcdevdb" + + AzurermProvider( + self, + "Azure", + features = {} + ) + +class Azurerafana(TerraformStack): + def __init__(self, scope: Construct, id: str, workspace_id: str): + super().__init__(scope, id) + + AzurermProvider( + self, + "Azure", + features = {} + ) + + GrafanaProvider( + self, + "Grafana", + auth=api_key.secret_string, + url="https://" + + workspace_id + + ".azurewebsites.net", + ) - AzurermProvider(self, "Azure") + GrafanaDashboardComponent( + self, + "grafana_dashboard" + ) - self.resource_group = "rg_name" app = App() core_stack = AzureCore(app, "azure_core") +grafana_dashboard_stack = AzureGrafana(app, "azure_grafana_dashboard", core_stack.grafana_workspace_id) app.synth() From 91046a5ead60d2b54d3f63fb7741d38577bd7039 Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Mon, 8 May 2023 19:29:20 +1000 Subject: [PATCH 06/12] Added Azure resources --- infrastructure/azure/main.py | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/infrastructure/azure/main.py b/infrastructure/azure/main.py index 62c45d8..7a9e9df 100644 --- a/infrastructure/azure/main.py +++ b/infrastructure/azure/main.py @@ -5,6 +5,10 @@ from cdktf_cdktf_provider_azurerm.provider import AzurermProvider from imports.grafana.provider import GrafanaProvider from grafana_dashboard_component import GrafanaDashboardComponent +from cdktf_cdktf_provider_azurerm import ( + resource_group +) + class AzureCore(TerraformStack): def __init__( @@ -13,17 +17,29 @@ def __init__( id: str, ): super().__init__(scope, id) - self.resource_group = "flight_controller" - self.azure_function = "azfcdev" + + self.location = "australiasoutheast" + self.resource_group_name = "flight_controller" + self.function_name = "azfcdev" self.azure_sql = "azfcdevdb" + self.grafana_workspace_name = "grafana_dashboard" AzurermProvider( self, "Azure", features = {} - ) + ) + + resourceGroup = resource_group.ResourceGroup( + self, + "rg", + name = self.resource_group_name, + location = self.location, + ) + + # self.grafana_workspace_id = grafanaWorkspace.grafana_workspace.id -class Azurerafana(TerraformStack): +class AzureGrafana(TerraformStack): def __init__(self, scope: Construct, id: str, workspace_id: str): super().__init__(scope, id) @@ -50,5 +66,5 @@ def __init__(self, scope: Construct, id: str, workspace_id: str): app = App() core_stack = AzureCore(app, "azure_core") -grafana_dashboard_stack = AzureGrafana(app, "azure_grafana_dashboard", core_stack.grafana_workspace_id) +#grafana_dashboard_stack = AzureGrafana(app, "azure_grafana_dashboard", core_stack.grafana_workspace_id) app.synth() From ea9e451c082e27bf1b04e9c33eb9fb744baca36e Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Mon, 8 May 2023 23:12:28 +1000 Subject: [PATCH 07/12] Update pipfile --- Pipfile.lock | 540 ++++++++++++++++++++++++++------------------------- 1 file changed, 278 insertions(+), 262 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 2bf9c91..0f9bdb0 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "bc2290dbc1325bcc121982de1a4c33af6f8300d8ba85269701ee2204e511e9b7" + "sha256": "9d26a10be911c888fb07abb980fd90875e448426682af5dd41f3ce5a214ed299" }, "pipfile-spec": 6, "requires": { @@ -24,21 +24,29 @@ "markers": "python_version >= '3.7'", "version": "==0.4.0" }, + "blinker": { + "hashes": [ + "sha256:4afd3de66ef3a9f8067559fb7a1cbe555c17dcbe15971b05d1b625c3e7abe213", + "sha256:c3d739772abb7bc2860abf5f2ec284223d9ad5c76da018234f6f50d6f31ab1f0" + ], + "markers": "python_version >= '3.7'", + "version": "==1.6.2" + }, "boto3": { "hashes": [ - "sha256:40d6fb099f7e6041ddcc72aadc37d2eaae6f32d1f7cf2ef5c02199a114be60a3", - "sha256:bfb16f1978be69fdee39b692fe639b5f9c430d33843d282889a59e61ae132051" + "sha256:0686a62f424c4f3375a706555b765d1e24d03d70e7d317ffcb2d411b39aa8139", + "sha256:1dab3fcbeada61a3b5a42ea25a89143511a5b22626775c685e31e313f327cf3c" ], "index": "pypi", - "version": "==1.26.116" + "version": "==1.26.129" }, "botocore": { "hashes": [ - "sha256:907dec71437386867000912c2427845f482feef5327e7c659e3e81766aac3d34", - "sha256:c058baa1d374111ad2036e1f7d9fe715571b6d66d180a224208fc7fef9bc3c80" + "sha256:80370e835ccf12e0429d4c6cc0e9d03cf47b72c41ec5916b01fb9544765f314d", + "sha256:f44460236324727615c518c229690c3cc3ea3162a55a2ac242ba771e8fa41553" ], "markers": "python_version >= '3.7'", - "version": "==1.29.116" + "version": "==1.29.129" }, "cachetools": { "hashes": [ @@ -50,11 +58,11 @@ }, "certifi": { "hashes": [ - "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3", - "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18" + "sha256:0f0d56dc5a6ad56fd4ba36484d6cc34451e1c6548c61daad8c320169f91eddc7", + "sha256:c6c2e98f5c7869efca1f8916fed228dd91539f9f1b444c314c06eef02980c716" ], "markers": "python_version >= '3.6'", - "version": "==2022.12.7" + "version": "==2023.5.7" }, "charset-normalizer": { "hashes": [ @@ -147,11 +155,11 @@ }, "flask": { "hashes": [ - "sha256:7eb373984bf1c770023fce9db164ed0c3353cd0b53f130f4693da0ca756a2e6d", - "sha256:c0bec9477df1cb867e5a67c9e1ab758de9cb4a3e52dd70681f59fa40a62b3f2d" + "sha256:77fd4e1249d8c9923de34907236b747ced06e5467ecac1a7bb7115ae0e9670b0", + "sha256:8c2f9abd47a9e8df7f0c3f091ce9497d011dc3b31effcf4c85a6e2b50f4114ef" ], "index": "pypi", - "version": "==2.2.3" + "version": "==2.3.2" }, "google-api-core": { "extras": [ @@ -190,11 +198,11 @@ }, "google-cloud-pubsub": { "hashes": [ - "sha256:587da7d535ca858ceeed7036205355e5a6dd3e44ea4abc96f4e50d1abfd8843b", - "sha256:e41ec9635cc68dbd238f572f295b3d0bae6340c66ba31a70dfb890950ab33c2b" + "sha256:31e271be755ed7143ae0cdfed0506faf40d7504b46fa5c8b5bab4b922f6c3d3b", + "sha256:5bb4f2a6d2d0bf827d48dca1de1fb0ca12636ed75a69bbc4f89d231239b65ad9" ], "index": "pypi", - "version": "==2.16.0" + "version": "==2.16.1" }, "google-crc32c": { "hashes": [ @@ -272,11 +280,11 @@ }, "google-resumable-media": { "hashes": [ - "sha256:15b8a2e75df42dc6502d1306db0bce2647ba6013f9cd03b6e17368c0886ee90a", - "sha256:831e86fd78d302c1a034730a0c6e5369dd11d37bad73fa69ca8998460d5bae8d" + "sha256:218931e8e2b2a73a58eb354a288e03a0fd5fb1c4583261ac6e4c078666468c93", + "sha256:da1bd943e2e114a56d85d6848497ebf9be6a14d3db23e9fc57581e7c3e8170ec" ], "markers": "python_version >= '3.7'", - "version": "==2.4.1" + "version": "==2.5.0" }, "googleapis-common-protos": { "hashes": [ @@ -296,62 +304,62 @@ }, "grpcio": { "hashes": [ - "sha256:02000b005bc8b72ff50c477b6431e8886b29961159e8b8d03c00b3dd9139baed", - "sha256:031bbd26656e0739e4b2c81c172155fb26e274b8d0312d67aefc730bcba915b6", - "sha256:1209d6b002b26e939e4c8ea37a3d5b4028eb9555394ea69fb1adbd4b61a10bb8", - "sha256:125ed35aa3868efa82eabffece6264bf638cfdc9f0cd58ddb17936684aafd0f8", - "sha256:1382bc499af92901c2240c4d540c74eae8a671e4fe9839bfeefdfcc3a106b5e2", - "sha256:16bca8092dd994f2864fdab278ae052fad4913f36f35238b2dd11af2d55a87db", - "sha256:1c59d899ee7160638613a452f9a4931de22623e7ba17897d8e3e348c2e9d8d0b", - "sha256:1d109df30641d050e009105f9c9ca5a35d01e34d2ee2a4e9c0984d392fd6d704", - "sha256:1fa7d6ddd33abbd3c8b3d7d07c56c40ea3d1891ce3cd2aa9fa73105ed5331866", - "sha256:21c4a1aae861748d6393a3ff7867473996c139a77f90326d9f4104bebb22d8b8", - "sha256:224166f06ccdaf884bf35690bf4272997c1405de3035d61384ccb5b25a4c1ca8", - "sha256:2262bd3512ba9e9f0e91d287393df6f33c18999317de45629b7bd46c40f16ba9", - "sha256:2585b3c294631a39b33f9f967a59b0fad23b1a71a212eba6bc1e3ca6e6eec9ee", - "sha256:27fb030a4589d2536daec5ff5ba2a128f4f155149efab578fe2de2cb21596d3d", - "sha256:30fbbce11ffeb4f9f91c13fe04899aaf3e9a81708bedf267bf447596b95df26b", - "sha256:3930669c9e6f08a2eed824738c3d5699d11cd47a0ecc13b68ed11595710b1133", - "sha256:3b170e441e91e4f321e46d3cc95a01cb307a4596da54aca59eb78ab0fc03754d", - "sha256:3db71c6f1ab688d8dfc102271cedc9828beac335a3a4372ec54b8bf11b43fd29", - "sha256:48cb7af77238ba16c77879009003f6b22c23425e5ee59cb2c4c103ec040638a5", - "sha256:49eace8ea55fbc42c733defbda1e4feb6d3844ecd875b01bb8b923709e0f5ec8", - "sha256:533eaf5b2a79a3c6f35cbd6a095ae99cac7f4f9c0e08bdcf86c130efd3c32adf", - "sha256:5942a3e05630e1ef5b7b5752e5da6582460a2e4431dae603de89fc45f9ec5aa9", - "sha256:62117486460c83acd3b5d85c12edd5fe20a374630475388cfc89829831d3eb79", - "sha256:650f5f2c9ab1275b4006707411bb6d6bc927886874a287661c3c6f332d4c068b", - "sha256:6dc1e2c9ac292c9a484ef900c568ccb2d6b4dfe26dfa0163d5bc815bb836c78d", - "sha256:73c238ef6e4b64272df7eec976bb016c73d3ab5a6c7e9cd906ab700523d312f3", - "sha256:775a2f70501370e5ba54e1ee3464413bff9bd85bd9a0b25c989698c44a6fb52f", - "sha256:860fcd6db7dce80d0a673a1cc898ce6bc3d4783d195bbe0e911bf8a62c93ff3f", - "sha256:87f47bf9520bba4083d65ab911f8f4c0ac3efa8241993edd74c8dd08ae87552f", - "sha256:960b176e0bb2b4afeaa1cd2002db1e82ae54c9b6e27ea93570a42316524e77cf", - "sha256:a7caf553ccaf715ec05b28c9b2ab2ee3fdb4036626d779aa09cf7cbf54b71445", - "sha256:a947d5298a0bbdd4d15671024bf33e2b7da79a70de600ed29ba7e0fef0539ebb", - "sha256:a97b0d01ae595c997c1d9d8249e2d2da829c2d8a4bdc29bb8f76c11a94915c9a", - "sha256:b7655f809e3420f80ce3bf89737169a9dce73238af594049754a1128132c0da4", - "sha256:c33744d0d1a7322da445c0fe726ea6d4e3ef2dfb0539eadf23dce366f52f546c", - "sha256:c55a9cf5cba80fb88c850915c865b8ed78d5e46e1f2ec1b27692f3eaaf0dca7e", - "sha256:d2f62fb1c914a038921677cfa536d645cb80e3dd07dc4859a3c92d75407b90a5", - "sha256:d8ae6e0df3a608e99ee1acafaafd7db0830106394d54571c1ece57f650124ce9", - "sha256:e355ee9da9c1c03f174efea59292b17a95e0b7b4d7d2a389265f731a9887d5a9", - "sha256:e3e526062c690517b42bba66ffe38aaf8bc99a180a78212e7b22baa86902f690", - "sha256:eb0807323572642ab73fd86fe53d88d843ce617dd1ddf430351ad0759809a0ae", - "sha256:ebff0738be0499d7db74d20dca9f22a7b27deae31e1bf92ea44924fd69eb6251", - "sha256:ed36e854449ff6c2f8ee145f94851fe171298e1e793f44d4f672c4a0d78064e7", - "sha256:ed3d458ded32ff3a58f157b60cc140c88f7ac8c506a1c567b2a9ee8a2fd2ce54", - "sha256:f4a7dca8ccd8023d916b900aa3c626f1bd181bd5b70159479b142f957ff420e4" + "sha256:02cdd7f107f8c86cc1213a2f66751d5b534c3e5f24ffc83204970c63c975875f", + "sha256:053a4f41e5587de363f786713e91d8a0ecb0e7241033d2b65f60e9297ae10418", + "sha256:07a8bebb510ff5add1c42ae898053363216eac7a3ce3f87fdb12a4a3c8d34a5d", + "sha256:090402ea5ea088ed0070ad2890c8597d2b7805c9d9bd430c6a175d28db349d51", + "sha256:0cb30f02d3c182934e11243324c6435a06284aa633e25103e62d262e13b51ee9", + "sha256:0f28b413cd32866527983d236cf8c1a0472327d26d8dbdbad7a89aa66d8c51b1", + "sha256:10293b63606fd1067e66be183093483476e930cd1ce3ec383a778d6f780bab2e", + "sha256:12a39a5523db96b5b5ccea389b0db4d8db3886c8ad209dbf2ff4589e793c7a8b", + "sha256:1770e1344775452fe53d4704d38229ecdd960f530e0d799ba2cbc7061bbbcd19", + "sha256:222c236ece8d390d6aa7a6607c739b6bb46f1f1f67b5b8d882e1538dfeb0e0f1", + "sha256:31f12a72c74f85543d6f6c3406439589f9b59e2fe578e24015497cfb136ce3eb", + "sha256:344e7a8adf2f9a10dad5f4fb7b58806104d4b945005c4debe4a12f955cc42897", + "sha256:34b9ed86a7bfb91364847ae7690f1ba389e37b8462b52ab36adf5d2ea2a31160", + "sha256:3507e964417acea455c3587eb5cc8c38d7fc4eb4cb9893932de331376bb39e0b", + "sha256:4164a5f484dcbb777ba4ea8f51df4cc773a5ecfde57c99ba31adfbf706bf51de", + "sha256:436332c569ef74d0423df8770f1e0cf5416b3414a2eab02a06b728d888f66b24", + "sha256:51152554defbbef0fe03eb07dc551f5e1cf964d0d7ad91db34749a85bf505030", + "sha256:528336481f436c59170facc34a1f838075626ecd052543aa006435c3141b8864", + "sha256:59e3c5c0e86404657484601be0138652969018df240ed64e1ab9be04477246c6", + "sha256:60d1771ece8c5116dd3f572f9bdf2c3e9234d5e76b50e0353d9d1d527664f2d3", + "sha256:669954520c8ef9ac69e073be25053c0f05d3df5266e44144015c79b5fc25db43", + "sha256:6b76ef885da540717b54344a87577695b90f912fc5ee5e6a49fee1610d52deab", + "sha256:6d6cb7f520258699b39198299c13026d068eb0dd0f86bdbc6559322e449022fa", + "sha256:6ff685d82586ac3b5ea450c10eca4bb6fd93bd0a355af8413590473b51f502f8", + "sha256:7074b87a53ee911573b2508533206ac6363cc6a8eaf6f0242950179105c3345f", + "sha256:71d7cc6f7a44fa713ab5561a2476a22c2d0f5b5e31ea0ee3badd51a28d0e3650", + "sha256:7c2b8ec2188dc8fc62f95fe6354e2c84e2c9ef75c810a88e78c5f70c6f2127fa", + "sha256:7eaccbf69a9cf03c937dd03f1ca1a6500881e5ec3a65a333fc312b4502578a2d", + "sha256:840f98e929dd3ecdf293812eb86a269a10b86a38ae4a90a618dfc57962c57bb7", + "sha256:86e91b4f650518cbece075ab55c652d82588fefc084db7500aa2984009085b2b", + "sha256:8a8e625282a2ad9da52f007270825e10bbd52ac5dc38ac6680d1869348cd702b", + "sha256:973a3a0fc1560366b20bdc692c0ed3c71090c3a1e978165ab6f0624c5dafca4b", + "sha256:9dec22d8bd0467e47c69b79b97db2ef048d9367e7c21d552586725eaced760e3", + "sha256:9e1b6f88164a9232de8a4970918465fd1c45b98e50239ca18103f3da460a7e60", + "sha256:a6505e73734f91d246660d6921b57bf41e556e00336fad7763a8feaefc705a30", + "sha256:c6afa50c9e85f6a9d45c3453cac2088aac6d6b75b68aa2382ac65f9405ac1bf7", + "sha256:c6cd3bf3914a7a634a077e8b2a86b31f6967410c45b3c4b4a175e27e6fa07482", + "sha256:c8223208306882587deae558e85ec8bd2f4e9fb63ab632c36f72d36901fa514f", + "sha256:d070ee76acf89206b8caebf1d097b0aa0a4e6e8ebf95e2558dcd2d3308095880", + "sha256:d164e37c33f6074b5f0f8ab26b37d966542ea202f4e92eb51d08af04b41df63d", + "sha256:da480f9b874649e624143c628d008c772b043bd9a1204503826056892227373f", + "sha256:e269753b264676302907e524e96c8de41ba19595c9f67b1167ff032be233e6bf", + "sha256:e7c5bc9108d011b987bc68760b3b096403198f39cb24def60834f8bc2963f30c", + "sha256:ee937ac2c67c16ef82788811c5298e12f59fe64db43bb9dcaf6578f60d8831d6", + "sha256:f74cb228012b2c5b1e4a5396bdf5603011be6afe5169eeabf8322dae31fd3187" ], "markers": "python_version >= '3.7'", - "version": "==1.54.0" + "version": "==1.55.0rc1" }, "grpcio-status": { "hashes": [ - "sha256:96968314e0c8576b2b631be3917c665964c8018900cb980d58a736fbff828578", - "sha256:b50305d52c0df6169493cca5f2e39b9b4d773b3f30d4a7a6b6dd7c18cb89007c" + "sha256:955c024c73d13b9ee2bca6adeead106b4130a8638fa15736d7062a36da95e0f9", + "sha256:ee56337b2975903f5f027e868c14cd3335914e5162dad2d20018ddd57e507a12" ], "markers": "python_version >= '3.6'", - "version": "==1.54.0" + "version": "==1.55.0rc1" }, "gunicorn": { "hashes": [ @@ -371,11 +379,11 @@ }, "importlib-metadata": { "hashes": [ - "sha256:03ba783c3a2c69d751b109fc0c94a62c51f581b3d6acf8ed1331b6d5729321ff", - "sha256:7a8bdf1bc3a726297f5cfbc999e6e7ff6b4fa41b26bba4afc580448624460045" + "sha256:43dd286a2cd8995d5eaef7fee2066340423b818ed3fd70adf0bad5f1fac53fed", + "sha256:92501cdf9cc66ebd3e612f1b4f0c0765dfa42f0fa38ffb319b6bd84dd675d705" ], "markers": "python_version < '3.10'", - "version": "==6.5.0" + "version": "==6.6.0" }, "itsdangerous": { "hashes": [ @@ -475,22 +483,22 @@ }, "protobuf": { "hashes": [ - "sha256:13233ee2b9d3bd9a5f216c1fa2c321cd564b93d8f2e4f521a85b585447747997", - "sha256:23452f2fdea754a8251d0fc88c0317735ae47217e0d27bf330a30eec2848811a", - "sha256:52f0a78141078077cfe15fe333ac3e3a077420b9a3f5d1bf9b5fe9d286b4d881", - "sha256:70659847ee57a5262a65954538088a1d72dfc3e9882695cab9f0c54ffe71663b", - "sha256:7760730063329d42a9d4c4573b804289b738d4931e363ffbe684716b796bde51", - "sha256:7cf56e31907c532e460bb62010a513408e6cdf5b03fb2611e4b67ed398ad046d", - "sha256:8b54f56d13ae4a3ec140076c9d937221f887c8f64954673d46f63751209e839a", - "sha256:d14fc1a41d1a1909998e8aff7e80d2a7ae14772c4a70e4bf7db8a36690b54425", - "sha256:d4b66266965598ff4c291416be429cef7989d8fae88b55b62095a2331511b3fa", - "sha256:e0e630d8e6a79f48c557cd1835865b593d0547dce221c66ed1b827de59c66c97", - "sha256:ecae944c6c2ce50dda6bf76ef5496196aeb1b85acb95df5843cd812615ec4b61", - "sha256:f08aa300b67f1c012100d8eb62d47129e53d1150f4469fd78a29fa3cb68c66f2", - "sha256:f2f4710543abec186aee332d6852ef5ae7ce2e9e807a3da570f36de5a732d88e" + "sha256:08d2c1f175d46fd8ed92352142a6a5ea346ed0629cc7a54b07fc6c9a35b36122", + "sha256:0c3fc1ce8db15959f7c6720ee4c4a97d346a8997070bf39ea7f778f97dc75bb9", + "sha256:29eff144a2eecf70b8e6fee5e8c9b08ab4b0f2728af4e220434158481b72a640", + "sha256:37c1cbc545b4ffa94b2041ab42a6600d7713a87186a37d2e89d7c1f841dc0868", + "sha256:399dcefe0a7b5f813ed0c447a56a992ce72a2ebfb18d4f1e374244f31643af57", + "sha256:3e87feeaca23a48d4575f2593e71404ece84dc6208bf1a2d09e8f4e377470070", + "sha256:5c3c6fab20f8a8a1305c061a20853d75aeb211261cfba9cb677ad47a92c3320d", + "sha256:9b44ee9fe3683c5ffb8f7381f3b4504a3efdab66a95cb75bcfa557b887c70396", + "sha256:d03e708ec55d86dcbd69d94b5d2ff3685fe12f49ece94a804594d5b09311c33a", + "sha256:e435f6189fbeb619bc2aa64e5f61d12fe47f16ecf7c6c022e15bc55a961e1a79", + "sha256:e95fbf4712cd2452854b238c66768a2746effd84c10712b64a4bc10d3ee9f66e", + "sha256:f597e18215de58ad9a539e65f6b224e49f0d9917a0fb23412514faa1990cbdb9", + "sha256:f5cf854fa587909fb0f98601d952ddde85c2d938a99e9958bfad2d0e446c0ea7" ], "markers": "python_version >= '3.7'", - "version": "==4.22.3" + "version": "==4.23.0rc3" }, "pyasn1": { "hashes": [ @@ -510,114 +518,114 @@ }, "pydantic": { "hashes": [ - "sha256:67c14663d8b822cc82dfb78a56ae567c9bcc83957e802ae8b96bea4750fdcbdc", - "sha256:6e2c0ca7786e5945a2da6c2f441d5b56aacbb040e51260a39283ad45c21e39fa" + "sha256:720884809bae5cb5358914e45da63dd61369917749d55ab80a7427aa4ca5dcf7", + "sha256:7a99e0616ca53fa53079f28d941370e491ee84e7657f2681b50ca0a41390a266" ], "index": "pypi", - "version": "==2.0a2" + "version": "==2.0a4" }, "pydantic-core": { "hashes": [ - "sha256:0410c690341a4b708047cc72f9ebd23e4ba9d20f196f9289bbd980f1ee8f8450", - "sha256:0acd0ff5ced407c2afbd691008c1876114bb48d4435c1492709f9f50cd56c5d8", - "sha256:11d375d3ca125894a346a5a3ca26daadd352b619b791eee9344f5045fa1f983f", - "sha256:1baafa4b688d814a091932b9d9e33fdc4a4265dde1d2b06074672da172f0d182", - "sha256:1bdd246f8ce3abf68ee91b75007b866968dc4cc1dc834a16d4c3ae1852207cfd", - "sha256:1bde5e4266f7e492d19e94824b9ecce75a5bbb4be19f773772f792204f72e65c", - "sha256:1dce4b872b877324db665c09b920351390c29c40ef5f77a59b2e4ff837a31798", - "sha256:2152a95ddb160a4e92ecf9532ceaa65b31c220c244a39c2d1cd970fdf6efbb11", - "sha256:244634aa97971076042004f27b41fcb3fc8ab2142f2ac4f28a95d193b1610046", - "sha256:245f7dbc34ba84ceabdf277c6698c716c3f02db8564bbbc6f84138452cb8412b", - "sha256:24f7035801de73d0c4f6cd2e6aed4debc72692d6a7711408382da729861341ca", - "sha256:258915b2447d54d95f864922d3f5e978c713bb313729bb3541071475348c37f2", - "sha256:2b12cb72176d7a17a2d8039eba7cef1a7d20a359e5b970ae8b37ceedcc557f18", - "sha256:2d857264277b71324dace10201a292b9da2ba57d2f85e5dc4676cb6eada7c09d", - "sha256:2de1a6cd19c18692dadb75d4ad7728b5c1aee7e7f7adc55073499c5863bf1b38", - "sha256:31faca184fa19f94879f7fefd498aa5524c160e7739ca19e64ebd31b765b825f", - "sha256:362bcb4e8b17786ce25007c941783d0cd62d6b585116ca7e172a09a4456dc820", - "sha256:375bc3bc61847179989aa03d2dd2bfc158033cb988ed9740258663bb1434e5cb", - "sha256:3798175638e02cee53914b8474ab0e0bd97e6d4841e110f53653446bf500ba8c", - "sha256:38496f67b6e3be93de28fa326cb77804cc171894513a90a499b4d431aaa1e9bb", - "sha256:422411aa4ea7121475805ac7bf46270729d499b6a74b453e014cb7633cbc28a1", - "sha256:42d653cd124193054cd7f9c85f0879fb08ab9479d9221fa405c18337f107627b", - "sha256:4405f8670377ca5496ba94c68a563cdd00356d7e612a0868f8d30b828f57b1f8", - "sha256:4e6ffcbff6a55cf95d8fe32c3faf406fe5ce4db5fa388f54a86828311f2b8538", - "sha256:4ffa0f72f6963ed61fcacd473d59a1e110dfc44df8796bbc1c031b98e98b7362", - "sha256:5590b0f7846356ff9de766c6eeb4191da60519d87613739422d2ae35eafce1e6", - "sha256:55a004b51892f00e4c3f25ceae4235061caf7c4c495d8acc15a841bea115d009", - "sha256:55dbd9ba78bbc6c7de33edbbef255c589ad3496cc3b0b211f1b9a2032b5b568d", - "sha256:5aec2b7b8244b2e4eb9ab8f57436ff1ec2d3b9f443a5f99d5a67ed5e47e9a6fb", - "sha256:6603a1cc5bd4f0fd54bd496040478f5391270e7e79308d1b162f4c6644c2c56a", - "sha256:660dbce02e24c82c141724e02823abf8e04e1253d09bf03ce36507eccd4ed51c", - "sha256:69ae310c49eccf188b78af23021a5c31bb6cd3c31ddf089ffa52df4cf59db6b6", - "sha256:6d366baba9d1bab8f430e45ba20e578e0dfbf4af93cbe5a9e5193c92057c652c", - "sha256:6d521cddf70dc92a7d2ab44705576439aee1dc2b35055571592c78088ea51632", - "sha256:736d0dcbe7cd0a3d25eb44300ebde2d7c9c567bfdff0f44510f04ed8bbbb32ea", - "sha256:7706e76e7a49908ba3a94bcdd82797366552989827ce2464488edbc5e17910b7", - "sha256:7896d16f27dcb246829ef6244fbaf85fad2173e53b1b08aea616857e229c1015", - "sha256:789edd3b49bf7f59181943196b644fa14c34825945a8811c78ea502203b64b8e", - "sha256:7e58e83e1daa5b36c609467559b93d7604ee09293a9e56277bcfdb5b43a8ce50", - "sha256:807d1f2aa738b0f629c4fb23f88ccd95f083f5776c4c2b2ae774ae90076f02b3", - "sha256:832e7c9fffd367429b8cb0c0b58db114535ca1becd51a2a49faf146762720652", - "sha256:8344586c05119eaa1d22aa995dc5749f31625c798fea8504dcc3bca0ee939982", - "sha256:8a9881636c13b9dd5e67f5955dc0ddaadd25e8f91328361bff4227f712ab72b9", - "sha256:8da93ebef2aca62493fe011f513b10d633d4a111140978115a82c4e3947ff0f4", - "sha256:8ef075cf0000a3e65f3aa8bab29101a04eb21066f692495c9d51b0d496f92f5e", - "sha256:9389d3b3187a310fcc080e9709fe18855ddcbc8cb8c006be93d13fb847a7a1de", - "sha256:966074e340bd896f0ea73b40b0265d50aa8c46026f800fe341a980002368cf5d", - "sha256:9845d90b6f3d983534838240fed9fc98301f180540704caea2bfbcb24ef030a7", - "sha256:9f01f7f1e9a7ecae35810f1ca6128eeb88245c26b7319a47e0fa16cf33a3bc09", - "sha256:a1cc8ccb29b88a6b636e90559f8b6d87c638e77464ae43ee2cdaebde3e62bbd7", - "sha256:a5131b838d2fe3dd6c53453cfbb809660049bc580bc9f564a8c12ae019bba0dd", - "sha256:a721cf4f6959c9083ace2c374040cc526d1d16cf5748b417f2b0a55ebc212e6d", - "sha256:a9492f8c80520835875b1d5df786915135a6492d165bd7fc6d30f1b4abc35e0e", - "sha256:aab63d0a925f3f16e60c0980a805887770e663bc0a504ae8e4d0624a559bae8e", - "sha256:b6642f908b97e75e8a2a50b7173fc454413d56728a8efd4e5088bb3329e787d0", - "sha256:bb0362c7cd8769c7b53ad4d71183b84ccab1996140fd1aedcc265ca6c2655236", - "sha256:be0edd4df529bf500bddac92c128de5fd33b22ccc3a2d24da38c72f3c07fa774", - "sha256:c15027fc86db4f80e21b5d8127a6859d952fe4ef3027db6c55aba057c276d53b", - "sha256:c3ad0907132e28c7b381a237de74597018c07e5348c3508272e9b116b54e2e4e", - "sha256:c4c056d6d27a5e75c36af141fee80dc03b4b5212ffb14c47b2a29bf5f04c1623", - "sha256:c5a9add173825540e5d2f4154e324fadb2eefc4c75d494fb8f843aad20f83247", - "sha256:c6c64ce5bddd22e91c43dde4d41b5a89111015960b537f580b988756c84ae087", - "sha256:c81b68bb5c647a62ff6f4849ca24be0f218105fdccbed99e07f7fd3d089c9d75", - "sha256:c86d22371dbe0992553b5ac954a43a83f1eec6f6f496f5f491fc1bb7bb187f88", - "sha256:c9c4a350286ed711c9dcb926d2a8aa08eb1f35da1770d0e608ff88f8379d2739", - "sha256:cb1e7e6438c6148c161dfd1426311fa504e1e160c10ae070a77874fc4e5d094e", - "sha256:d3116d663b4157844ca2e8b10fd41c1acd38f6c0d23c26ed6ece35ccdafc5aba", - "sha256:d4204947bdc5f71770b0a42acfb000a79e5e82ba107704a37212865d95d05ddf", - "sha256:d84068c07a16d37488fb2a7b2067bff8ccda17f382136080ebaf3b1e5f26135f", - "sha256:d9e9eb4109aa8339cc3e2c04fe744c09428d819925ff4662f452d2caff9fcd8c", - "sha256:dabfa5670c5ca19459d040348162bab7c43f7b4988ccc3649597c05d3e3cb7a0", - "sha256:e109c909c1dec49b8ec2e6caadd3c3686d56a0c209f312c5f6c696fd25f91b70", - "sha256:ee439eb33c3932d5ab6b999a1be379400a06c8e59420120a287d5c3b050d34de", - "sha256:f079b842f017192500c90b33c70f1085e007ef03c5066d9339f2daf1d90a83b5", - "sha256:f09c00318f39c6c80a9b4057d31b83db07944be8bfac230545d368d292c2605b", - "sha256:f0df7f38c173126544297a5b42f4694b011db56b38b51af4d802a4a198879d8c", - "sha256:f2a9fcd4aabc0837f3cc3edb5d410c022a66a6c1b94ca8382f1da46e8e41c091", - "sha256:f3a3631843abe9adbbe1d280757d5a5d883505a8ff5645d9a0859b166fa4de03", - "sha256:fccc8e7d20041ec2793f1acf8a7ea0560c0b7cb28ea7b62137626bfe13c7b630", - "sha256:fcd0b4fa69c72b027c916f228134181bcd15873dd7381956751c235058fbd3ff", - "sha256:feeef0c48cd2bfbf4f13210a5730ba638db5db1eb72a8f9cd39224b3af223108" + "sha256:01b79683e39b4051bd8c252803f6f02748f781224eabcc2532e266be213f9b8b", + "sha256:0391275cd3217852a5b3737719e9115cc34587917bce7bb238ec7a0189b82d60", + "sha256:039bd499abf1096c9610cca40d30db0a8609105897a694766685ecb464018d8b", + "sha256:0bd9fcfc946cef379b3f19658b92fadf9b0ee2e889f4bf81248b946849f4561e", + "sha256:0de7b6f03b28deb52ac50bda0f9e716ea8cb99f4181d8ee1cf967c0bcae593da", + "sha256:0deed36ad1ffbe8437b110f2183266ca5eb49c4928e3659320aa67963e6b791c", + "sha256:1128eca605524b5c9b7dda7f40671a902c20ffff9226ffeebc5eb7c937ae01dd", + "sha256:12dbbd61aa6f1bae703dc01f6135a1c5a9449ced8b44f7a9329e0ec9c07dfa20", + "sha256:149715aae43717365dcbb3e5ee7c946cc325128e83e440a8f9fb9a0e4d6e0c8a", + "sha256:17f94d72dcb235e75fdabb5e8d5e447e8f206ab5fe46ae1aacb82c6584bbd5a9", + "sha256:1dce7cfe4abf11b348d82d72a2020860055340cd35462b8019792f09cbde020b", + "sha256:1e0c605c2f38983c82cb7a4ae80cb392335f5e32b9f9e7a42d41fd1ec8790201", + "sha256:1f3749a40d4417ab1a012219ebc88fd1c9644c8aa24a70b453bc20e46e18d7af", + "sha256:2f3d03af970c5e66a1eb6e3edffb893978f65316a7d7a195abae5b843ff21c41", + "sha256:3015f3127ae65e7951ff93864a2edadd53e3971813418f4f81e066e1ad608527", + "sha256:36cc68b42f1f0bf4e95f5de03af028afb03c2c110513a9551d1b1ea0f018e574", + "sha256:3e28cf11395c5b9ad3baef8f5fb8a5f4bdc6367366167cc41b944347d7b484af", + "sha256:3fd5e452dedef2ede82aa8bcdf0bce0467d6f3de092077b335ba8d724d94450f", + "sha256:40a59efdaa88679239dfb7e199540967352e1122c15ef34c791984fd732f8128", + "sha256:42a5f5f4fc2e08284a90aced31384ffddfbda25370bd5cda876ffe3aa2ce67e2", + "sha256:4e39f4c7550c8aa698963a3840f6f26c55b2596be0f539694d1cb31baf89169d", + "sha256:4f08b4a27b2e3f03e10f88fe304c8882f87f841190bde20f1b7ae6bdc1b1606d", + "sha256:52a67a02f65c1e90379481f0b4e68dea3736becb9ede94f25e9023258211e21c", + "sha256:53648ff27598402eb966771bf0c1b50738f26b7678d6aae45107ccf30644b0cd", + "sha256:563604dc3b91ee14ecdce9efdd07024b0f3452d629a9f4cbb063863dacbc1915", + "sha256:5a69abfb4a3488ffbb49a4f65ffa3230aa9b0e2664daf2814faa144cd531c681", + "sha256:5b9a004732d7a153f7cfc30ea30d2bbd653f42be1ce5995b848d02fcbed9add2", + "sha256:5d349c8dbdf7f6f41540f3443df37e6b9fff474f6c056ff9f1a3dc9796ddb6e4", + "sha256:60403f87cf1ad7cc2b3231b15160c3fb751240ebf8df67299ab80569a15da040", + "sha256:6079970c2f260ba4040bee9664665aca5d3f2927ac416342b77bb19bebce1ef8", + "sha256:642ff3f767766e14bd8273814351291967c3ce084abf50ece0d69d5dbb53ddab", + "sha256:6c569ebc7ec97c3c0e2fedcf4b921710a2c7772b66a3ba3edb1e999ddb54d5ee", + "sha256:705d8439bf845e11f477462eb092b1e0dcd9219fa3a07d03893745a6e8f894a2", + "sha256:75d00e82d4917417104d88c275dbde0291bea753e763642c8a6301303e8a8491", + "sha256:785100c6c5a87b57c247b17f2fb1130022c423079a9d666fee44fc25d43fd9bf", + "sha256:7d1025eb05dea39fc28f1df69669122900e226d60b1d50cd6a34293a1e769a19", + "sha256:8095585d673d40100046730253ac8de5a48b06754fccb3b8ec00a0e2b1b8a813", + "sha256:834de30faba6b5384b9206cfea008bf0e02910749cbbd9bfae3aed3ebdc94603", + "sha256:88383d06a5d8edd2bfefca2576a7a84da1553e305b16d5778bedc5bdf8235759", + "sha256:89913535b1854b354d703516ac09a82da16a1c06074b9302c1f371e8ed89c837", + "sha256:8a71465d22a8d06b2ddb91f40680e27a85c08b37f87f1a8b51da9fa84e30f8c8", + "sha256:8e81efb5ee607460db350212039d709833e8e39d04a75f2b141c305531aa60b9", + "sha256:8f1ddd33f835de28ec550606e4f1682f37c8a896e52c6c52a53fdd192c9db9ec", + "sha256:91bc9de6a0527dc8e5834371a60aabfa13e1b7a06006848f90aa710ec84d1c78", + "sha256:969cd903837a6fbc107585fb5b099cb6dc22b3e75ffd8a9f00bd2e1e0454832b", + "sha256:983c1d49d0ef1c91e0ade07db210986334aaba5a1ce9373dfcb0d6077f7b1a26", + "sha256:9a7a42a48281fdc0ac073d80319597dd097d096b8490fac084085c8aa349fc98", + "sha256:9d47a099b0db8001991010a482911e86448b877406eb8834492282b300ea034d", + "sha256:9f9b078bbd1b018e9e358efdd452bdfdb9a419474fbe5d069fabe677d2993b41", + "sha256:a1f4bdf92326e0ac1150783401660ffd0bf522503eefbdf9ac95555aac41f0a2", + "sha256:a7f35ff6cc7d9cbc33cb6e7784f958998782fe41aff6f75761c44756ff3ef072", + "sha256:aa7718c9d78a8d6ffcadb247bbcac7d397576786823371a0473fdf6feb94d0a7", + "sha256:ab726880e9e3ddfb6ae2b7dbef551f39716d50728f4a0c89ff9d84d0cee18388", + "sha256:ac9a2e4a208a84467e311a1f86ac6dcfe8ff1215099f5886ce07134e32844a11", + "sha256:ae2b6d20110d5fcc9439e2e6da5da3306a8a5789ea90921406ae3fea7e6d555e", + "sha256:b5027e588663b7baab6be5b4c41e6303a0844167ed619da488cdf248f8316b74", + "sha256:b7d1ad4d57d76d0a48d708e51160306056ecf8312cdab4727bae19e99a98e103", + "sha256:b9bcf7d37d55904df6cabd96ac63c1daf383211d20d1325bab50d53554c83184", + "sha256:bb6c7542ef8668a5ec4d25fdf9b028acedae6aaabb89afbc2664751922c714d6", + "sha256:bc9f09c8e6ed23453d7a5adde29fea83d4464182e98bd83b11747f1796e9e0d4", + "sha256:bda084bc748b3b0778cff7600dbb82daf6c45f1d29cab18e0ac6be19f300cfd0", + "sha256:c608c02bae0e108ae1f0c52520b77ed2d1f8ea7c0927620ca5527982413d292e", + "sha256:cc6d5c107467408e1600a6482ec22d922aad30826f5789e188bda8957c4d4922", + "sha256:cce350b72222b8624b5bc822f7d20901942122fdf8ea727967a14afb1fba6e55", + "sha256:ccf97d97659181352dc96dc3b145a390bd63f3641baab493cbb9281312715d37", + "sha256:d05ee5a2ce0aef536471f470194136b211b0027024bd18a6ac58cd23aa2806a5", + "sha256:db2478efd4fe2445cc545080e07c5a169c3ca8455db42695ce8b3dff3d571e83", + "sha256:dd2e61db3d0c7e172a6f0ab010740f8ace86aa695f5b80a7d185cf84c501d5d8", + "sha256:de67ac6952a73a9474a7c0fcc03be221958c45de638b990d02ea9b68e9829492", + "sha256:de69fb25f6718a8fb3648899981c48fbda7d9317a9f367e2bd19fa78482df8c0", + "sha256:e2856f7039a6f7815013768d82de119c2da4b8b6502ef1d94fcc664d329c928e", + "sha256:e45e7347ab2e7752c716d43df5459569385d96fcec00e4d21159041e8150dec3", + "sha256:e5f3ad194c53bc2a38c92bb25844dc3dd0a3e45147796f3397bd4416370266cf", + "sha256:e6b852f20dfd9c5a64a871e012fc0a6532580a606214e1354dec59ec79a4ec9e", + "sha256:e805567a747807cdf160d4a1adedc102374424ed18f0cf7d2c33a6bae4e655ca", + "sha256:eb449596ff89245df4ac6e993690a57290afcdb6be3f545cd31cd1e5be33306a", + "sha256:ecd4aa9f2c4e6eddfdc4392d7021428e436ffcbbde054e08d3d6b92e48235eaa", + "sha256:f093fa3630212744810b32895720af899209820cb76be4146fb099c20c9cf624", + "sha256:f4e04f6c53fc5cb635358bad318d021fcfe07bc92b2f30ddf6b16c5ccecc761d", + "sha256:f98cdd14b6c0bd24e555188b00399b2c6eebbfa97a1744ad83afbeb0559302a5", + "sha256:fe037bd9acc5a52843ee95d6a9a69f92d51fdc09c882e54f052223fa52e4b5b7" ], "index": "pypi", - "version": "==0.23.1" + "version": "==0.30.0" }, "python-dateutil": { "hashes": [ "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.2" }, "requests": { "hashes": [ - "sha256:64299f4909223da747622c030b781c0d7811e359c37124b4bd368fb8c6518baa", - "sha256:98b1b2782e3c6c4904938b84c0eb932721069dfdb9134313beff7c83c2df24bf" + "sha256:10e94cc4f3121ee6da529d358cdaeaff2f1c409cd377dbc72b825852f2f7e294", + "sha256:239d7d4458afcb28a692cdd298d87542235f4ca8d36d03a15bfc128a6559a2f4" ], - "markers": "python_version >= '3.7' and python_version < '4'", - "version": "==2.28.2" + "markers": "python_version >= '3.7'", + "version": "==2.30.0" }, "rsa": { "hashes": [ @@ -629,26 +637,26 @@ }, "s3transfer": { "hashes": [ - "sha256:06176b74f3a15f61f1b4f25a1fc29a4429040b7647133a463da8fa5bd28d5ecd", - "sha256:2ed07d3866f523cc561bf4a00fc5535827981b117dd7876f036b0c1aca42c947" + "sha256:3c0da2d074bf35d6870ef157158641178a4204a6e689e82546083e31e0311346", + "sha256:640bb492711f4c0c0905e1f62b6aaeb771881935ad27884852411f8e9cacbca9" ], "markers": "python_version >= '3.7'", - "version": "==0.6.0" + "version": "==0.6.1" }, "setuptools": { "hashes": [ - "sha256:257de92a9d50a60b8e22abfcbb771571fde0dbf3ec234463212027a4eeecbe9a", - "sha256:e728ca814a823bf7bf60162daf9db95b93d532948c4c0bea762ce62f60189078" + "sha256:23aaf86b85ca52ceb801d32703f12d77517b2556af839621c641fca11287952b", + "sha256:f104fa03692a2602fa0fec6c6a9e63b6c8a968de13e17c026957dd1f53d80990" ], "markers": "python_version >= '3.7'", - "version": "==67.6.1" + "version": "==67.7.2" }, "six": { "hashes": [ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.16.0" }, "structlog": { @@ -677,11 +685,11 @@ }, "werkzeug": { "hashes": [ - "sha256:2e1ccc9417d4da358b9de6f174e3ac094391ea1d4fbef2d667865d819dfd0afe", - "sha256:56433961bc1f12533306c624f3be5e744389ac61d722175d543e1751285da612" + "sha256:4866679a0722de00796a74086238bb3b98d90f423f05de039abb09315487254a", + "sha256:a987caf1092edc7523edb139edb20c70571c4a8d5eed02e0b547b4739174d091" ], - "markers": "python_version >= '3.7'", - "version": "==2.2.3" + "markers": "python_version >= '3.8'", + "version": "==2.3.3" }, "zipp": { "hashes": [ @@ -750,43 +758,51 @@ }, "cdktf": { "hashes": [ - "sha256:26799fc86c0d43d3178493dd155adc58dfa9d391db7b27d1209ba27496cba615", - "sha256:a6b0819a4c276e152997d5d8624488331706e483a7fc348f9ffcbe471912dc44" + "sha256:40bb6ace7d12826e33af6460cd6d5b2c5acc23143aee4843aef7ad6aa3689ae8", + "sha256:ffe2e5b45a90a0b6eb42c071b6ce36963e22e5ef8aecf4d949045efd1dcdbaa5" ], "index": "pypi", - "version": "==0.15.5" + "version": "==0.16.1" }, "cdktf-cdktf-provider-archive": { "hashes": [ - "sha256:4176a117c337f7bdc4e9308383179c3229cba00c44ad72e80f215e1facee79e5", - "sha256:abe5f70c6a0daca72fe982204637cedd2a539cfea43ae8b1868617e55724bd01" + "sha256:1e571495a0477c35441cfd5e3ca173410c807c09759da63e1bee2a8bf3708d7f", + "sha256:edde353985803309844e1fc336c6eb69fe5f089173430c46cd4b41a4fb412759" ], "index": "pypi", - "version": "==5.0.1" + "version": "==6.0.0" }, "cdktf-cdktf-provider-aws": { "hashes": [ - "sha256:18d281c25a2f4afa6cc6ee4398cf79e6b3cff690d102639cd46bc8072a617f1d", - "sha256:f4e9619b709653a1db777657799961be34b263d8f9eae1350a849a1df3f0fc09" + "sha256:02d9cdc5a5305ff4c5088c031d20624bcb4c8538862cf1efe09abca339d8f5d2", + "sha256:68ab3b2622551a6276b3e3150f2903efba645bbb3c5c71cd4968c54aef2bd8ac" ], "index": "pypi", - "version": "==13.0.0" + "version": "==14.0.4" + }, + "cdktf-cdktf-provider-azurerm": { + "hashes": [ + "sha256:988946ce865ba2570016d73b01f3661ce776d8ce40e3b8137bceb40d5e250ce4", + "sha256:d70040efed82591daf5300035b6b1260e85c5cf1a74a02bc90000788926090e8" + ], + "index": "pypi", + "version": "==7.0.3" }, "cdktf-cdktf-provider-external": { "hashes": [ - "sha256:c19472019e059458d1679a88f14c4d68a6df8da55ba58da881b5863eca85b535", - "sha256:ff34024c43d7ab74a26e747bb288481074e2ea64734eff2ee2c5905bb5932759" + "sha256:6909af15003a5c8a9964589999380f839d0f01164569a8ba24c9ba206a25f664", + "sha256:fcbeadc9eaff7632dcd0bac5bfa54c210000482547408ec88fc5f54e75e5128f" ], "index": "pypi", - "version": "==5.0.1" + "version": "==6.0.0" }, "cdktf-cdktf-provider-google": { "hashes": [ - "sha256:651157e5fa4db3eccde86392dbb668c085c6e5957982438ce9825bf2c0725ae5", - "sha256:e824c0cd99ea7ed57889ed53ab28fa70da12a59bac323ce14a82f16f31d10178" + "sha256:12d6063eeb28db74287ceea6b5e3702dbf4cd3ce559ece6bda15276852815e88", + "sha256:5e241059e61b51dc04f943346133ab5a1e4dc1750f9a73d69d9e5fb782ed0852" ], "index": "pypi", - "version": "==6.0.0" + "version": "==7.0.3" }, "click": { "hashes": [ @@ -806,71 +822,71 @@ }, "constructs": { "hashes": [ - "sha256:36e86d1092edd1f2ee8895d21c49bdabf81e62deb5f18329b275ee8ec1f67aa3", - "sha256:398d32c65d2945949195dcc642bc7bd7b7552758d274fa0e1616ca0069d01a25" + "sha256:36394ebeb802c5484629506b1ff313f7fde4ab62cd4acd2af06e98d0ed925b11", + "sha256:a7993e0c6f83d9c31cf849a629f8cab68682ca5cf2a4a17cb01484fdb6b425c2" ], "index": "pypi", - "version": "==10.2.1" + "version": "==10.2.17" }, "coverage": { "extras": [ "toml" ], "hashes": [ - "sha256:06ddd9c0249a0546997fdda5a30fbcb40f23926df0a874a60a8a185bc3a87d93", - "sha256:0743b0035d4b0e32bc1df5de70fba3059662ace5b9a2a86a9f894cfe66569013", - "sha256:0f3736a5d34e091b0a611964c6262fd68ca4363df56185902528f0b75dbb9c1f", - "sha256:1127b16220f7bfb3f1049ed4a62d26d81970a723544e8252db0efde853268e21", - "sha256:172db976ae6327ed4728e2507daf8a4de73c7cc89796483e0a9198fd2e47b462", - "sha256:182eb9ac3f2b4874a1f41b78b87db20b66da6b9cdc32737fbbf4fea0c35b23fc", - "sha256:1bb1e77a9a311346294621be905ea8a2c30d3ad371fc15bb72e98bfcfae532df", - "sha256:1fd78b911aea9cec3b7e1e2622c8018d51c0d2bbcf8faaf53c2497eb114911c1", - "sha256:20d1a2a76bb4eb00e4d36b9699f9b7aba93271c9c29220ad4c6a9581a0320235", - "sha256:21b154aba06df42e4b96fc915512ab39595105f6c483991287021ed95776d934", - "sha256:2c2e58e45fe53fab81f85474e5d4d226eeab0f27b45aa062856c89389da2f0d9", - "sha256:2c3b2803e730dc2797a017335827e9da6da0e84c745ce0f552e66400abdfb9a1", - "sha256:3146b8e16fa60427e03884301bf8209221f5761ac754ee6b267642a2fd354c48", - "sha256:344e714bd0fe921fc72d97404ebbdbf9127bac0ca1ff66d7b79efc143cf7c0c4", - "sha256:387065e420aed3c71b61af7e82c7b6bc1c592f7e3c7a66e9f78dd178699da4fe", - "sha256:3f04becd4fcda03c0160d0da9c8f0c246bc78f2f7af0feea1ec0930e7c93fa4a", - "sha256:4a42e1eff0ca9a7cb7dc9ecda41dfc7cbc17cb1d02117214be0561bd1134772b", - "sha256:4ea748802cc0de4de92ef8244dd84ffd793bd2e7be784cd8394d557a3c751e21", - "sha256:55416d7385774285b6e2a5feca0af9652f7f444a4fa3d29d8ab052fafef9d00d", - "sha256:5d0391fb4cfc171ce40437f67eb050a340fdbd0f9f49d6353a387f1b7f9dd4fa", - "sha256:63cdeaac4ae85a179a8d6bc09b77b564c096250d759eed343a89d91bce8b6367", - "sha256:72fcae5bcac3333a4cf3b8f34eec99cea1187acd55af723bcbd559adfdcb5535", - "sha256:7c4ed4e9f3b123aa403ab424430b426a1992e6f4c8fd3cb56ea520446e04d152", - "sha256:83957d349838a636e768251c7e9979e899a569794b44c3728eaebd11d848e58e", - "sha256:87ecc7c9a1a9f912e306997ffee020297ccb5ea388421fe62a2a02747e4d5539", - "sha256:8f69770f5ca1994cb32c38965e95f57504d3aea96b6c024624fdd5bb1aa494a1", - "sha256:8f6c930fd70d91ddee53194e93029e3ef2aabe26725aa3c2753df057e296b925", - "sha256:965ee3e782c7892befc25575fa171b521d33798132692df428a09efacaffe8d0", - "sha256:974bc90d6f6c1e59ceb1516ab00cf1cdfbb2e555795d49fa9571d611f449bcb2", - "sha256:981b4df72c93e3bc04478153df516d385317628bd9c10be699c93c26ddcca8ab", - "sha256:aa784405f0c640940595fa0f14064d8e84aff0b0f762fa18393e2760a2cf5841", - "sha256:ae7863a1d8db6a014b6f2ff9c1582ab1aad55a6d25bac19710a8df68921b6e30", - "sha256:aeae2aa38395b18106e552833f2a50c27ea0000122bde421c31d11ed7e6f9c91", - "sha256:b2317d5ed777bf5a033e83d4f1389fd4ef045763141d8f10eb09a7035cee774c", - "sha256:be19931a8dcbe6ab464f3339966856996b12a00f9fe53f346ab3be872d03e257", - "sha256:be9824c1c874b73b96288c6d3de793bf7f3a597770205068c6163ea1f326e8b9", - "sha256:c0045f8f23a5fb30b2eb3b8a83664d8dc4fb58faddf8155d7109166adb9f2040", - "sha256:c86bd45d1659b1ae3d0ba1909326b03598affbc9ed71520e0ff8c31a993ad911", - "sha256:ca0f34363e2634deffd390a0fef1aa99168ae9ed2af01af4a1f5865e362f8623", - "sha256:d298c2815fa4891edd9abe5ad6e6cb4207104c7dd9fd13aea3fdebf6f9b91259", - "sha256:d2a3a6146fe9319926e1d477842ca2a63fe99af5ae690b1f5c11e6af074a6b5c", - "sha256:dfd393094cd82ceb9b40df4c77976015a314b267d498268a076e940fe7be6b79", - "sha256:e58c0d41d336569d63d1b113bd573db8363bc4146f39444125b7f8060e4e04f5", - "sha256:ea3f5bc91d7d457da7d48c7a732beaf79d0c8131df3ab278e6bba6297e23c6c4", - "sha256:ea53151d87c52e98133eb8ac78f1206498c015849662ca8dc246255265d9c3c4", - "sha256:eb0edc3ce9760d2f21637766c3aa04822030e7451981ce569a1b3456b7053f22", - "sha256:f649dd53833b495c3ebd04d6eec58479454a1784987af8afb77540d6c1767abd", - "sha256:f760073fcf8f3d6933178d67754f4f2d4e924e321f4bb0dcef0424ca0215eba1", - "sha256:fa546d66639d69aa967bf08156eb8c9d0cd6f6de84be9e8c9819f52ad499c910", - "sha256:fd214917cabdd6f673a29d708574e9fbdb892cb77eb426d0eae3490d95ca7859", - "sha256:fff5aaa6becf2c6a1699ae6a39e2e6fb0672c2d42eca8eb0cafa91cf2e9bd312" + "sha256:0342a28617e63ad15d96dca0f7ae9479a37b7d8a295f749c14f3436ea59fdcb3", + "sha256:066b44897c493e0dcbc9e6a6d9f8bbb6607ef82367cf6810d387c09f0cd4fe9a", + "sha256:10b15394c13544fce02382360cab54e51a9e0fd1bd61ae9ce012c0d1e103c813", + "sha256:12580845917b1e59f8a1c2ffa6af6d0908cb39220f3019e36c110c943dc875b0", + "sha256:156192e5fd3dbbcb11cd777cc469cf010a294f4c736a2b2c891c77618cb1379a", + "sha256:1637253b11a18f453e34013c665d8bf15904c9e3c44fbda34c643fbdc9d452cd", + "sha256:292300f76440651529b8ceec283a9370532f4ecba9ad67d120617021bb5ef139", + "sha256:30dcaf05adfa69c2a7b9f7dfd9f60bc8e36b282d7ed25c308ef9e114de7fc23b", + "sha256:338aa9d9883aaaad53695cb14ccdeb36d4060485bb9388446330bef9c361c252", + "sha256:373ea34dca98f2fdb3e5cb33d83b6d801007a8074f992b80311fc589d3e6b790", + "sha256:38c0a497a000d50491055805313ed83ddba069353d102ece8aef5d11b5faf045", + "sha256:40cc0f91c6cde033da493227797be2826cbf8f388eaa36a0271a97a332bfd7ce", + "sha256:4436cc9ba5414c2c998eaedee5343f49c02ca93b21769c5fdfa4f9d799e84200", + "sha256:509ecd8334c380000d259dc66feb191dd0a93b21f2453faa75f7f9cdcefc0718", + "sha256:5c587f52c81211d4530fa6857884d37f514bcf9453bdeee0ff93eaaf906a5c1b", + "sha256:5f3671662dc4b422b15776cdca89c041a6349b4864a43aa2350b6b0b03bbcc7f", + "sha256:6599bf92f33ab041e36e06d25890afbdf12078aacfe1f1d08c713906e49a3fe5", + "sha256:6e8a95f243d01ba572341c52f89f3acb98a3b6d1d5d830efba86033dd3687ade", + "sha256:706ec567267c96717ab9363904d846ec009a48d5f832140b6ad08aad3791b1f5", + "sha256:780551e47d62095e088f251f5db428473c26db7829884323e56d9c0c3118791a", + "sha256:7ff8f3fb38233035028dbc93715551d81eadc110199e14bbbfa01c5c4a43f8d8", + "sha256:828189fcdda99aae0d6bf718ea766b2e715eabc1868670a0a07bf8404bf58c33", + "sha256:857abe2fa6a4973f8663e039ead8d22215d31db613ace76e4a98f52ec919068e", + "sha256:883123d0bbe1c136f76b56276074b0c79b5817dd4238097ffa64ac67257f4b6c", + "sha256:8877d9b437b35a85c18e3c6499b23674684bf690f5d96c1006a1ef61f9fdf0f3", + "sha256:8e575a59315a91ccd00c7757127f6b2488c2f914096077c745c2f1ba5b8c0969", + "sha256:97072cc90f1009386c8a5b7de9d4fc1a9f91ba5ef2146c55c1f005e7b5c5e068", + "sha256:9a22cbb5ede6fade0482111fa7f01115ff04039795d7092ed0db43522431b4f2", + "sha256:a063aad9f7b4c9f9da7b2550eae0a582ffc7623dca1c925e50c3fbde7a579771", + "sha256:a08c7401d0b24e8c2982f4e307124b671c6736d40d1c39e09d7a8687bddf83ed", + "sha256:a0b273fe6dc655b110e8dc89b8ec7f1a778d78c9fd9b4bda7c384c8906072212", + "sha256:a2b3b05e22a77bb0ae1a3125126a4e08535961c946b62f30985535ed40e26614", + "sha256:a66e055254a26c82aead7ff420d9fa8dc2da10c82679ea850d8feebf11074d88", + "sha256:aa387bd7489f3e1787ff82068b295bcaafbf6f79c3dad3cbc82ef88ce3f48ad3", + "sha256:ae453f655640157d76209f42c62c64c4d4f2c7f97256d3567e3b439bd5c9b06c", + "sha256:b5016e331b75310610c2cf955d9f58a9749943ed5f7b8cfc0bb89c6134ab0a84", + "sha256:b9a4ee55174b04f6af539218f9f8083140f61a46eabcaa4234f3c2a452c4ed11", + "sha256:bd3b4b8175c1db502adf209d06136c000df4d245105c8839e9d0be71c94aefe1", + "sha256:bebea5f5ed41f618797ce3ffb4606c64a5de92e9c3f26d26c2e0aae292f015c1", + "sha256:c10fbc8a64aa0f3ed136b0b086b6b577bc64d67d5581acd7cc129af52654384e", + "sha256:c2c41c1b1866b670573657d584de413df701f482574bad7e28214a2362cb1fd1", + "sha256:cf97ed82ca986e5c637ea286ba2793c85325b30f869bf64d3009ccc1a31ae3fd", + "sha256:d1f25ee9de21a39b3a8516f2c5feb8de248f17da7eead089c2e04aa097936b47", + "sha256:d2fbc2a127e857d2f8898aaabcc34c37771bf78a4d5e17d3e1f5c30cd0cbc62a", + "sha256:dc945064a8783b86fcce9a0a705abd7db2117d95e340df8a4333f00be5efb64c", + "sha256:ddc5a54edb653e9e215f75de377354e2455376f416c4378e1d43b08ec50acc31", + "sha256:e8834e5f17d89e05697c3c043d3e58a8b19682bf365048837383abfe39adaed5", + "sha256:ef9659d1cda9ce9ac9585c045aaa1e59223b143f2407db0eaee0b61a4f266fb6", + "sha256:f6f5cab2d7f0c12f8187a376cc6582c477d2df91d63f75341307fcdcb5d60303", + "sha256:f81c9b4bd8aa747d417407a7f6f0b1469a43b36a85748145e144ac4e8d303cb5", + "sha256:f99ef080288f09ffc687423b8d60978cf3a465d3f404a18d1a05474bd8575a47" ], "markers": "python_version >= '3.7'", - "version": "==7.2.3" + "version": "==7.2.5" }, "diagrams": { "hashes": [ @@ -1057,7 +1073,7 @@ "sha256:20b43c660e48ed47f433bce5873a2a3d4b9b6a7ba47bd7f7d2a7cec4bec5551f", "sha256:c148e88436bd54dab16484108e882be3367f44952c649c9cd6b82a7370b650cb" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.6.0" }, "pathspec": { @@ -1070,11 +1086,11 @@ }, "platformdirs": { "hashes": [ - "sha256:d5b638ca397f25f979350ff789db335903d7ea010ab28903f57b27e1b16c2b08", - "sha256:ebe11c0d7a805086e99506aa331612429a72ca7cd52a1f0d277dc4adc20cb10e" + "sha256:47692bc24c1958e8b0f13dd727307cff1db103fca36399f457da8e05f222fdc4", + "sha256:7954a68d0ba23558d753f73437c55f89027cf8f5108c19844d4b82e5af396335" ], "markers": "python_version >= '3.7'", - "version": "==3.2.0" + "version": "==3.5.0" }, "pluggy": { "hashes": [ @@ -1127,7 +1143,7 @@ "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.2" }, "scantree": { @@ -1141,7 +1157,7 @@ "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.16.0" }, "tomli": { From f426a48337e093499366fd94cbfad1a66a860f49 Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Tue, 9 May 2023 08:50:19 +1000 Subject: [PATCH 08/12] Azure resource definitions Creates following resources: - Resource group - Storage account - Storage container - SQL server - SQL database - Service plan - Function app - Eventgrid topic --- Makefile | 12 +- .../azure/grafana_dashboard_component.py | 28 ---- infrastructure/azure/main.py | 150 +++++++++++++++--- 3 files changed, 136 insertions(+), 54 deletions(-) delete mode 100644 infrastructure/azure/grafana_dashboard_component.py diff --git a/Makefile b/Makefile index 9b86453..f41d494 100644 --- a/Makefile +++ b/Makefile @@ -177,14 +177,14 @@ gcp-destroy-all: cd infrastructure/gcp;cdktf destroy gcp_base gcp_core gcp_grafana # Azure +azure-build-dependencies: + @echo "\n\n---AZURE-BUILD-DEPENDENCIES---\n" + cd infrastructure/azure;cdktf provider add grafana/grafana + azure-synth: azure-build-dependencies @echo "\n\n---AZURE-SYNTH---\n" cd infrastructure/azure;cdktf synth -azure-build-dependencies: - @echo "\n\n---AZURE-BUILD-DEPENDENCIES---\n" - cd infrastructure/azure; cdktf provider add grafana/grafana - azure-plan-core: @echo "\n\n---AZURE-PLAN-CORE---\n" cd infrastructure/azure;cdktf plan azure_core @@ -193,8 +193,6 @@ azure-plan-grafana: @echo "\n\n---AZURE-PLAN-GRAFANA---\n" cd infrastructure/azure;cdktf plan azure_grafana_dashboard -azure-plan-all: azure-build-dependencies azure-plan-core azure-plan-grafana azure-plan-convert - azure-plan-convert: @echo "\n\n---Converting AZURE plans file to json---\n" cd infrastructure/azure/cdktf.out/stacks; \ @@ -204,6 +202,8 @@ azure-plan-convert: cd -; \ done +azure-plan-all: azure-build-dependencies azure-plan-core azure-plan-grafana azure-plan-convert + azure-deploy-core: @echo "\n\n---AZURE-DEPLOY-CORE---\n" cd infrastructure/azure;cdktf deploy azure_core ${INFRA_ARGS} diff --git a/infrastructure/azure/grafana_dashboard_component.py b/infrastructure/azure/grafana_dashboard_component.py deleted file mode 100644 index dc7acbd..0000000 --- a/infrastructure/azure/grafana_dashboard_component.py +++ /dev/null @@ -1,28 +0,0 @@ -# Import the necessary modules -from constructs import Construct -import json - -from imports.grafana.folder import Folder -from imports.grafana.dashboard import Dashboard - -with open("dashboard.json", "r") as config: - data = json.load(config) - -data = json.dumps(data) - -class GrafanaDashboardComponent(Construct): - def __init__( - self, - scope: Construct, - id: str, - ): - super().__init__(scope, id) - - self.folder = Folder(self, "folder", title="Azure Flight Controller") - self.dashboard = Dashboard( - self, - "azure-dashboard", - config_json=data, - overwrite=True, - folder=self.folder.id, - ) diff --git a/infrastructure/azure/main.py b/infrastructure/azure/main.py index 7a9e9df..60b1e03 100644 --- a/infrastructure/azure/main.py +++ b/infrastructure/azure/main.py @@ -1,15 +1,23 @@ #!/usr/bin/env python +import json from constructs import Construct -from cdktf import App, TerraformStack, TerraformOutput +from cdktf import App, TerraformStack from cdktf_cdktf_provider_azurerm.provider import AzurermProvider from imports.grafana.provider import GrafanaProvider -from grafana_dashboard_component import GrafanaDashboardComponent +from imports.grafana.folder import Folder +from imports.grafana.dashboard import Dashboard from cdktf_cdktf_provider_azurerm import ( - resource_group + resource_group, + storage_account, + storage_container, + mssql_server, + mssql_database, + service_plan, + linux_function_app, + eventgrid_topic ) - class AzureCore(TerraformStack): def __init__( self, @@ -18,26 +26,113 @@ def __init__( ): super().__init__(scope, id) - self.location = "australiasoutheast" - self.resource_group_name = "flight_controller" - self.function_name = "azfcdev" - self.azure_sql = "azfcdevdb" - self.grafana_workspace_name = "grafana_dashboard" - AzurermProvider( self, "Azure", features = {} ) + + az_prefix = "apacfc" + az_env = "dev" + az_location = "australiaeast" + + az_storage_account = { + "tier": "Standard", + "replication": "LRS", + "public": False, + "public_nested": False, + "https_only": True + } + az_sql_server = { + "version": "12.0", + "administrator_login": "4dm1n157r470r", + "administrator_login_password": "4-v3ry-53cr37-p455w0rd" + } + az_sql_db = { + "sku_name": "GP_Gen5_2", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "create_mode": "Default" + } + az_svc_plan = { + "os_type": "Linux", + "sku_name": "Y1" + } resourceGroup = resource_group.ResourceGroup( self, "rg", - name = self.resource_group_name, - location = self.location, + name = f"{az_prefix}{az_env}rg", + location = az_location + ) + + storageAccount = storage_account.StorageAccount( + self, + "sa", + location = az_location, + resource_group_name = resourceGroup.name, + name = f"{az_prefix}{az_env}sa", + account_tier = az_storage_account['tier'], + account_replication_type = az_storage_account['replication'] + ) + + storageContainer = storage_container.StorageContainer( + self, + "sc", + name = f"{az_prefix}{az_env}sc", + storage_account_name = storageAccount.name + ) + + sqlServer = mssql_server.MssqlServer( + self, + "sql", + location = az_location, + resource_group_name = resourceGroup.name, + name = f"{az_prefix}{az_env}sql", + version = az_sql_server["version"], + administrator_login = az_sql_server["administrator_login"], + administrator_login_password = az_sql_server["administrator_login_password"] + ) + + sqlDatabase = mssql_database.MssqlDatabase( + self, + "db", + server_id = sqlServer.id, + name = f"{az_prefix}{az_env}db", + sku_name = az_sql_db["sku_name"], + collation = az_sql_db["collation"], + create_mode = az_sql_db["create_mode"], + ) + + servicePlan = service_plan.ServicePlan( + self, + "asp", + location = az_location, + resource_group_name = resourceGroup.name, + name = f"{az_prefix}{az_env}asp", + sku_name = az_svc_plan["sku_name"], + os_type = az_svc_plan["os_type"] + ) + + appFnc = linux_function_app.LinuxFunctionApp( + self, + "fnc", + location = az_location, + resource_group_name = resourceGroup.name, + service_plan_id = servicePlan.id, + storage_account_name = storageAccount.name, + storage_account_access_key = storageAccount.primary_access_key, + name = f"{az_prefix}{az_env}fnc", + site_config = { }, + identity = { "type": "SystemAssigned" } + ) + + eventgridtopic = eventgrid_topic.EventgridTopic( + self, + "egt", + location = az_location, + resource_group_name = resourceGroup.name, + name = f"{az_prefix}{az_env}egt" ) - - # self.grafana_workspace_id = grafanaWorkspace.grafana_workspace.id class AzureGrafana(TerraformStack): def __init__(self, scope: Construct, id: str, workspace_id: str): @@ -49,18 +144,33 @@ def __init__(self, scope: Construct, id: str, workspace_id: str): features = {} ) + self.grafana = { + 'auth': 'supersecretkeygoeshere', + 'url': 'https://apacfcdevgrafana.azurewebsites.net' + } + GrafanaProvider( self, "Grafana", - auth=api_key.secret_string, - url="https://" - + workspace_id - + ".azurewebsites.net", + auth = self.grafana['auth'], + url = self.grafana['url'] ) - GrafanaDashboardComponent( + with open("dashboard.json", "r") as config: + data = json.load(config) + + self.folder = Folder( + self, + "folder", + title = "Azure Flight Controller" + ) + + self.dashboard = Dashboard( self, - "grafana_dashboard" + "dashboard", + config_json = json.dumps(data), + overwrite = True, + folder = self.folder.id ) From 33711606508bacf0aae5b888c60a726d264c5e6b Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Tue, 9 May 2023 09:02:32 +1000 Subject: [PATCH 09/12] Documentation additions --- infrastructure/azure/README.md | 37 +++++++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 5 deletions(-) diff --git a/infrastructure/azure/README.md b/infrastructure/azure/README.md index d851e7e..83da52b 100644 --- a/infrastructure/azure/README.md +++ b/infrastructure/azure/README.md @@ -1,9 +1,36 @@ Azure implementation of the Flight Controller infrastructure and code deployment. +# Setup +``` +make local +make make clean && azure-synth && make azure-plan-core +make azure-deploy-core + +``` + +These targets will be changed to the following once Grafana is deployable: +``` +make local +make make clean && azure-synth && make azure-plan-all +make azure-deploy-all +``` + +# Resources + +Following Azure resources are deployed: +- Resource group +- Storage account +- Storage container +- SQL server +- SQL database +- Service plan +- Function app +- Eventgrid topic + # Tasks -- [ ] Configure root CDKTF dependencies -- [ ] Configure Azure provider -- [ ] Define Terraform resources for Flight Controller application and database infrastructure +- [x] Configure root CDKTF dependencies +- [x] Configure Azure provider (local) +- [x] Define Terraform resources for Flight Controller application and database infrastructure +- [x] Add `make` hooks to automate development environment configuration +- [ ] Add Azure-specific configuration abstractions for database and telemetry support - [ ] Grafana deployment -- [ ] Add `make` hooks to automate development environment configuration -- [ ] Add Azure-specific configuration abstractions for database and telemetry support \ No newline at end of file From 36f8b049fd0f471a064cb215613280895baceaf2 Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Tue, 9 May 2023 09:23:36 +1000 Subject: [PATCH 10/12] Documentation additions --- infrastructure/azure/README.md | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/infrastructure/azure/README.md b/infrastructure/azure/README.md index 83da52b..cf2fdf5 100644 --- a/infrastructure/azure/README.md +++ b/infrastructure/azure/README.md @@ -1,22 +1,29 @@ Azure implementation of the Flight Controller infrastructure and code deployment. # Setup +In a new terminal session, run the followign commands while in the repository root: ``` make local -make make clean && azure-synth && make azure-plan-core -make azure-deploy-core +make clean +az login +export JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=1 +``` +Run the following following commands to synthesise, plan, apply and destroy the Azure resources: +``` +make azure-synth && make azure-plan-core +make azure-deploy-core +make azure-destroy-core ``` -These targets will be changed to the following once Grafana is deployable: +The `plan` and `deploy` targets will be changed to the following once Grafana is deployable: ``` -make local -make make clean && azure-synth && make azure-plan-all +make azure-synth && make azure-plan-all make azure-deploy-all +make azure-destroy-all ``` # Resources - Following Azure resources are deployed: - Resource group - Storage account From b1a516a6a74ee3aca2c53d527667c31fccf1bcfc Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Tue, 9 May 2023 09:47:26 +1000 Subject: [PATCH 11/12] Updated dependencies --- Pipfile.lock | 56 +++++++++++++++------------------- infrastructure/azure/README.md | 6 ++-- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 0f9bdb0..b894ae6 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "9d26a10be911c888fb07abb980fd90875e448426682af5dd41f3ce5a214ed299" + "sha256": "f9b6f95f5436a9ec38412ada39ed514410aad01b994b171f130e6b2750a06c5f" }, "pipfile-spec": 6, "requires": { @@ -34,19 +34,19 @@ }, "boto3": { "hashes": [ - "sha256:0686a62f424c4f3375a706555b765d1e24d03d70e7d317ffcb2d411b39aa8139", - "sha256:1dab3fcbeada61a3b5a42ea25a89143511a5b22626775c685e31e313f327cf3c" + "sha256:3ae2b34921bb08a1d7ce52db9ec1a25159fca779648e596ede37e1049ed77de8", + "sha256:d6f9c6ebf417260ea5fa7a227e7bce9451f1f5010be05ac4075596356f584455" ], "index": "pypi", - "version": "==1.26.129" + "version": "==1.26.130" }, "botocore": { "hashes": [ - "sha256:80370e835ccf12e0429d4c6cc0e9d03cf47b72c41ec5916b01fb9544765f314d", - "sha256:f44460236324727615c518c229690c3cc3ea3162a55a2ac242ba771e8fa41553" + "sha256:3a31293b84ecfe5f5f2c4b7dc85a77d7b890b468a376b593fde15cacc76862dd", + "sha256:56d1f54c3f8e140f965e5300d1cc5b565cb758134d9213fb05e91e1bb160330e" ], "markers": "python_version >= '3.7'", - "version": "==1.29.129" + "version": "==1.29.130" }, "cachetools": { "hashes": [ @@ -483,22 +483,22 @@ }, "protobuf": { "hashes": [ - "sha256:08d2c1f175d46fd8ed92352142a6a5ea346ed0629cc7a54b07fc6c9a35b36122", - "sha256:0c3fc1ce8db15959f7c6720ee4c4a97d346a8997070bf39ea7f778f97dc75bb9", - "sha256:29eff144a2eecf70b8e6fee5e8c9b08ab4b0f2728af4e220434158481b72a640", - "sha256:37c1cbc545b4ffa94b2041ab42a6600d7713a87186a37d2e89d7c1f841dc0868", - "sha256:399dcefe0a7b5f813ed0c447a56a992ce72a2ebfb18d4f1e374244f31643af57", - "sha256:3e87feeaca23a48d4575f2593e71404ece84dc6208bf1a2d09e8f4e377470070", - "sha256:5c3c6fab20f8a8a1305c061a20853d75aeb211261cfba9cb677ad47a92c3320d", - "sha256:9b44ee9fe3683c5ffb8f7381f3b4504a3efdab66a95cb75bcfa557b887c70396", - "sha256:d03e708ec55d86dcbd69d94b5d2ff3685fe12f49ece94a804594d5b09311c33a", - "sha256:e435f6189fbeb619bc2aa64e5f61d12fe47f16ecf7c6c022e15bc55a961e1a79", - "sha256:e95fbf4712cd2452854b238c66768a2746effd84c10712b64a4bc10d3ee9f66e", - "sha256:f597e18215de58ad9a539e65f6b224e49f0d9917a0fb23412514faa1990cbdb9", - "sha256:f5cf854fa587909fb0f98601d952ddde85c2d938a99e9958bfad2d0e446c0ea7" + "sha256:03eee35b60317112a72d19c54d0bff7bc58ff12fea4cd7b018232bd99758ffdf", + "sha256:2b94bd6df92d71bd1234a2ffe7ce96ddf6d10cf637a18d6b55ad0a89fbb7fc21", + "sha256:36f5370a930cb77c8ad2f4135590c672d0d2c72d4a707c7d0058dce4b4b4a598", + "sha256:5f1eba1da2a2f3f7df469fccddef3cc060b8a16cfe3cc65961ad36b4dbcf59c5", + "sha256:6c16657d6717a0c62d5d740cb354fbad1b0d8cb811669e06fc1caa0ff4799ddd", + "sha256:6fe180b56e1169d72ecc4acbd39186339aed20af5384531b8e8979b02bbee159", + "sha256:7cb5b9a05ce52c6a782bb97de52679bd3438ff2b7460eff5da348db65650f227", + "sha256:9744e934ea5855d12191040ea198eaf704ac78665d365a89d9572e3b627c2688", + "sha256:9f5a0fbfcdcc364f3986f9ed9f8bb1328fb84114fd790423ff3d7fdb0f85c2d1", + "sha256:baca40d067dddd62141a129f244703160d278648b569e90bb0e3753067644711", + "sha256:d5a35ff54e3f62e8fc7be02bb0d2fbc212bba1a5a9cc2748090690093996f07b", + "sha256:e62fb869762b4ba18666370e2f8a18f17f8ab92dd4467295c6d38be6f8fef60b", + "sha256:ebde3a023b8e11bfa6c890ef34cd6a8b47d586f26135e86c21344fe433daf2e2" ], "markers": "python_version >= '3.7'", - "version": "==4.23.0rc3" + "version": "==4.23.0" }, "pyasn1": { "hashes": [ @@ -685,11 +685,11 @@ }, "werkzeug": { "hashes": [ - "sha256:4866679a0722de00796a74086238bb3b98d90f423f05de039abb09315487254a", - "sha256:a987caf1092edc7523edb139edb20c70571c4a8d5eed02e0b547b4739174d091" + "sha256:1d5a58e0377d1fe39d061a5de4469e414e78ccb1e1e59c0f5ad6fa1c36c52b76", + "sha256:48e5e61472fee0ddee27ebad085614ebedb7af41e88f687aaf881afb723a162f" ], "markers": "python_version >= '3.8'", - "version": "==2.3.3" + "version": "==2.3.4" }, "zipp": { "hashes": [ @@ -764,14 +764,6 @@ "index": "pypi", "version": "==0.16.1" }, - "cdktf-cdktf-provider-archive": { - "hashes": [ - "sha256:1e571495a0477c35441cfd5e3ca173410c807c09759da63e1bee2a8bf3708d7f", - "sha256:edde353985803309844e1fc336c6eb69fe5f089173430c46cd4b41a4fb412759" - ], - "index": "pypi", - "version": "==6.0.0" - }, "cdktf-cdktf-provider-aws": { "hashes": [ "sha256:02d9cdc5a5305ff4c5088c031d20624bcb4c8538862cf1efe09abca339d8f5d2", diff --git a/infrastructure/azure/README.md b/infrastructure/azure/README.md index cf2fdf5..34bde62 100644 --- a/infrastructure/azure/README.md +++ b/infrastructure/azure/README.md @@ -11,14 +11,16 @@ export JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION=1 Run the following following commands to synthesise, plan, apply and destroy the Azure resources: ``` -make azure-synth && make azure-plan-core +make azure-synth +make azure-plan-core make azure-deploy-core make azure-destroy-core ``` The `plan` and `deploy` targets will be changed to the following once Grafana is deployable: ``` -make azure-synth && make azure-plan-all +make azure-synth +make azure-plan-all make azure-deploy-all make azure-destroy-all ``` From d10f0940640633f605216f6ba6681aeadf6575b4 Mon Sep 17 00:00:00 2001 From: dstojanovski-contino Date: Mon, 22 May 2023 10:19:56 +1000 Subject: [PATCH 12/12] Azure infrastructure additions - Grafana deploymnent - Package additions - Azure CI/CD workflows - Changed config structure --- .github/workflows/azure_cicd.yaml | 65 ++++++++++++ .github/workflows/cicd.yaml | 5 + infrastructure/azure/README.md | 11 ++ infrastructure/azure/azurerm.json | 45 +++++++++ infrastructure/azure/main.py | 160 ++++++++++++++---------------- infrastructure/azure/package.json | 5 + 6 files changed, 206 insertions(+), 85 deletions(-) create mode 100644 .github/workflows/azure_cicd.yaml create mode 100644 infrastructure/azure/azurerm.json create mode 100644 infrastructure/azure/package.json diff --git a/.github/workflows/azure_cicd.yaml b/.github/workflows/azure_cicd.yaml new file mode 100644 index 0000000..287e867 --- /dev/null +++ b/.github/workflows/azure_cicd.yaml @@ -0,0 +1,65 @@ +name: azure-cicd +on: + workflow_dispatch: + workflow_call: +concurrency: + group: "Azure" + cancel-in-progress: true +jobs: + deploy: + name: Azure + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v2 + with: + terraform_wrapper: false + + - name: Azure Login + uses: azure/login@v1 + with: + creds: ${{ secrets.AZURE_CREDENTIALS }} + + - uses: actions/setup-python@v4 + with: + python-version: "3.9" + + - name: Install pipenv + run: pip install pipenv + + - name: Install node + uses: actions/setup-node@v3 + with: + node-version: 18 + - name: Install cdktf + run: npm install --global cdktf-cli@latest + + - name: Install pip packages + run: make install-dependencies + + - name: Perform unittest + run: make unittest + + - name: Plan terraform configuration + run: make azure-plan-all + + - name: Checkov + uses: bridgecrewio/checkov-action@master + with: + directory: infrastructure/azure/cdktf.out/stacks/ + framework: terraform_plan + + - name: Development deployment + run: make azure-deploy-all INFRA_ARGS=--auto-approve + + - name: Perform full test and check coverage + run: make test + + - name: Conduct e2e testing + run: make e2e diff --git a/.github/workflows/cicd.yaml b/.github/workflows/cicd.yaml index 52ed0ca..0558789 100644 --- a/.github/workflows/cicd.yaml +++ b/.github/workflows/cicd.yaml @@ -21,6 +21,11 @@ jobs: secrets: inherit needs: [pip-audit] + azure: + uses: ./.github/workflows/azure_cicd.yaml + secrets: inherit + needs: [pip-audit] + # slsa: # uses: ./.github/workflows/provenance.yaml # needs: [aws, gcp] \ No newline at end of file diff --git a/infrastructure/azure/README.md b/infrastructure/azure/README.md index 34bde62..f36deaf 100644 --- a/infrastructure/azure/README.md +++ b/infrastructure/azure/README.md @@ -1,6 +1,17 @@ Azure implementation of the Flight Controller infrastructure and code deployment. # Setup +Install the necessary tools: + +``` +brew update && brew upgrade +brew install terraform +brew install node +brew install python3 +pip install --user pipenv +``` + + In a new terminal session, run the followign commands while in the repository root: ``` make local diff --git a/infrastructure/azure/azurerm.json b/infrastructure/azure/azurerm.json new file mode 100644 index 0000000..2bc09c8 --- /dev/null +++ b/infrastructure/azure/azurerm.json @@ -0,0 +1,45 @@ +{ + "key": "apacfc", + "env": "dev", + "location": "australiaeast", + "resource_group": { + "key": "rg" + }, + "storage_account": { + "key": "stac", + "tier": "Standard", + "replication": "LRS", + "public": false, + "public_nested": false, + "https_only": true + }, + "storage_container": { + "key": "stco" + }, + "mssql_server": { + "key": "sqsv", + "version": "12.0", + "administrator_login": "4dm1n157r470r", + "administrator_login_password": "4-v3ry-53cr37-p455w0rd" + }, + "mssql_database": { + "key": "sqdb", + "sku_name": "GP_Gen5_2", + "collation": "SQL_Latin1_General_CP1_CI_AS", + "create_mode": "Default" + }, + "service_plan": { + "key": "svcp", + "os_type": "Linux", + "sku_name": "Y1" + }, + "linux_function_app": { + "key": "func" + }, + "eventgrid_topic": { + "key": "evgt" + }, + "dashboard_grafana": { + "key": "grad" + } +} \ No newline at end of file diff --git a/infrastructure/azure/main.py b/infrastructure/azure/main.py index 60b1e03..532843e 100644 --- a/infrastructure/azure/main.py +++ b/infrastructure/azure/main.py @@ -4,9 +4,6 @@ from constructs import Construct from cdktf import App, TerraformStack from cdktf_cdktf_provider_azurerm.provider import AzurermProvider -from imports.grafana.provider import GrafanaProvider -from imports.grafana.folder import Folder -from imports.grafana.dashboard import Dashboard from cdktf_cdktf_provider_azurerm import ( resource_group, storage_account, @@ -15,8 +12,11 @@ mssql_database, service_plan, linux_function_app, - eventgrid_topic + eventgrid_topic, + dashboard_grafana ) +from imports.grafana.provider import GrafanaProvider +from imports.grafana.folder import Folder class AzureCore(TerraformStack): def __init__( @@ -31,109 +31,98 @@ def __init__( "Azure", features = {} ) - - az_prefix = "apacfc" - az_env = "dev" - az_location = "australiaeast" - - az_storage_account = { - "tier": "Standard", - "replication": "LRS", - "public": False, - "public_nested": False, - "https_only": True - } - az_sql_server = { - "version": "12.0", - "administrator_login": "4dm1n157r470r", - "administrator_login_password": "4-v3ry-53cr37-p455w0rd" - } - az_sql_db = { - "sku_name": "GP_Gen5_2", - "collation": "SQL_Latin1_General_CP1_CI_AS", - "create_mode": "Default" - } - az_svc_plan = { - "os_type": "Linux", - "sku_name": "Y1" - } - resourceGroup = resource_group.ResourceGroup( + with open("azurerm.json", "r") as f: + az = json.load(f) + + self.rg = resource_group.ResourceGroup( self, - "rg", - name = f"{az_prefix}{az_env}rg", - location = az_location + az['resource_group']['key'], + name = f"{az['key']}{az['env']}{az['resource_group']['key']}", + location = az['location'] ) - storageAccount = storage_account.StorageAccount( + self.sa = storage_account.StorageAccount( self, - "sa", - location = az_location, - resource_group_name = resourceGroup.name, - name = f"{az_prefix}{az_env}sa", - account_tier = az_storage_account['tier'], - account_replication_type = az_storage_account['replication'] + az['storage_account']['key'], + location = az['location'], + name = f"{az['key']}{az['env']}{az['storage_account']['key']}", + account_tier = az['storage_account']['tier'], + account_replication_type = az['storage_account']['replication'], + resource_group_name = self.rg.name ) - storageContainer = storage_container.StorageContainer( - self, - "sc", - name = f"{az_prefix}{az_env}sc", - storage_account_name = storageAccount.name + sc = storage_container.StorageContainer( + self, + az['storage_container']['key'], + name = f"{az['key']}{az['env']}{az['storage_container']['key']}", + storage_account_name = self.sa.name ) - sqlServer = mssql_server.MssqlServer( - self, - "sql", - location = az_location, - resource_group_name = resourceGroup.name, - name = f"{az_prefix}{az_env}sql", - version = az_sql_server["version"], - administrator_login = az_sql_server["administrator_login"], - administrator_login_password = az_sql_server["administrator_login_password"] + sql = mssql_server.Mssql( + self, + az['mssql_server']['key'], + name = f"{az['key']}{az['env']}{az['mssql_server']['key']}", + location = az['location'], + version = az['mssql_server']['version'], + administrator_login = az['mssql_server']['administrator_login'], + administrator_login_password = az['mssql_server']['administrator_login_password'], + resource_group_name = self.rg.name ) - sqlDatabase = mssql_database.MssqlDatabase( - self, - "db", - server_id = sqlServer.id, - name = f"{az_prefix}{az_env}db", - sku_name = az_sql_db["sku_name"], - collation = az_sql_db["collation"], - create_mode = az_sql_db["create_mode"], + db = mssql_database.MssqlDatabase( + self, + az['mssql_database']['key'], + name = f"{az['key']}{az['env']}{az['mssql_database']['key']}", + sku_name = az['mssql_database']['sku_name'], + collation = az['mssql_database']['collation'], + create_mode = az['mssql_database']['create_mode'], + server_id = sql.id ) - servicePlan = service_plan.ServicePlan( - self, - "asp", - location = az_location, - resource_group_name = resourceGroup.name, - name = f"{az_prefix}{az_env}asp", - sku_name = az_svc_plan["sku_name"], - os_type = az_svc_plan["os_type"] + self.svc = service_plan.ServicePlan( + self, + az['service_plan']['key'], + location = az['location'], + name = f"{az['key']}{az['env']}{az['service_plan']['key']}", + sku_name = az['service_plan']['sku_name'], + os_type = az['service_plan']['os_type'], + resource_group_name = self.rg.name ) - appFnc = linux_function_app.LinuxFunctionApp( + self.fnc = linux_function_app.LinuxFunctionApp( self, - "fnc", - location = az_location, - resource_group_name = resourceGroup.name, - service_plan_id = servicePlan.id, - storage_account_name = storageAccount.name, - storage_account_access_key = storageAccount.primary_access_key, - name = f"{az_prefix}{az_env}fnc", + az['linux_function_app']['key'], + name = f"{az['key']}{az['env']}{az['linux_function_app']['key']}", + location = az['location'], + resource_group_name = self.rg.name, + service_plan_id = svc.id, + storage_account_name = self.sa.name, + storage_account_access_key = self.sa.primary_access_key, site_config = { }, identity = { "type": "SystemAssigned" } ) - eventgridtopic = eventgrid_topic.EventgridTopic( + self.eventgridtopic = eventgrid_topic.EventgridTopic( self, - "egt", - location = az_location, - resource_group_name = resourceGroup.name, - name = f"{az_prefix}{az_env}egt" + az['eventgrid_topic']['key'], + location = az['location'], + resource_group_name = self.rg.name, + name = f"{az['key']}{az['env']}{az['eventgrid_topic']['key']}" ) + self.dashboard = dashboard_grafana.DashboardGrafana( + self, + az['dashboard_grafana']['key'], + location = az['location'], + resource_group_name = self.rg.name, + name = f"{az['key']}{az['env']}{az['dashboard_grafana']['key']}", + api_key_enabled = True + deterministic_outbound_ip_enabled = True + public_network_access_enabled = False + identity = { "type": "SystemAssigned" } + ) + class AzureGrafana(TerraformStack): def __init__(self, scope: Construct, id: str, workspace_id: str): super().__init__(scope, id) @@ -147,6 +136,7 @@ def __init__(self, scope: Construct, id: str, workspace_id: str): self.grafana = { 'auth': 'supersecretkeygoeshere', 'url': 'https://apacfcdevgrafana.azurewebsites.net' + 'url': 'https://apacfcdevgrad.azurewebsites.net' } GrafanaProvider( @@ -176,5 +166,5 @@ def __init__(self, scope: Construct, id: str, workspace_id: str): app = App() core_stack = AzureCore(app, "azure_core") -#grafana_dashboard_stack = AzureGrafana(app, "azure_grafana_dashboard", core_stack.grafana_workspace_id) +grafana_dashboard_stack = AzureGrafana(app, "azure_grafana_dashboard", core_stack.dashboard.) app.synth() diff --git a/infrastructure/azure/package.json b/infrastructure/azure/package.json new file mode 100644 index 0000000..b47c29d --- /dev/null +++ b/infrastructure/azure/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@cdktf/provider-archive": "^3.0.11" + } +}