From 7f4f0893491e1618b6736df57330e93d01352081 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 10 Aug 2020 10:05:03 -0400 Subject: [PATCH 01/21] Update ghp-import from 0.5.5 to 0.6.0 --- docker/setup/requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/setup/requirements.txt b/docker/setup/requirements.txt index 4fe02c3a..c3d6c5ec 100644 --- a/docker/setup/requirements.txt +++ b/docker/setup/requirements.txt @@ -1,2 +1,2 @@ -ghp-import==0.5.5 +ghp-import==0.6.0 twine==3.2.0 From af0e05d662f45247d699561c30bb769851c63ec2 Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 10 Aug 2020 10:05:04 -0400 Subject: [PATCH 02/21] Update isort from 5.2.2 to 5.3.2 --- requirements-dev.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.txt b/requirements-dev.txt index da4fffcb..15dcb0d8 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,6 +1,6 @@ flake8==3.8.3 flex==6.14.1 -isort==5.2.2 +isort==5.3.2 PyAMQP==0.1.0.7 lockfile==0.12.2 mypy==0.782 From 09180b9e361d5d0aaa52bb07b25051d189cc8ebe Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 10 Aug 2020 10:05:05 -0400 Subject: [PATCH 03/21] Update sendgrid from 6.4.4 to 6.4.5 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 564a4da3..fd2544ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,7 +12,7 @@ msgpack==1.0.0 python-http-client==3.2.7 pyzmail36==1.0.4 requests==2.24.0 -sendgrid==6.4.4 +sendgrid==6.4.5 typing-extensions==3.7.4.2 typing==3.7.4.3 kombu==4.6.11 From d93bf06e68b8680466ce3a359dcda35f18b98ebb Mon Sep 17 00:00:00 2001 From: pyup-bot Date: Mon, 10 Aug 2020 10:05:06 -0400 Subject: [PATCH 04/21] Update kombu from 4.6.11 to 5.0.0 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index fd2544ed..d2393191 100644 --- a/requirements.txt +++ b/requirements.txt @@ -15,7 +15,7 @@ requests==2.24.0 sendgrid==6.4.5 typing-extensions==3.7.4.2 typing==3.7.4.3 -kombu==4.6.11 +kombu==5.0.0 celery==4.4.7 xtarfile[zstd]==0.0.4 azure-servicebus==0.50.3 From d61bdee69f487c4de9067f60867fe7b9e12e4a71 Mon Sep 17 00:00:00 2001 From: Shaun B Date: Thu, 13 Aug 2020 11:43:48 -0700 Subject: [PATCH 05/21] Add Terraform IaC --- docker/setup/terraform/01_provider.tf | 8 + docker/setup/terraform/02_data_rg.tf | 310 +++ docker/setup/terraform/03_server_rg.tf | 11 + docker/setup/terraform/04_vm_rg.tf | 185 ++ docker/setup/terraform/05_test_rg.tf | 11 + docker/setup/terraform/06_dashboards_rg.tf | 0 .../current infra/dashboard-parameters.json | 39 + .../current infra/dashboard-template.json | 2049 +++++++++++++++++ .../current infra/data-parameters.json | 18 + .../current infra/data-template.json | 558 +++++ .../current infra/test-parameters.json | 12 + .../current infra/test-template.json | 868 +++++++ .../current infra/vm-parameters.json | 21 + .../terraform/current infra/vm-template.json | 307 +++ docker/setup/terraform/lokole_azure.tf | 535 +++++ docker/setup/terraform/outputs.tf | 55 + docker/setup/terraform/terraform.tfvars | 15 + docker/setup/terraform/variables.tf | 81 + 18 files changed, 5083 insertions(+) create mode 100644 docker/setup/terraform/01_provider.tf create mode 100644 docker/setup/terraform/02_data_rg.tf create mode 100644 docker/setup/terraform/03_server_rg.tf create mode 100644 docker/setup/terraform/04_vm_rg.tf create mode 100644 docker/setup/terraform/05_test_rg.tf create mode 100644 docker/setup/terraform/06_dashboards_rg.tf create mode 100644 docker/setup/terraform/current infra/dashboard-parameters.json create mode 100644 docker/setup/terraform/current infra/dashboard-template.json create mode 100644 docker/setup/terraform/current infra/data-parameters.json create mode 100644 docker/setup/terraform/current infra/data-template.json create mode 100644 docker/setup/terraform/current infra/test-parameters.json create mode 100644 docker/setup/terraform/current infra/test-template.json create mode 100644 docker/setup/terraform/current infra/vm-parameters.json create mode 100644 docker/setup/terraform/current infra/vm-template.json create mode 100644 docker/setup/terraform/lokole_azure.tf create mode 100644 docker/setup/terraform/outputs.tf create mode 100644 docker/setup/terraform/terraform.tfvars create mode 100644 docker/setup/terraform/variables.tf diff --git a/docker/setup/terraform/01_provider.tf b/docker/setup/terraform/01_provider.tf new file mode 100644 index 00000000..3ee6a729 --- /dev/null +++ b/docker/setup/terraform/01_provider.tf @@ -0,0 +1,8 @@ +# Configure the Microsoft Azure Provider +provider "azurerm" { + # The "feature" block is required for AzureRM provider 2.x. + # If you're using version 1.x, the "features" block is not allowed. + version = "=2.23.0" + + features {} +} \ No newline at end of file diff --git a/docker/setup/terraform/02_data_rg.tf b/docker/setup/terraform/02_data_rg.tf new file mode 100644 index 00000000..cfef780f --- /dev/null +++ b/docker/setup/terraform/02_data_rg.tf @@ -0,0 +1,310 @@ +# ------------------------------ +# Data Resource Group +# ------------------------------ + +# Create a data resource group if it doesn't exist +resource "azurerm_resource_group" "data" { + name = "${var.RESOURCE_GROUP_NAME}data" + location = var.location + + tags = {} +} + +# Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = azurerm_resource_group.vm.name + } + + byte_length = 8 +} + +#TODO: data-template.json indicates encryption, cannot find on terraform. +# Create server table storage account if it doesn't exist +resource "azurerm_storage_account" "serverTablesName" { + name = var.serverTablesName + resource_group_name = azurerm_resource_group.data.name + location = azurerm_resource_group.data.location + account_kind = "Storage" + account_tier = "Standard" + account_replication_type = "GRS" + allow_blob_public_access = true + enable_https_traffic_only = false + + network_rules { + default_action = "Allow" + bypass = ["AzureServices"] + ip_rules = [] + } + + tags = {} +} + +# Create server blob storage account if it doesn't exist +resource "azurerm_storage_account" "serverBlobsName" { + name = var.serverBlobsName + resource_group_name = azurerm_resource_group.data.name + location = azurerm_resource_group.data.location + account_kind = "Storage" + account_tier = "Standard" + account_replication_type = "GRS" + allow_blob_public_access = true + enable_https_traffic_only = false + + network_rules { + default_action = "Allow" + bypass = ["AzureServices"] + ip_rules = [] + } + + tags = {} +} + +# Create client blob storage account if it doesn't exist +resource "azurerm_storage_account" "clientBlobsName" { + name = var.clientBlobsName + resource_group_name = azurerm_resource_group.data.name + location = azurerm_resource_group.data.location + account_kind = "Storage" + account_tier = "Standard" + account_replication_type = "GRS" + allow_blob_public_access = true + enable_https_traffic_only = false + + network_rules { + default_action = "Allow" + bypass = ["AzureServices"] + ip_rules = [] + } + + tags = {} +} + +resource "azurerm_storage_container" "clientsauth" { + name = "clientsauth" + storage_account_name = azurerm_storage_account.serverTablesName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "pendingemails" { + name = "pendingemails" + storage_account_name = azurerm_storage_account.serverTablesName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "users" { + name = "users" + storage_account_name = azurerm_storage_account.serverTablesName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "emails" { + name = "emails" + storage_account_name = azurerm_storage_account.serverBlobsName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "mailbox" { + name = "mailbox" + storage_account_name = azurerm_storage_account.serverBlobsName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "secretsopwencluster" { + name = "secretsopwencluster" + storage_account_name = azurerm_storage_account.serverBlobsName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "sendgridinboundemails" { + name = "sendgridinboundemails" + storage_account_name = azurerm_storage_account.serverBlobsName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "compressedpackages" { + name = "compressedpackages" + storage_account_name = azurerm_storage_account.clientBlobsName.name + container_access_type = "private" +} + +# Create a server queue if it doesn't exist +resource "azurerm_servicebus_namespace" "data" { + name = var.serverQueuesName + location = azurerm_resource_group.data.location + resource_group_name = azurerm_resource_group.data.name + sku = "Standard" + zone_redundant = false +} + +resource "azurerm_servicebus_namespace_authorization_rule" "data" { + name = var.serverQueuesSasName + namespace_name = azurerm_servicebus_namespace.data.name + resource_group_name = azurerm_resource_group.data.name + send = true + listen = true + manage = true +} + +#! Verify if this one is created automatically +# resource "azurerm_servicebus_namespace_authorization_rule" "data" { +# name = "RootManageSharedAccessKey" +# namespace_name = "${azurerm_servicebus_namespace.data.name}" +# resource_group_name = "${azurerm_resource_group.data.name}" +# send = true +# listen = true +# manage = true +# } + +#! Verify if this one is created automatically +# resource "azurerm_servicebus_topic" "data" { +# name = "${var.RESOURCE_GROUP_NAME}-sbtopic" +# resource_group_name = "${azurerm_resource_group.data.name}" +# namespace_name = "${azurerm_servicebus_namespace.data.name}" +# enable_partitioning = true +# } + +#! Verify if this one is created automatically +# resource "azurerm_servicebus_subscription" "data" { +# name = "${var.RESOURCE_GROUP_NAME}-sbsubscription" +# resource_group_name = "${azurerm_resource_group.data.name}" +# namespace_name = "${azurerm_servicebus_namespace.data.name}" +# topic_name = "${azurerm_servicebus_topic.data.name}" +# max_delivery_count = 1 +# } + +resource "azurerm_servicebus_queue" "serverQueueSendgridMime" { + name = var.serverQueueSendgridMime + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 5120 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "serverQueueEmailSend" { + name = var.serverQueueEmailSend + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 5120 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "serverQueueClientPackage" { + name = var.serverQueueClientPackage + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 5120 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +#! Verify these Queue items aren't populated automatically. It seems they are. +#! https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions +resource "azurerm_servicebus_queue" "mailboxreceived" { + name = "mailboxreceived" + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 1024 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "mailboxsent" { + name = "mailboxsent" + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 1024 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "register" { + name = "register" + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 1024 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "service" { + name = "service" + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 1024 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} diff --git a/docker/setup/terraform/03_server_rg.tf b/docker/setup/terraform/03_server_rg.tf new file mode 100644 index 00000000..f977c716 --- /dev/null +++ b/docker/setup/terraform/03_server_rg.tf @@ -0,0 +1,11 @@ +# ------------------------------ +# Server Resource Group +# ------------------------------ + +# Create the server resource group if it doesn't exist +resource "azurerm_resource_group" "server" { + name = "${var.RESOURCE_GROUP_NAME}server" + location = var.location + + tags = {} +} diff --git a/docker/setup/terraform/04_vm_rg.tf b/docker/setup/terraform/04_vm_rg.tf new file mode 100644 index 00000000..4d6262ee --- /dev/null +++ b/docker/setup/terraform/04_vm_rg.tf @@ -0,0 +1,185 @@ +# ------------------------------ +# Virtual Machine Resource Group +# ------------------------------ + +# Create a resource group if it doesn't exist +resource "azurerm_resource_group" "vm" { + name = var.vmName + location = var.location + + tags = {} +} + +#! Current infra uses port 24 on vnet, azure docs indicate to use 16 and 24 on subnet +# https://docs.microsoft.com/en-us/azure/developer/terraform/create-linux-virtual-machine-with-infrastructure +# Create virtual network +resource "azurerm_virtual_network" "vm" { + name = "vm-vnet" + location = azurerm_resource_group.vm.location + resource_group_name = azurerm_resource_group.vm.name + address_space = ["10.0.0.0/16"] + + tags = {} +} + +# Create subnet +resource "azurerm_subnet" "vmsubnet" { + name = "vmsubnet" + resource_group_name = azurerm_resource_group.vm.name + virtual_network_name = azurerm_virtual_network.vm.name + address_prefix = "10.0.2.0/24" +} + +# Create public IPs +resource "azurerm_public_ip" "vm" { + name = "vm-ip" + location = azurerm_resource_group.vm.location + resource_group_name = azurerm_resource_group.vm.name + + allocation_method = "Dynamic" + sku = "Basic" + ip_version = "IPv4" + domain_name_label = "opwenvmtest" + idle_timeout_in_minutes = 4 + + tags = {} +} + +# Create Network Security Group and rule +resource "azurerm_network_security_group" "vm" { + name = "vm-nsg" + location = azurerm_resource_group.vm.location + resource_group_name = azurerm_resource_group.vm.name + + security_rule { + name = "SSH" + priority = 300 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "22" + source_address_prefix = "*" + destination_address_prefix = "*" + } + security_rule { + name = "HTTPS" + priority = 320 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "443" + source_address_prefix = "*" + destination_address_prefix = "*" + } + security_rule { + name = "HTTP" + priority = 340 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "80" + source_address_prefix = "*" + destination_address_prefix = "*" + } + # TODO: Add other security rules + # Inbound: HTTPS / HTTP / AllowVnetInbound / AllowAzureLoadBalancerInBound / DenyAllInBound + # Outbound: AllowVnetOutBound / AllowInternetOutBound / DenyAllOutBound + + tags = {} +} + +# Create network interface +# https://www.terraform.io/docs/providers/azurerm/r/network_interface.html +resource "azurerm_network_interface" "vm" { + name = "vm-nic" + location = azurerm_resource_group.vm.location + resource_group_name = azurerm_resource_group.vm.name + + ip_configuration { + name = "vm-nicConfiguration" + private_ip_address_allocation = "Dynamic" + public_ip_address_id = azurerm_public_ip.vm.id + subnet_id = azurerm_subnet.vmsubnet.id + primary = true + } + + tags = {} +} + +# Connect the security group to the network interface +resource "azurerm_network_interface_security_group_association" "vm" { + network_interface_id = azurerm_network_interface.vm.id + network_security_group_id = azurerm_network_security_group.vm.id +} + +# Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = azurerm_resource_group.vm.name + } + + byte_length = 8 +} + +#! Verify whether this is necessary +# Create storage account for boot diagnostics +resource "azurerm_storage_account" "vm" { + name = "diag${random_id.randomId.hex}" + location = azurerm_resource_group.vm.location + resource_group_name = azurerm_resource_group.vm.name + account_tier = "Standard" + account_replication_type = "LRS" + + tags = {} +} + +# Create (and display) an SSH key +resource "tls_private_key" "vm" { + algorithm = "RSA" + rsa_bits = 4096 +} +output "tls_private_key" { value = tls_private_key.vm.private_key_pem } + +# Create virtual machine +resource "azurerm_linux_virtual_machine" "vm" { + name = "vm" + location = azurerm_resource_group.vm.location + resource_group_name = azurerm_resource_group.vm.name + network_interface_ids = [azurerm_network_interface.vm.id] + size = "Standard_D4s_v3" + provision_vm_agent = true + + os_disk { + name = "vm-disk" + caching = "ReadWrite" + storage_account_type = "Premium_LRS" + # disk_size must exceed that of the image of the vm if declared explicitly. + # disk_size_gb = 30 + } + + source_image_reference { + publisher = "Canonical" + offer = "UbuntuServer" + sku = "18.04-LTS" + version = "latest" + } + + admin_username = var.RESOURCE_GROUP_NAME + disable_password_authentication = true + allow_extension_operations = true + + admin_ssh_key { + username = var.RESOURCE_GROUP_NAME + public_key = tls_private_key.vm.public_key_openssh + } + + boot_diagnostics { + storage_account_uri = azurerm_storage_account.vm.primary_blob_endpoint + } + + tags = {} +} \ No newline at end of file diff --git a/docker/setup/terraform/05_test_rg.tf b/docker/setup/terraform/05_test_rg.tf new file mode 100644 index 00000000..6132f55b --- /dev/null +++ b/docker/setup/terraform/05_test_rg.tf @@ -0,0 +1,11 @@ +# ------------------------------ +# Test Resource Group +# ------------------------------ + +# Create a resource group if it doesn't exist +resource "azurerm_resource_group" "test" { + name = "${var.RESOURCE_GROUP_NAME}test" + location = var.location + + tags = {} +} \ No newline at end of file diff --git a/docker/setup/terraform/06_dashboards_rg.tf b/docker/setup/terraform/06_dashboards_rg.tf new file mode 100644 index 00000000..e69de29b diff --git a/docker/setup/terraform/current infra/dashboard-parameters.json b/docker/setup/terraform/current infra/dashboard-parameters.json new file mode 100644 index 00000000..d7cda4e3 --- /dev/null +++ b/docker/setup/terraform/current infra/dashboard-parameters.json @@ -0,0 +1,39 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "metricAlerts_opwenserver_exceptions_description": { + "value": null + }, + "actionGroups_Migration_AG1_name": { + "value": null + }, + "actionGroups_Migration_AG2_name": { + "value": null + }, + "actionGroups_Migration_AG3_name": { + "value": null + }, + "components_opwenlogsopzrs57fzm73k_name": { + "value": null + }, + "metricAlerts_opwenserver_exceptions_name": { + "value": null + }, + "actionGroups_Exceptions_in_opwen_cloudserver_name": { + "value": null + }, + "dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name": { + "value": null + }, + "dashboards_e2253a02_3cff_471e_881c_fd5de37bc557_dashboard_name": { + "value": null + }, + "smartdetectoralertrules_failure_anomalies___opwenlogsopzrs57fzm73k_name": { + "value": null + }, + "virtualMachines_opwenvm_externalid": { + "value": null + } + } +} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/dashboard-template.json b/docker/setup/terraform/current infra/dashboard-template.json new file mode 100644 index 00000000..2817f6b4 --- /dev/null +++ b/docker/setup/terraform/current infra/dashboard-template.json @@ -0,0 +1,2049 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "metricAlerts_opwenserver_exceptions_description": { + "type": "SecureString" + }, + "actionGroups_Migration_AG1_name": { + "defaultValue": "Migration_AG1", + "type": "String" + }, + "actionGroups_Migration_AG2_name": { + "defaultValue": "Migration_AG2", + "type": "String" + }, + "actionGroups_Migration_AG3_name": { + "defaultValue": "Migration_AG3", + "type": "String" + }, + "components_opwenlogsopzrs57fzm73k_name": { + "defaultValue": "opwenlogsopzrs57fzm73k", + "type": "String" + }, + "metricAlerts_opwenserver_exceptions_name": { + "defaultValue": "opwenserver-exceptions", + "type": "String" + }, + "actionGroups_Exceptions_in_opwen_cloudserver_name": { + "defaultValue": "Exceptions in opwen-cloudserver", + "type": "String" + }, + "dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name": { + "defaultValue": "9acf2952-ca98-426a-b17d-48e31e534483", + "type": "String" + }, + "dashboards_e2253a02_3cff_471e_881c_fd5de37bc557_dashboard_name": { + "defaultValue": "e2253a02-3cff-471e-881c-fd5de37bc557-dashboard", + "type": "String" + }, + "smartdetectoralertrules_failure_anomalies___opwenlogsopzrs57fzm73k_name": { + "defaultValue": "failure anomalies - opwenlogsopzrs57fzm73k", + "type": "String" + }, + "virtualMachines_opwenvm_externalid": { + "defaultValue": "/subscriptions/7251246a-f6e5-4759-a1a1-4dc4a730ee4d/resourceGroups/opwenvm/providers/Microsoft.Compute/virtualMachines/opwenvm", + "type": "String" + } + }, + "variables": {}, + "resources": [ + { + "type": "microsoft.insights/actionGroups", + "apiVersion": "2019-03-01", + "name": "[parameters('actionGroups_Exceptions_in_opwen_cloudserver_name')]", + "location": "Global", + "properties": { + "groupShortName": "exceptions", + "enabled": true, + "emailReceivers": [ + { + "name": "Send email_-EmailAction-", + "emailAddress": "clemens.wolff+ascoderualerts@gmail.com", + "useCommonAlertSchema": true + } + ], + "smsReceivers": [], + "webhookReceivers": [], + "itsmReceivers": [], + "azureAppPushReceivers": [], + "automationRunbookReceivers": [], + "voiceReceivers": [], + "logicAppReceivers": [], + "azureFunctionReceivers": [] + } + }, + { + "type": "microsoft.insights/actionGroups", + "apiVersion": "2019-03-01", + "name": "[parameters('actionGroups_Migration_AG1_name')]", + "location": "Global", + "properties": { + "groupShortName": "Migrated1", + "enabled": true, + "emailReceivers": [], + "smsReceivers": [], + "webhookReceivers": [], + "itsmReceivers": [], + "azureAppPushReceivers": [], + "automationRunbookReceivers": [], + "voiceReceivers": [], + "logicAppReceivers": [], + "azureFunctionReceivers": [] + } + }, + { + "type": "microsoft.insights/actionGroups", + "apiVersion": "2019-03-01", + "name": "[parameters('actionGroups_Migration_AG2_name')]", + "location": "Global", + "properties": { + "groupShortName": "Migrated2", + "enabled": true, + "emailReceivers": [ + { + "name": "emailId_1", + "emailAddress": "ascoderu.opwen@gmail.com", + "useCommonAlertSchema": false + }, + { + "name": "emailId_2", + "emailAddress": "clemens.wolff@gmail.com", + "useCommonAlertSchema": false + } + ], + "smsReceivers": [], + "webhookReceivers": [], + "itsmReceivers": [], + "azureAppPushReceivers": [], + "automationRunbookReceivers": [], + "voiceReceivers": [], + "logicAppReceivers": [], + "azureFunctionReceivers": [] + } + }, + { + "type": "microsoft.insights/actionGroups", + "apiVersion": "2019-03-01", + "name": "[parameters('actionGroups_Migration_AG3_name')]", + "location": "Global", + "properties": { + "groupShortName": "Migrated3", + "enabled": true, + "emailReceivers": [], + "smsReceivers": [], + "webhookReceivers": [], + "itsmReceivers": [], + "azureAppPushReceivers": [], + "automationRunbookReceivers": [], + "voiceReceivers": [], + "logicAppReceivers": [], + "azureFunctionReceivers": [] + } + }, + { + "type": "microsoft.insights/components", + "apiVersion": "2018-05-01-preview", + "name": "[parameters('components_opwenlogsopzrs57fzm73k_name')]", + "location": "eastus", + "kind": "other", + "properties": { + "Application_Type": "web", + "RetentionInDays": 90, + "publicNetworkAccessForIngestion": "Enabled", + "publicNetworkAccessForQuery": "Enabled" + } + }, + { + "type": "Microsoft.Portal/dashboards", + "apiVersion": "2019-01-01-preview", + "name": "[parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name')]", + "location": "eastus", + "dependsOn": [ + "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + ], + "tags": { + "hidden-title": "Analytics" + }, + "properties": { + "lenses": { + "0": { + "order": 0, + "parts": { + "0": { + "position": { + "x": 0, + "y": 0, + "rowSpan": 3, + "colSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards", + "Name": "opwenlogsopzrs57fzm73k", + "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + } + }, + { + "name": "Query", + "value": "customEvents\n| where name == \"email_delivered_from_client\"\n| extend dayOfYear = timestamp\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\n| extend domains = tostring(customDimensions.domain)\n| summarize count() by days, domains, dayOfYear\n| order by dayOfYear asc \n| project-away dayOfYear \n| project-rename total_email_delivered_from_client = count_ \n| render barchart kind=unstacked\n" + }, + { + "name": "TimeRange", + "value": "P1D" + }, + { + "name": "Dimensions", + "value": { + "xAxis": { + "name": "days", + "type": "String" + }, + "yAxis": [ + { + "name": "total_email_delivered_from_client", + "type": "Int64" + } + ], + "splitBy": [ + { + "name": "domains", + "type": "String" + } + ], + "aggregation": "Sum" + } + }, + { + "name": "Version", + "value": "1.0" + }, + { + "name": "DashboardId", + "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" + }, + { + "name": "PartId", + "value": "c16be6ed-991f-41a1-a612-9db779762654" + }, + { + "name": "PartTitle", + "value": "Analytics" + }, + { + "name": "PartSubTitle", + "value": "opwenlogsopzrs57fzm73k" + }, + { + "name": "resourceTypeMode", + "value": "components" + }, + { + "name": "ControlType", + "value": "AnalyticsChart" + }, + { + "name": "SpecificChart", + "value": "GroupedBar" + } + ], + "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", + "settings": {}, + "asset": {} + } + }, + "1": { + "position": { + "x": 7, + "y": 0, + "rowSpan": 3, + "colSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "sharedTimeRange", + "isOptional": true + }, + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[parameters('virtualMachines_opwenvm_externalid')]" + }, + "name": "Percentage CPU", + "aggregationType": 4, + "metricVisualization": { + "displayName": "Percentage CPU", + "resourceDisplayName": "opwenvm" + } + } + ], + "title": "CPU (average)", + "titleKind": 2, + "visualization": { + "chartType": 2 + }, + "openBladeOnClick": { + "openBlade": true + } + } + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {}, + "filters": {} + } + }, + "2": { + "position": { + "x": 14, + "y": 0, + "rowSpan": 6, + "colSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards", + "Name": "opwenlogsopzrs57fzm73k", + "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + } + }, + { + "name": "Query", + "value": "exceptions\r\n| extend dayOfYear = timestamp\r\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\r\n| extend domains = tostring(customDimensions.domain)\r\n| summarize count() by days, domains, dayOfYear\r\n| order by dayOfYear asc\r\n| project-rename exceptions = count_ \r\n| render barchart kind=unstacked\r\n" + }, + { + "name": "TimeRange", + "value": "P7D" + }, + { + "name": "Dimensions", + "value": { + "xAxis": { + "name": "dayOfYear", + "type": "DateTime" + }, + "yAxis": [ + { + "name": "exceptions", + "type": "Int64" + } + ], + "splitBy": [ + { + "name": "days", + "type": "String" + } + ], + "aggregation": "Sum" + } + }, + { + "name": "Version", + "value": "1.0" + }, + { + "name": "DashboardId", + "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" + }, + { + "name": "PartId", + "value": "4d781d53-1c6f-4768-9534-9f19a9ffb5a3" + }, + { + "name": "PartTitle", + "value": "Analytics" + }, + { + "name": "PartSubTitle", + "value": "opwenlogsopzrs57fzm73k" + }, + { + "name": "resourceTypeMode", + "value": "components" + }, + { + "name": "ControlType", + "value": "AnalyticsChart" + }, + { + "name": "SpecificChart", + "value": "GroupedBar" + } + ], + "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", + "settings": {}, + "asset": {} + } + }, + "3": { + "position": { + "x": 0, + "y": 3, + "rowSpan": 3, + "colSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards", + "Name": "opwenlogsopzrs57fzm73k", + "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + } + }, + { + "name": "Query", + "value": "customEvents\n| where name == \"emails_delivered_to_client\"\n| extend dayOfYear = timestamp\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\n| extend domains = tostring(customDimensions.domain)\n| summarize count() by days, domains, dayOfYear\n| order by dayOfYear asc \n| project-away dayOfYear \n| project-rename total_emails_delivered_to_client = count_ \n| render barchart kind=unstacked\n" + }, + { + "name": "TimeRange", + "value": "P1D" + }, + { + "name": "Dimensions", + "value": { + "xAxis": { + "name": "days", + "type": "String" + }, + "yAxis": [ + { + "name": "total_emails_delivered_to_client", + "type": "Int64" + } + ], + "splitBy": [ + { + "name": "domains", + "type": "String" + } + ], + "aggregation": "Sum" + } + }, + { + "name": "Version", + "value": "1.0" + }, + { + "name": "DashboardId", + "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" + }, + { + "name": "PartId", + "value": "ce74b6ba-08e2-48b6-a570-6c3afff2ed1e" + }, + { + "name": "PartTitle", + "value": "Analytics" + }, + { + "name": "PartSubTitle", + "value": "opwenlogsopzrs57fzm73k" + }, + { + "name": "resourceTypeMode", + "value": "components" + }, + { + "name": "ControlType", + "value": "AnalyticsChart" + }, + { + "name": "SpecificChart", + "value": "GroupedBar" + } + ], + "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", + "settings": {}, + "asset": {} + } + }, + "4": { + "position": { + "x": 7, + "y": 3, + "rowSpan": 3, + "colSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "sharedTimeRange", + "isOptional": true + }, + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[parameters('virtualMachines_opwenvm_externalid')]" + }, + "name": "Network In Total", + "aggregationType": 1, + "metricVisualization": { + "displayName": "Network In Total", + "resourceDisplayName": "opwenvm" + } + }, + { + "resourceMetadata": { + "id": "[parameters('virtualMachines_opwenvm_externalid')]" + }, + "name": "Network Out Total", + "aggregationType": 1, + "metricVisualization": { + "displayName": "Network Out Total", + "resourceDisplayName": "opwenvm" + } + } + ], + "title": "Network (total)", + "titleKind": 2, + "visualization": { + "chartType": 2 + }, + "openBladeOnClick": { + "openBlade": true + } + } + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {}, + "filters": {} + } + }, + "5": { + "position": { + "x": 0, + "y": 6, + "rowSpan": 3, + "colSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards", + "Name": "opwenlogsopzrs57fzm73k", + "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + } + }, + { + "name": "Query", + "value": "customEvents\n| where name == \"email_received_for_client\"\n| extend dayOfYear = timestamp\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\n| extend domains = tostring(customDimensions.domain)\n| summarize count() by days, domains, dayOfYear\n| order by dayOfYear asc \n| project-away dayOfYear \n| project-rename total_email_received_for_client = count_ \n| render barchart kind=unstacked\n" + }, + { + "name": "TimeRange", + "value": "P1D" + }, + { + "name": "Dimensions", + "value": { + "xAxis": { + "name": "days", + "type": "String" + }, + "yAxis": [ + { + "name": "total_email_received_for_client", + "type": "Int64" + } + ], + "splitBy": [ + { + "name": "domains", + "type": "String" + } + ], + "aggregation": "Sum" + } + }, + { + "name": "Version", + "value": "1.0" + }, + { + "name": "DashboardId", + "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" + }, + { + "name": "PartId", + "value": "88017b9a-b1f3-4cbb-8832-cc6e0d640713" + }, + { + "name": "PartTitle", + "value": "Analytics" + }, + { + "name": "PartSubTitle", + "value": "opwenlogsopzrs57fzm73k" + }, + { + "name": "resourceTypeMode", + "value": "components" + }, + { + "name": "ControlType", + "value": "AnalyticsChart" + }, + { + "name": "SpecificChart", + "value": "GroupedBar" + } + ], + "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", + "settings": {}, + "asset": {} + } + }, + "6": { + "position": { + "x": 7, + "y": 6, + "rowSpan": 3, + "colSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "sharedTimeRange", + "isOptional": true + }, + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[parameters('virtualMachines_opwenvm_externalid')]" + }, + "name": "Disk Read Operations/Sec", + "aggregationType": 4, + "metricVisualization": { + "displayName": "Disk Read Operations/Sec", + "resourceDisplayName": "opwenvm" + } + }, + { + "resourceMetadata": { + "id": "[parameters('virtualMachines_opwenvm_externalid')]" + }, + "name": "Disk Write Operations/Sec", + "aggregationType": 4, + "metricVisualization": { + "displayName": "Disk Write Operations/Sec", + "resourceDisplayName": "opwenvm" + } + } + ], + "title": "Disk operations/sec (average)", + "titleKind": 2, + "visualization": { + "chartType": 2 + }, + "openBladeOnClick": { + "openBlade": true + } + } + }, + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {}, + "filters": {} + } + }, + "7": { + "position": { + "x": 0, + "y": 9, + "rowSpan": 3, + "colSpan": 6 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards", + "Name": "opwenlogsopzrs57fzm73k", + "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + } + }, + { + "name": "Query", + "value": "customEvents\n| where name == \"emails_received_from_client\"\n| extend dayOfYear = timestamp\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\n| extend domains = tostring(customDimensions.domain)\n| summarize count() by days, domains, dayOfYear\n| order by dayOfYear asc \n| project-away dayOfYear \n| project-rename total_email_received_from_client = count_ \n| render barchart kind=unstacked\n" + }, + { + "name": "TimeRange", + "value": "P1D" + }, + { + "name": "Dimensions", + "value": { + "xAxis": { + "name": "days", + "type": "String" + }, + "yAxis": [ + { + "name": "total_email_received_from_client", + "type": "Int64" + } + ], + "splitBy": [ + { + "name": "domains", + "type": "String" + } + ], + "aggregation": "Sum" + } + }, + { + "name": "Version", + "value": "1.0" + }, + { + "name": "DashboardId", + "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" + }, + { + "name": "PartId", + "value": "59bdce89-9f52-4bd6-becf-5b221bff8072" + }, + { + "name": "PartTitle", + "value": "Analytics" + }, + { + "name": "PartSubTitle", + "value": "opwenlogsopzrs57fzm73k" + }, + { + "name": "resourceTypeMode", + "value": "components" + }, + { + "name": "ControlType", + "value": "AnalyticsChart" + }, + { + "name": "SpecificChart", + "value": "GroupedBar" + } + ], + "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", + "settings": {}, + "asset": {} + } + } + } + } + }, + "metadata": { + "model": {} + } + } + }, + { + "type": "Microsoft.Portal/dashboards", + "apiVersion": "2019-01-01-preview", + "name": "[parameters('dashboards_e2253a02_3cff_471e_881c_fd5de37bc557_dashboard_name')]", + "location": "eastus", + "dependsOn": [ + "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + ], + "tags": { + "hidden-title": "opwenlogsopzrs57fzm73k Dashboard" + }, + "properties": { + "lenses": { + "0": { + "order": 0, + "parts": { + "0": { + "position": { + "x": 0, + "y": 0, + "rowSpan": 1, + "colSpan": 2 + }, + "metadata": { + "inputs": [ + { + "name": "id", + "value": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + { + "name": "Version", + "value": "1.0" + } + ], + "type": "Extension/AppInsightsExtension/PartType/AspNetOverviewPinnedPart", + "asset": {}, + "defaultMenuItemId": "overview" + } + }, + "1": { + "position": { + "x": 2, + "y": 0, + "rowSpan": 1, + "colSpan": 1 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "Name": "opwenlogsopzrs57fzm73k", + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards" + } + }, + { + "name": "Version", + "value": "1.0" + } + ], + "type": "Extension/AppInsightsExtension/PartType/ProactiveDetectionAsyncPart", + "asset": {}, + "defaultMenuItemId": "ProactiveDetection" + } + }, + "2": { + "position": { + "x": 3, + "y": 0, + "rowSpan": 1, + "colSpan": 1 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "Name": "opwenlogsopzrs57fzm73k", + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards" + } + }, + { + "name": "ResourceId", + "value": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + } + ], + "type": "Extension/AppInsightsExtension/PartType/QuickPulseButtonSmallPart", + "asset": {} + } + }, + "3": { + "position": { + "x": 4, + "y": 0, + "rowSpan": 1, + "colSpan": 1 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "Name": "opwenlogsopzrs57fzm73k", + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards" + } + }, + { + "name": "TimeContext", + "value": { + "durationMs": 86400000, + "endTime": null, + "createdTime": "2018-05-04T01:20:33.345Z", + "isInitialTime": true, + "grain": 1, + "useDashboardTimeRange": false + } + }, + { + "name": "Version", + "value": "1.0" + }, + { + "name": "componentId", + "isOptional": true + }, + { + "name": "id", + "isOptional": true + } + ], + "type": "Extension/AppInsightsExtension/PartType/WebTestsPinnedPart", + "asset": {} + } + }, + "4": { + "position": { + "x": 5, + "y": 0, + "rowSpan": 1, + "colSpan": 1 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "Name": "opwenlogsopzrs57fzm73k", + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards" + } + }, + { + "name": "TimeContext", + "value": { + "durationMs": 86400000, + "endTime": null, + "createdTime": "2018-05-08T18:47:35.237Z", + "isInitialTime": true, + "grain": 1, + "useDashboardTimeRange": false + } + }, + { + "name": "ConfigurationId", + "value": "78ce933e-e864-4b05-a27b-71fd55a6afad" + }, + { + "name": "MainResourceId", + "isOptional": true + }, + { + "name": "ResourceIds", + "isOptional": true + }, + { + "name": "DataModel", + "isOptional": true + }, + { + "name": "UseCallerTimeContext", + "isOptional": true + }, + { + "name": "OverrideSettings", + "isOptional": true + }, + { + "name": "PartId", + "isOptional": true + } + ], + "type": "Extension/AppInsightsExtension/PartType/ApplicationMapPart", + "settings": {}, + "asset": {} + } + }, + "5": { + "position": { + "x": 0, + "y": 1, + "rowSpan": 1, + "colSpan": 3 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": {} + } + }, + "6": { + "position": { + "x": 3, + "y": 1, + "rowSpan": 1, + "colSpan": 1 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "Name": "opwenlogsopzrs57fzm73k", + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards" + } + }, + { + "name": "TimeContext", + "value": { + "durationMs": 86400000, + "endTime": null, + "createdTime": "2018-05-04T01:22:35.782Z", + "isInitialTime": true, + "grain": 1, + "useDashboardTimeRange": false + } + } + ], + "type": "Extension/AppInsightsExtension/PartType/UsageUsersOverviewPart", + "asset": {} + } + }, + "7": { + "position": { + "x": 4, + "y": 1, + "rowSpan": 1, + "colSpan": 3 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": {} + } + }, + "8": { + "position": { + "x": 7, + "y": 1, + "rowSpan": 1, + "colSpan": 1 + }, + "metadata": { + "inputs": [ + { + "name": "ResourceId", + "value": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + { + "name": "DataModel", + "value": { + "version": "1.0.0", + "timeContext": { + "durationMs": 86400000, + "createdTime": "2018-05-04T23:42:40.072Z", + "isInitialTime": false, + "grain": 1, + "useDashboardTimeRange": false + } + }, + "isOptional": true + }, + { + "name": "ConfigurationId", + "value": "8a02f7bf-ac0f-40e1-afe9-f0e72cfee77f", + "isOptional": true + } + ], + "type": "Extension/AppInsightsExtension/PartType/CuratedBladeFailuresPinnedPart", + "isAdapter": true, + "asset": {}, + "defaultMenuItemId": "failures" + } + }, + "9": { + "position": { + "x": 8, + "y": 1, + "rowSpan": 1, + "colSpan": 3 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": {} + } + }, + "10": { + "position": { + "x": 11, + "y": 1, + "rowSpan": 1, + "colSpan": 1 + }, + "metadata": { + "inputs": [ + { + "name": "ResourceId", + "value": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + { + "name": "DataModel", + "value": { + "version": "1.0.0", + "timeContext": { + "durationMs": 86400000, + "createdTime": "2018-05-04T23:43:37.804Z", + "isInitialTime": false, + "grain": 1, + "useDashboardTimeRange": false + } + }, + "isOptional": true + }, + { + "name": "ConfigurationId", + "value": "2a8ede4f-2bee-4b9c-aed9-2db0e8a01865", + "isOptional": true + } + ], + "type": "Extension/AppInsightsExtension/PartType/CuratedBladePerformancePinnedPart", + "isAdapter": true, + "asset": {}, + "defaultMenuItemId": "performance" + } + }, + "11": { + "position": { + "x": 12, + "y": 1, + "rowSpan": 1, + "colSpan": 3 + }, + "metadata": { + "inputs": [], + "type": "Extension/HubsExtension/PartType/MarkdownPart", + "settings": {} + } + }, + "12": { + "position": { + "x": 15, + "y": 1, + "rowSpan": 1, + "colSpan": 1 + }, + "metadata": { + "inputs": [ + { + "name": "ComponentId", + "value": { + "Name": "opwenlogsopzrs57fzm73k", + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards" + } + }, + { + "name": "MetricsExplorerJsonDefinitionId", + "value": "BrowserPerformanceTimelineMetrics" + }, + { + "name": "TimeContext", + "value": { + "durationMs": 86400000, + "createdTime": "2018-05-08T12:16:27.534Z", + "isInitialTime": false, + "grain": 1, + "useDashboardTimeRange": false + } + }, + { + "name": "CurrentFilter", + "value": { + "eventTypes": [ + 4, + 1, + 3, + 5, + 2, + 6, + 13 + ], + "typeFacets": {}, + "isPermissive": false + } + }, + { + "name": "id", + "value": { + "Name": "opwenlogsopzrs57fzm73k", + "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", + "ResourceGroup": "dashboards" + } + }, + { + "name": "Version", + "value": "1.0" + } + ], + "type": "Extension/AppInsightsExtension/PartType/MetricsExplorerBladePinnedPart", + "asset": {}, + "defaultMenuItemId": "browser" + } + }, + "13": { + "position": { + "x": 0, + "y": 2, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "sessions/count", + "aggregationType": 5, + "namespace": "microsoft.insights/components/kusto", + "metricVisualization": { + "displayName": "Sessions", + "color": "#47BDF5" + } + }, + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "users/count", + "aggregationType": 5, + "namespace": "microsoft.insights/components/kusto", + "metricVisualization": { + "displayName": "Users", + "color": "#7E58FF" + } + } + ], + "title": "Unique sessions and users", + "visualization": { + "chartType": 2, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + }, + "openBladeOnClick": { + "openBlade": true, + "destinationBlade": { + "extensionName": "HubsExtension", + "bladeName": "ResourceMenuBlade", + "parameters": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", + "menuid": "segmentationUsers" + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "14": { + "position": { + "x": 4, + "y": 2, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "requests/failed", + "aggregationType": 7, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Failed requests", + "color": "#EC008C" + } + } + ], + "title": "Failed requests", + "visualization": { + "chartType": 3, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + }, + "openBladeOnClick": { + "openBlade": true, + "destinationBlade": { + "extensionName": "HubsExtension", + "bladeName": "ResourceMenuBlade", + "parameters": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", + "menuid": "failures" + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "15": { + "position": { + "x": 8, + "y": 2, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "requests/duration", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Server response time", + "color": "#00BCF2" + } + } + ], + "title": "Server response time", + "visualization": { + "chartType": 2, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + }, + "openBladeOnClick": { + "openBlade": true, + "destinationBlade": { + "extensionName": "HubsExtension", + "bladeName": "ResourceMenuBlade", + "parameters": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", + "menuid": "performance" + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "16": { + "position": { + "x": 12, + "y": 2, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "browserTimings/networkDuration", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Page load network connect time", + "color": "#7E58FF" + } + }, + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "browserTimings/processingDuration", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Client processing time", + "color": "#44F1C8" + } + }, + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "browserTimings/sendDuration", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Send request time", + "color": "#EB9371" + } + }, + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "browserTimings/receiveDuration", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Receiving response time", + "color": "#0672F1" + } + } + ], + "title": "Average page load time breakdown", + "visualization": { + "chartType": 3, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "17": { + "position": { + "x": 0, + "y": 5, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "availabilityResults/availabilityPercentage", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Availability", + "color": "#47BDF5" + } + } + ], + "title": "Average availability", + "visualization": { + "chartType": 3, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + }, + "openBladeOnClick": { + "openBlade": true, + "destinationBlade": { + "extensionName": "HubsExtension", + "bladeName": "ResourceMenuBlade", + "parameters": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", + "menuid": "availability" + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "18": { + "position": { + "x": 4, + "y": 5, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "exceptions/server", + "aggregationType": 7, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Server exceptions", + "color": "#47BDF5" + } + }, + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "dependencies/failed", + "aggregationType": 7, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Dependency failures", + "color": "#7E58FF" + } + } + ], + "title": "Server exceptions and Dependency failures", + "visualization": { + "chartType": 2, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "19": { + "position": { + "x": 8, + "y": 5, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "performanceCounters/processorCpuPercentage", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Processor time", + "color": "#47BDF5" + } + }, + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "performanceCounters/processCpuPercentage", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Process CPU", + "color": "#7E58FF" + } + } + ], + "title": "Average processor and process CPU utilization", + "visualization": { + "chartType": 2, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "20": { + "position": { + "x": 12, + "y": 5, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "exceptions/browser", + "aggregationType": 7, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Browser exceptions", + "color": "#47BDF5" + } + } + ], + "title": "Browser exceptions", + "visualization": { + "chartType": 2, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "21": { + "position": { + "x": 0, + "y": 8, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "availabilityResults/count", + "aggregationType": 7, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Availability test results count", + "color": "#47BDF5" + } + } + ], + "title": "Availability test results count", + "visualization": { + "chartType": 2, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "22": { + "position": { + "x": 4, + "y": 8, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "performanceCounters/processIOBytesPerSecond", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Process IO rate", + "color": "#47BDF5" + } + } + ], + "title": "Average process I/O rate", + "visualization": { + "chartType": 2, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + }, + "23": { + "position": { + "x": 8, + "y": 8, + "rowSpan": 3, + "colSpan": 4 + }, + "metadata": { + "inputs": [ + { + "name": "options", + "value": { + "chart": { + "metrics": [ + { + "resourceMetadata": { + "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + }, + "name": "performanceCounters/memoryAvailableBytes", + "aggregationType": 4, + "namespace": "microsoft.insights/components", + "metricVisualization": { + "displayName": "Available memory", + "color": "#47BDF5" + } + } + ], + "title": "Average available memory", + "visualization": { + "chartType": 2, + "legendVisualization": { + "isVisible": true, + "position": 2, + "hideSubtitle": false + }, + "axisVisualization": { + "x": { + "isVisible": true, + "axisType": 2 + }, + "y": { + "isVisible": true, + "axisType": 1 + } + } + } + } + } + }, + { + "name": "sharedTimeRange", + "isOptional": true + } + ], + "type": "Extension/HubsExtension/PartType/MonitorChartPart", + "settings": {} + } + } + } + } + }, + "metadata": { + "model": {} + } + } + }, + { + "type": "microsoft.insights/metricAlerts", + "apiVersion": "2018-03-01", + "name": "[parameters('metricAlerts_opwenserver_exceptions_name')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", + "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG2_name'))]" + ], + "tags": { + "hidden-link:/subscriptions/7251246a-f6e5-4759-a1a1-4dc4a730ee4d/resourceGroups/dashboards/providers/Microsoft.Insights/components/opwenlogsopzrs57fzm73k": "Resource" + }, + "properties": { + "severity": 3, + "enabled": true, + "scopes": [ + "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + ], + "evaluationFrequency": "PT5M", + "windowSize": "PT6H", + "criteria": { + "allOf": [ + { + "threshold": 1, + "name": "Metric1", + "metricNamespace": "microsoft.insights/components", + "metricName": "performanceCounters/exceptionsPerSecond", + "dimensions": [], + "operator": "GreaterThanOrEqual", + "timeAggregation": "Average", + "criterionType": "StaticThresholdCriterion" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "targetResourceType": "microsoft.insights/components", + "actions": [ + { + "actionGroupId": "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG2_name'))]", + "webHookProperties": {} + } + ], + "description": "[parameters('metricAlerts_opwenserver_exceptions_description')]" + } + }, + { + "type": "microsoft.alertsmanagement/smartdetectoralertrules", + "apiVersion": "2019-06-01", + "name": "[parameters('smartdetectoralertrules_failure_anomalies___opwenlogsopzrs57fzm73k_name')]", + "location": "global", + "dependsOn": [ + "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", + "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG1_name'))]", + "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG3_name'))]" + ], + "tags": { + "hidden-link:/subscriptions/7251246a-f6e5-4759-a1a1-4dc4a730ee4d/resourceGroups/dashboards/providers/microsoft.insights/components/opwenlogsopzrs57fzm73k": "Resource" + }, + "properties": { + "description": "Failure Anomalies notifies you of an unusual rise in the rate of failed HTTP requests or dependency calls", + "state": "Disabled", + "severity": "Sev3", + "frequency": "PT1M", + "detector": { + "id": "FailureAnomaliesDetector", + "name": "Failure Anomalies", + "description": "Detects if your application experiences an abnormal rise in the rate of HTTP requests or dependency calls that are reported as failed. The anomaly detection uses machine learning algorithms and occurs in near real time, therefore there's no need to define a frequency for this signal.

To help you triage and diagnose the problem, an analysis of the characteristics of the failures and related telemetry is provided with the detection. This feature works for any app, hosted in the cloud or on your own servers, that generates request or dependency telemetry - for example, if you have a worker role that calls TrackRequest() or TrackDependency().

Learn more about Failure Anomalies", + "supportedResourceTypes": [ + "ApplicationInsights" + ] + }, + "scope": [ + "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" + ], + "actionGroups": { + "groupIds": [ + "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG1_name'))]", + "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG3_name'))]" + ] + } + } + } + ] +} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/data-parameters.json b/docker/setup/terraform/current infra/data-parameters.json new file mode 100644 index 00000000..363623fb --- /dev/null +++ b/docker/setup/terraform/current infra/data-parameters.json @@ -0,0 +1,18 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "namespaces_opwenserverqueuesopzrs_name": { + "value": null + }, + "storageAccounts_opwenclientblobsopzrs5_name": { + "value": null + }, + "storageAccounts_opwenserverblobsopzrs5_name": { + "value": null + }, + "storageAccounts_opwenservertablesopzrs_name": { + "value": null + } + } +} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/data-template.json b/docker/setup/terraform/current infra/data-template.json new file mode 100644 index 00000000..7ab205dc --- /dev/null +++ b/docker/setup/terraform/current infra/data-template.json @@ -0,0 +1,558 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "namespaces_opwenserverqueuesopzrs_name": { + "defaultValue": "opwenserverqueuesopzrs", + "type": "String" + }, + "storageAccounts_opwenclientblobsopzrs5_name": { + "defaultValue": "opwenclientblobsopzrs5", + "type": "String" + }, + "storageAccounts_opwenserverblobsopzrs5_name": { + "defaultValue": "opwenserverblobsopzrs5", + "type": "String" + }, + "storageAccounts_opwenservertablesopzrs_name": { + "defaultValue": "opwenservertablesopzrs", + "type": "String" + } + }, + "variables": {}, + "resources": [ + // { + // "type": "Microsoft.ServiceBus/namespaces", + // "apiVersion": "2018-01-01-preview", + // "name": "[parameters('namespaces_opwenserverqueuesopzrs_name')]", + // "location": "East US", + // "sku": { + // "name": "Basic", + // "tier": "Basic" + // }, + // "properties": { + // "zoneRedundant": false + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts", + // "apiVersion": "2019-06-01", + // "name": "[parameters('storageAccounts_opwenclientblobsopzrs5_name')]", + // "location": "eastus", + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "kind": "Storage", + // "properties": { + // "networkAcls": { + // "bypass": "AzureServices", + // "virtualNetworkRules": [], + // "ipRules": [], + // "defaultAction": "Allow" + // }, + // "supportsHttpsTrafficOnly": false, + // "encryption": { + // "services": { + // "file": { + // "keyType": "Account", + // "enabled": true + // }, + // "blob": { + // "keyType": "Account", + // "enabled": true + // } + // }, + // "keySource": "Microsoft.Storage" + // } + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts", + // "apiVersion": "2019-06-01", + // "name": "[parameters('storageAccounts_opwenserverblobsopzrs5_name')]", + // "location": "eastus", + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "kind": "Storage", + // "properties": { + // "networkAcls": { + // "bypass": "AzureServices", + // "virtualNetworkRules": [], + // "ipRules": [], + // "defaultAction": "Allow" + // }, + // "supportsHttpsTrafficOnly": false, + // "encryption": { + // "services": { + // "file": { + // "keyType": "Account", + // "enabled": true + // }, + // "blob": { + // "keyType": "Account", + // "enabled": true + // } + // }, + // "keySource": "Microsoft.Storage" + // } + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts", + // "apiVersion": "2019-06-01", + // "name": "[parameters('storageAccounts_opwenservertablesopzrs_name')]", + // "location": "eastus", + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "kind": "Storage", + // "properties": { + // "networkAcls": { + // "bypass": "AzureServices", + // "virtualNetworkRules": [], + // "ipRules": [], + // "defaultAction": "Allow" + // }, + // "supportsHttpsTrafficOnly": false, + // "encryption": { + // "services": { + // "file": { + // "keyType": "Account", + // "enabled": true + // }, + // "blob": { + // "keyType": "Account", + // "enabled": true + // } + // }, + // "keySource": "Microsoft.Storage" + // } + // } + // }, + // { + // "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/celery')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "rights": [ + // "Manage", + // "Send", + // "Listen" + // ] + // } + // }, + // { + // "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/RootManageSharedAccessKey')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "rights": [ + // "Listen", + // "Manage", + // "Send" + // ] + // } + // }, + { + "type": "Microsoft.ServiceBus/namespaces/networkRuleSets", + "apiVersion": "2018-01-01-preview", + "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/default')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + ], + "properties": { + "defaultAction": "Deny", + "virtualNetworkRules": [], + "ipRules": [] + } + }, + // { + // "type": "Microsoft.ServiceBus/namespaces/queues", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/inbound')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "lockDuration": "PT1M", + // "maxSizeInMegabytes": 5120, + // "requiresDuplicateDetection": false, + // "requiresSession": false, + // "defaultMessageTimeToLive": "P14D", + // "deadLetteringOnMessageExpiration": false, + // "enableBatchedOperations": true, + // "duplicateDetectionHistoryTimeWindow": "PT10M", + // "maxDeliveryCount": 10, + // "status": "Active", + // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + // "enablePartitioning": false, + // "enableExpress": false + // } + // }, + // { + // "type": "Microsoft.ServiceBus/namespaces/queues", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/mailboxreceived')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "lockDuration": "PT1M", + // "maxSizeInMegabytes": 1024, + // "requiresDuplicateDetection": false, + // "requiresSession": false, + // "defaultMessageTimeToLive": "P14D", + // "deadLetteringOnMessageExpiration": false, + // "enableBatchedOperations": true, + // "duplicateDetectionHistoryTimeWindow": "PT10M", + // "maxDeliveryCount": 10, + // "status": "Active", + // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + // "enablePartitioning": false, + // "enableExpress": false + // } + // }, + // { + // "type": "Microsoft.ServiceBus/namespaces/queues", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/mailboxsent')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "lockDuration": "PT1M", + // "maxSizeInMegabytes": 1024, + // "requiresDuplicateDetection": false, + // "requiresSession": false, + // "defaultMessageTimeToLive": "P14D", + // "deadLetteringOnMessageExpiration": false, + // "enableBatchedOperations": true, + // "duplicateDetectionHistoryTimeWindow": "PT10M", + // "maxDeliveryCount": 10, + // "status": "Active", + // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + // "enablePartitioning": false, + // "enableExpress": false + // } + // }, + // { + // "type": "Microsoft.ServiceBus/namespaces/queues", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/register')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "lockDuration": "PT1M", + // "maxSizeInMegabytes": 1024, + // "requiresDuplicateDetection": false, + // "requiresSession": false, + // "defaultMessageTimeToLive": "P14D", + // "deadLetteringOnMessageExpiration": false, + // "enableBatchedOperations": true, + // "duplicateDetectionHistoryTimeWindow": "PT10M", + // "maxDeliveryCount": 10, + // "status": "Active", + // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + // "enablePartitioning": false, + // "enableExpress": false + // } + // }, + // { + // "type": "Microsoft.ServiceBus/namespaces/queues", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/send')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "lockDuration": "PT1M", + // "maxSizeInMegabytes": 5120, + // "requiresDuplicateDetection": false, + // "requiresSession": false, + // "defaultMessageTimeToLive": "P14D", + // "deadLetteringOnMessageExpiration": false, + // "enableBatchedOperations": true, + // "duplicateDetectionHistoryTimeWindow": "PT10M", + // "maxDeliveryCount": 10, + // "status": "Active", + // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + // "enablePartitioning": false, + // "enableExpress": false + // } + // }, + // { + // "type": "Microsoft.ServiceBus/namespaces/queues", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/service')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "lockDuration": "PT1M", + // "maxSizeInMegabytes": 1024, + // "requiresDuplicateDetection": false, + // "requiresSession": false, + // "defaultMessageTimeToLive": "P14D", + // "deadLetteringOnMessageExpiration": false, + // "enableBatchedOperations": true, + // "duplicateDetectionHistoryTimeWindow": "PT10M", + // "maxDeliveryCount": 10, + // "status": "Active", + // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + // "enablePartitioning": false, + // "enableExpress": false + // } + // }, + // { + // "type": "Microsoft.ServiceBus/namespaces/queues", + // "apiVersion": "2017-04-01", + // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/written')]", + // "location": "East US", + // "dependsOn": [ + // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" + // ], + // "properties": { + // "lockDuration": "PT1M", + // "maxSizeInMegabytes": 5120, + // "requiresDuplicateDetection": false, + // "requiresSession": false, + // "defaultMessageTimeToLive": "P14D", + // "deadLetteringOnMessageExpiration": false, + // "enableBatchedOperations": true, + // "duplicateDetectionHistoryTimeWindow": "PT10M", + // "maxDeliveryCount": 10, + // "status": "Active", + // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + // "enablePartitioning": false, + // "enableExpress": false + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts/blobServices", + // "apiVersion": "2019-06-01", + // "name": "[concat(parameters('storageAccounts_opwenclientblobsopzrs5_name'), '/default')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenclientblobsopzrs5_name'))]" + // ], + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "properties": { + // "cors": { + // "corsRules": [] + // }, + // "deleteRetentionPolicy": { + // "enabled": false + // } + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts/blobServices", + // "apiVersion": "2019-06-01", + // "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" + // ], + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "properties": { + // "cors": { + // "corsRules": [] + // }, + // "deleteRetentionPolicy": { + // "enabled": false + // } + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts/blobServices", + // "apiVersion": "2019-06-01", + // "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" + // ], + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "properties": { + // "cors": { + // "corsRules": [] + // }, + // "deleteRetentionPolicy": { + // "enabled": false + // } + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts/fileServices", + // "apiVersion": "2019-06-01", + // "name": "[concat(parameters('storageAccounts_opwenclientblobsopzrs5_name'), '/default')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenclientblobsopzrs5_name'))]" + // ], + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "properties": { + // "cors": { + // "corsRules": [] + // } + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts/fileServices", + // "apiVersion": "2019-06-01", + // "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" + // ], + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "properties": { + // "cors": { + // "corsRules": [] + // } + // } + // }, + // { + // "type": "Microsoft.Storage/storageAccounts/fileServices", + // "apiVersion": "2019-06-01", + // "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" + // ], + // "sku": { + // "name": "Standard_GRS", + // "tier": "Standard" + // }, + // "properties": { + // "cors": { + // "corsRules": [] + // } + // } + // }, +// { +// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", +// "apiVersion": "2019-06-01", +// "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default/clientsauth')]", +// "dependsOn": [ +// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenservertablesopzrs_name'), 'default')]", +// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" +// ], +// "properties": { +// "publicAccess": "None" +// } +// }, +// { +// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", +// "apiVersion": "2019-06-01", +// "name": "[concat(parameters('storageAccounts_opwenclientblobsopzrs5_name'), '/default/compressedpackages')]", +// "dependsOn": [ +// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenclientblobsopzrs5_name'), 'default')]", +// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenclientblobsopzrs5_name'))]" +// ], +// "properties": { +// "publicAccess": "None" +// } +// }, +// { +// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", +// "apiVersion": "2019-06-01", +// "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default/emails')]", +// "dependsOn": [ +// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenserverblobsopzrs5_name'), 'default')]", +// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" +// ], +// "properties": { +// "publicAccess": "None" +// } +// }, +// { +// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", +// "apiVersion": "2019-06-01", +// "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default/mailbox')]", +// "dependsOn": [ +// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenserverblobsopzrs5_name'), 'default')]", +// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" +// ], +// "properties": { +// "publicAccess": "None" +// } +// }, +// { +// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", +// "apiVersion": "2019-06-01", +// "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default/pendingemails')]", +// "dependsOn": [ +// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenservertablesopzrs_name'), 'default')]", +// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" +// ], +// "properties": { +// "publicAccess": "None" +// } +// }, +// { +// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", +// "apiVersion": "2019-06-01", +// "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default/secrets-opwenclusterg2czekda')]", +// "dependsOn": [ +// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenserverblobsopzrs5_name'), 'default')]", +// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" +// ], +// "properties": { +// "publicAccess": "None" +// } +// }, +// { +// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", +// "apiVersion": "2019-06-01", +// "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default/sendgridinboundemails')]", +// "dependsOn": [ +// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenserverblobsopzrs5_name'), 'default')]", +// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" +// ], +// "properties": { +// "publicAccess": "None" +// } +// }, +// { +// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", +// "apiVersion": "2019-06-01", +// "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default/users')]", +// "dependsOn": [ +// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenservertablesopzrs_name'), 'default')]", +// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" +// ], +// "properties": { +// "publicAccess": "None" +// } +// } +// ] +// } \ No newline at end of file diff --git a/docker/setup/terraform/current infra/test-parameters.json b/docker/setup/terraform/current infra/test-parameters.json new file mode 100644 index 00000000..cad128dc --- /dev/null +++ b/docker/setup/terraform/current infra/test-parameters.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "namespaces_opwentest_name": { + "value": null + }, + "storageAccounts_opwentest_name": { + "value": null + } + } +} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/test-template.json b/docker/setup/terraform/current infra/test-template.json new file mode 100644 index 00000000..aea2374a --- /dev/null +++ b/docker/setup/terraform/current infra/test-template.json @@ -0,0 +1,868 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "namespaces_opwentest_name": { + "defaultValue": "opwentest", + "type": "String" + }, + "storageAccounts_opwentest_name": { + "defaultValue": "opwentest", + "type": "String" + } + }, + "variables": {}, + "resources": [ + { + "type": "Microsoft.ServiceBus/namespaces", + "apiVersion": "2018-01-01-preview", + "name": "[parameters('namespaces_opwentest_name')]", + "location": "East US", + "sku": { + "name": "Basic", + "tier": "Basic" + }, + "properties": { + "zoneRedundant": false + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2019-06-01", + "name": "[parameters('storageAccounts_opwentest_name')]", + "location": "eastus", + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "kind": "StorageV2", + "properties": { + "largeFileSharesState": "Disabled", + "networkAcls": { + "bypass": "AzureServices", + "virtualNetworkRules": [], + "ipRules": [], + "defaultAction": "Allow" + }, + "supportsHttpsTrafficOnly": true, + "encryption": { + "services": { + "file": { + "keyType": "Account", + "enabled": true + }, + "blob": { + "keyType": "Account", + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "accessTier": "Hot" + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/celery')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "rights": [ + "Manage", + "Listen", + "Send" + ] + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/RootManageSharedAccessKey')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "rights": [ + "Listen", + "Manage", + "Send" + ] + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/networkRuleSets", + "apiVersion": "2018-01-01-preview", + "name": "[concat(parameters('namespaces_opwentest_name'), '/default')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "defaultAction": "Deny", + "virtualNetworkRules": [], + "ipRules": [] + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/inbound1717960e_b271_4f42_9751_cd8b27c27e94')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/inbound73777c3d_d88e_47bb_b98a_1b952fb812ef')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/inbounde242952e_58a6_4ae0_9cbf_624273fa9dc3')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxreceived1717960e_b271_4f42_9751_cd8b27c27e94')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxreceived73777c3d_d88e_47bb_b98a_1b952fb812ef')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxreceivede242952e_58a6_4ae0_9cbf_624273fa9dc3')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxsent1717960e_b271_4f42_9751_cd8b27c27e94')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxsent73777c3d_d88e_47bb_b98a_1b952fb812ef')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxsente242952e_58a6_4ae0_9cbf_624273fa9dc3')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/register1717960e_b271_4f42_9751_cd8b27c27e94')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/register73777c3d_d88e_47bb_b98a_1b952fb812ef')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/registere242952e_58a6_4ae0_9cbf_624273fa9dc3')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/send1717960e_b271_4f42_9751_cd8b27c27e94')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/send73777c3d_d88e_47bb_b98a_1b952fb812ef')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/sende242952e_58a6_4ae0_9cbf_624273fa9dc3')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/service1717960e_b271_4f42_9751_cd8b27c27e94')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/service73777c3d_d88e_47bb_b98a_1b952fb812ef')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/servicee242952e_58a6_4ae0_9cbf_624273fa9dc3')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/written1717960e_b271_4f42_9751_cd8b27c27e94')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/written73777c3d_d88e_47bb_b98a_1b952fb812ef')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.ServiceBus/namespaces/queues", + "apiVersion": "2017-04-01", + "name": "[concat(parameters('namespaces_opwentest_name'), '/writtene242952e_58a6_4ae0_9cbf_624273fa9dc3')]", + "location": "East US", + "dependsOn": [ + "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" + ], + "properties": { + "lockDuration": "PT1M", + "maxSizeInMegabytes": 1024, + "requiresDuplicateDetection": false, + "requiresSession": false, + "defaultMessageTimeToLive": "P14D", + "deadLetteringOnMessageExpiration": false, + "enableBatchedOperations": true, + "duplicateDetectionHistoryTimeWindow": "PT10M", + "maxDeliveryCount": 10, + "status": "Active", + "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", + "enablePartitioning": false, + "enableExpress": false + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "properties": { + "cors": { + "corsRules": [] + }, + "deleteRetentionPolicy": { + "enabled": false + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts/fileServices", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "sku": { + "name": "Standard_LRS", + "tier": "Standard" + }, + "properties": { + "cors": { + "corsRules": [] + } + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/1717960e-b271-4f42-9751-cd8b27c27e94')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/4c76fe33-2a0f-4a23-b93d-6641fd20091d')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/73777c3d-d88e-47bb-b98a-1b952fb812ef')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/clientsauth1717960e-b271-4f42-9751-cd8b27c27e94')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/clientsauth73777c3d-d88e-47bb-b98a-1b952fb812ef')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/clientsauthe242952e-58a6-4ae0-9cbf-624273fa9dc3')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/compressedpackages73777c3d-d88e-47bb-b98a-1b952fb812ef')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/compressedpackagese242952e-58a6-4ae0-9cbf-624273fa9dc3')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/e242952e-58a6-4ae0-9cbf-624273fa9dc3')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/emails73777c3d-d88e-47bb-b98a-1b952fb812ef')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/emailse242952e-58a6-4ae0-9cbf-624273fa9dc3')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/mailbox73777c3d-d88e-47bb-b98a-1b952fb812ef')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/mailboxe242952e-58a6-4ae0-9cbf-624273fa9dc3')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/pendingemails73777c3d-d88e-47bb-b98a-1b952fb812ef')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/pendingemailse242952e-58a6-4ae0-9cbf-624273fa9dc3')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/sendgridinboundemails73777c3d-d88e-47bb-b98a-1b952fb812ef')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/users73777c3d-d88e-47bb-b98a-1b952fb812ef')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2019-06-01", + "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/userse242952e-58a6-4ae0-9cbf-624273fa9dc3')]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" + ], + "properties": { + "publicAccess": "None" + } + } + ] +} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/vm-parameters.json b/docker/setup/terraform/current infra/vm-parameters.json new file mode 100644 index 00000000..7b350b97 --- /dev/null +++ b/docker/setup/terraform/current infra/vm-parameters.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualMachines_opwenvm_name": { + "value": null + }, + "networkInterfaces_opwenvm763_name": { + "value": null + }, + "publicIPAddresses_opwenvm_ip_name": { + "value": null + }, + "virtualNetworks_opwenvm_vnet_name": { + "value": null + }, + "networkSecurityGroups_opwenvm_nsg_name": { + "value": null + } + } +} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/vm-template.json b/docker/setup/terraform/current infra/vm-template.json new file mode 100644 index 00000000..26aa898d --- /dev/null +++ b/docker/setup/terraform/current infra/vm-template.json @@ -0,0 +1,307 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "virtualMachines_opwenvm_name": { + "defaultValue": "opwenvm", + "type": "String" + }, + "networkInterfaces_opwenvm763_name": { + "defaultValue": "opwenvm763", + "type": "String" + }, + "publicIPAddresses_opwenvm_ip_name": { + "defaultValue": "opwenvm-ip", + "type": "String" + }, + "virtualNetworks_opwenvm_vnet_name": { + "defaultValue": "opwenvm-vnet", + "type": "String" + }, + "networkSecurityGroups_opwenvm_nsg_name": { + "defaultValue": "opwenvm-nsg", + "type": "String" + } + }, + "variables": {}, + // "resources": [ + // { + // "type": "Microsoft.Network/networkSecurityGroups", + // "apiVersion": "2020-05-01", + // "name": "[parameters('networkSecurityGroups_opwenvm_nsg_name')]", + // "location": "eastus", + // "properties": { + // "securityRules": [ + // { + // "name": "SSH", + // "properties": { + // "protocol": "TCP", + // "sourcePortRange": "*", + // "destinationPortRange": "22", + // "sourceAddressPrefix": "*", + // "destinationAddressPrefix": "*", + // "access": "Allow", + // "priority": 300, + // "direction": "Inbound", + // "sourcePortRanges": [], + // "destinationPortRanges": [], + // "sourceAddressPrefixes": [], + // "destinationAddressPrefixes": [] + // } + // }, + // { + // "name": "HTTPS", + // "properties": { + // "protocol": "TCP", + // "sourcePortRange": "*", + // "destinationPortRange": "443", + // "sourceAddressPrefix": "*", + // "destinationAddressPrefix": "*", + // "access": "Allow", + // "priority": 320, + // "direction": "Inbound", + // "sourcePortRanges": [], + // "destinationPortRanges": [], + // "sourceAddressPrefixes": [], + // "destinationAddressPrefixes": [] + // } + // }, + // { + // "name": "HTTP", + // "properties": { + // "protocol": "TCP", + // "sourcePortRange": "*", + // "destinationPortRange": "80", + // "sourceAddressPrefix": "*", + // "destinationAddressPrefix": "*", + // "access": "Allow", + // "priority": 340, + // "direction": "Inbound", + // "sourcePortRanges": [], + // "destinationPortRanges": [], + // "sourceAddressPrefixes": [], + // "destinationAddressPrefixes": [] + // } + // } + // ] + // } + // }, + // { + // "type": "Microsoft.Network/publicIPAddresses", + // "apiVersion": "2020-05-01", + // "name": "[parameters('publicIPAddresses_opwenvm_ip_name')]", + // "location": "eastus", + // "sku": { + // "name": "Basic" + // }, + // "properties": { + // "ipAddress": "20.185.45.240", + // "publicIPAddressVersion": "IPv4", + // "publicIPAllocationMethod": "Dynamic", + // "idleTimeoutInMinutes": 4, + // "dnsSettings": { + // "domainNameLabel": "opwenvm", + // "fqdn": "opwenvm.eastus.cloudapp.azure.com" + // }, + // "ipTags": [] + // } + // }, + // { + // "type": "Microsoft.Network/virtualNetworks", + // "apiVersion": "2020-05-01", + // "name": "[parameters('virtualNetworks_opwenvm_vnet_name')]", + // "location": "eastus", + // "properties": { + // "addressSpace": { + // "addressPrefixes": [ + // "10.0.0.0/24" + // ] + // }, + // "subnets": [ + // { + // "name": "default", + // "properties": { + // "addressPrefix": "10.0.0.0/24", + // "delegations": [], + // "privateEndpointNetworkPolicies": "Enabled", + // "privateLinkServiceNetworkPolicies": "Enabled" + // } + // } + // ], + // "virtualNetworkPeerings": [], + // "enableDdosProtection": false, + // "enableVmProtection": false + // } + // }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2019-07-01", + "name": "[parameters('virtualMachines_opwenvm_name')]", + "location": "eastus", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_opwenvm763_name'))]" + ], + "properties": { + // "hardwareProfile": { + // "vmSize": "Standard_D4s_v3" + // }, + // "storageProfile": { + // "imageReference": { + // "publisher": "Canonical", + // "offer": "UbuntuServer", + // "sku": "18.04-LTS", + // "version": "latest" + // }, + // "osDisk": { + // "osType": "Linux", + // "name": "[concat(parameters('virtualMachines_opwenvm_name'), '_OsDisk_1_ced0b0dbccc04536acb7743a366f2ed4')]", + // "createOption": "FromImage", + // "caching": "ReadWrite", + // "managedDisk": { + // "storageAccountType": "Premium_LRS", + // "id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_opwenvm_name'), '_OsDisk_1_ced0b0dbccc04536acb7743a366f2ed4'))]" + // }, + // "diskSizeGB": 30 + // }, + // "dataDisks": [] + // }, + // "osProfile": { + // "computerName": "[parameters('virtualMachines_opwenvm_name')]", + // "adminUsername": "opwen", + // "linuxConfiguration": { + // "disablePasswordAuthentication": false, + // "provisionVMAgent": true + // }, + // "secrets": [], + // "allowExtensionOperations": true, + // "requireGuestProvisionSignal": true + // }, + // "networkProfile": { + // "networkInterfaces": [ + // { + // "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_opwenvm763_name'))]" + // } + // ] + // } + // } + // }, + // { + // "type": "Microsoft.Network/networkSecurityGroups/securityRules", + // "apiVersion": "2020-05-01", + // "name": "[concat(parameters('networkSecurityGroups_opwenvm_nsg_name'), '/HTTP')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" + // ], + // "properties": { + // "protocol": "TCP", + // "sourcePortRange": "*", + // "destinationPortRange": "80", + // "sourceAddressPrefix": "*", + // "destinationAddressPrefix": "*", + // "access": "Allow", + // "priority": 340, + // "direction": "Inbound", + // "sourcePortRanges": [], + // "destinationPortRanges": [], + // "sourceAddressPrefixes": [], + // "destinationAddressPrefixes": [] + // } + // }, + // { + // "type": "Microsoft.Network/networkSecurityGroups/securityRules", + // "apiVersion": "2020-05-01", + // "name": "[concat(parameters('networkSecurityGroups_opwenvm_nsg_name'), '/HTTPS')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" + // ], + // "properties": { + // "protocol": "TCP", + // "sourcePortRange": "*", + // "destinationPortRange": "443", + // "sourceAddressPrefix": "*", + // "destinationAddressPrefix": "*", + // "access": "Allow", + // "priority": 320, + // "direction": "Inbound", + // "sourcePortRanges": [], + // "destinationPortRanges": [], + // "sourceAddressPrefixes": [], + // "destinationAddressPrefixes": [] + // } + // }, + // { + // "type": "Microsoft.Network/networkSecurityGroups/securityRules", + // "apiVersion": "2020-05-01", + // "name": "[concat(parameters('networkSecurityGroups_opwenvm_nsg_name'), '/SSH')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" + // ], + // "properties": { + // "protocol": "TCP", + // "sourcePortRange": "*", + // "destinationPortRange": "22", + // "sourceAddressPrefix": "*", + // "destinationAddressPrefix": "*", + // "access": "Allow", + // "priority": 300, + // "direction": "Inbound", + // "sourcePortRanges": [], + // "destinationPortRanges": [], + // "sourceAddressPrefixes": [], + // "destinationAddressPrefixes": [] + // } + // }, + // { + // "type": "Microsoft.Network/virtualNetworks/subnets", + // "apiVersion": "2020-05-01", + // "name": "[concat(parameters('virtualNetworks_opwenvm_vnet_name'), '/default')]", + // "dependsOn": [ + // "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_opwenvm_vnet_name'))]" + // ], + // "properties": { + // "addressPrefix": "10.0.0.0/24", + // "delegations": [], + // "privateEndpointNetworkPolicies": "Enabled", + // "privateLinkServiceNetworkPolicies": "Enabled" + // } + // }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2020-05-01", + "name": "[parameters('networkInterfaces_opwenvm763_name')]", + "location": "eastus", + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_opwenvm_ip_name'))]", + "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_opwenvm_vnet_name'), 'default')]", + "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" + ], + // "properties": { + // "ipConfigurations": [ + // { + // "name": "ipconfig1", + // "properties": { + // "privateIPAddress": "10.0.0.4", + // "privateIPAllocationMethod": "Dynamic", + // "publicIPAddress": { + // "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_opwenvm_ip_name'))]" + // }, + // "subnet": { + // "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_opwenvm_vnet_name'), 'default')]" + // }, + // "primary": true, + // "privateIPAddressVersion": "IPv4" + // } + // } + // ], + "dnsSettings": { + "dnsServers": [] + }, + "enableAcceleratedNetworking": true, + "enableIPForwarding": false, + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" + } + } + } + ] +} \ No newline at end of file diff --git a/docker/setup/terraform/lokole_azure.tf b/docker/setup/terraform/lokole_azure.tf new file mode 100644 index 00000000..e6fa32a5 --- /dev/null +++ b/docker/setup/terraform/lokole_azure.tf @@ -0,0 +1,535 @@ +#TODO: +# [X] - Configure VM +# [] - Configure Opwen Data +# [] - Configure Opwen Server +# [] - Configure Opwen Test +# [] - Configure dashboards +# [] - Verify depends_on aren't necessary. See celery in arm.tempalte.json. +# [] - Delete tags = {} if not necessary + + +# Configure the Microsoft Azure Provider +provider "azurerm" { + # The "feature" block is required for AzureRM provider 2.x. + # If you're using version 1.x, the "features" block is not allowed. + version = "~>2.0" + + features {} +} + +# ------------------------------ +# Server Resource Group +# ------------------------------ + +# Create the server resource group if it doesn't exist +resource "azurerm_resource_group" "server" { + name = "${var.RESOURCE_GROUP_NAME}server" + location = var.location + + tags = {} +} + +# ------------------------------ +# Data Resource Group +# ------------------------------ + +# Create a data resource group if it doesn't exist +resource "azurerm_resource_group" "data" { + name = "${var.RESOURCE_GROUP_NAME}data" + location = var.location + + tags = {} +} + +#TODO: data-template.json indicates encryption, cannot find on terraform. +# Create server table storage account if it doesn't exist +resource "azurerm_storage_account" "serverTablesName" { + name = var.serverTablesName + resource_group_name = azurerm_resource_group.data.name + location = azurerm_resource_group.data.location + account_kind = "Storage" + account_tier = "Standard" + account_replication_type = "GRS" + allow_blob_public_access = true + enable_https_traffic_only = false + + network_rules { + default_action = "Allow" + bypass = ["AzureServices"] + ip_rules = [] + } + + tags = {} +} + +# Create server blob storage account if it doesn't exist +resource "azurerm_storage_account" "serverBlobsName" { + name = var.serverBlobsName + resource_group_name = azurerm_resource_group.data.name + location = azurerm_resource_group.data.location + account_kind = "Storage" + account_tier = "Standard" + account_replication_type = "GRS" + allow_blob_public_access = true + enable_https_traffic_only = false + + network_rules { + default_action = "Allow" + bypass = ["AzureServices"] + ip_rules = [] + } + + tags = {} +} + +# Create client blob storage account if it doesn't exist +resource "azurerm_storage_account" "clientBlobsName" { + name = var.clientBlobsName + resource_group_name = azurerm_resource_group.data.name + location = azurerm_resource_group.data.location + account_kind = "Storage" + account_tier = "Standard" + account_replication_type = "GRS" + allow_blob_public_access = true + enable_https_traffic_only = false + + network_rules { + default_action = "Allow" + bypass = ["AzureServices"] + ip_rules = [] + } + + tags = {} +} + +resource "azurerm_storage_container" "clientsauth" { + name = "clientsauth" + storage_account_name = azurerm_storage_account.serverTablesName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "pendingemails" { + name = "pendingemails" + storage_account_name = azurerm_storage_account.serverTablesName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "users" { + name = "users" + storage_account_name = azurerm_storage_account.serverTablesName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "emails" { + name = "emails" + storage_account_name = azurerm_storage_account.serverBlobsName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "mailbox" { + name = "mailbox" + storage_account_name = azurerm_storage_account.serverBlobsName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "secretsopwencluster" { + name = "secretsopwencluster" + storage_account_name = azurerm_storage_account.serverBlobsName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "sendgridinboundemails" { + name = "sendgridinboundemails" + storage_account_name = azurerm_storage_account.serverBlobsName.name + container_access_type = "private" +} + +resource "azurerm_storage_container" "compressedpackages" { + name = "compressedpackages" + storage_account_name = azurerm_storage_account.clientBlobsName.name + container_access_type = "private" +} + +# Create a server queue if it doesn't exist +resource "azurerm_servicebus_namespace" "data" { + name = var.serverQueuesName + location = azurerm_resource_group.data.location + resource_group_name = azurerm_resource_group.data.name + sku = "Standard" + zone_redundant = false +} + +resource "azurerm_servicebus_namespace_authorization_rule" "data" { + name = var.serverQueuesSasName + namespace_name = azurerm_servicebus_namespace.data.name + resource_group_name = azurerm_resource_group.data.name + send = true + listen = true + manage = true +} + +#! Verify if this one is created automatically +# resource "azurerm_servicebus_namespace_authorization_rule" "data" { +# name = "RootManageSharedAccessKey" +# namespace_name = "${azurerm_servicebus_namespace.data.name}" +# resource_group_name = "${azurerm_resource_group.data.name}" +# send = true +# listen = true +# manage = true +# } + +#! Verify if this one is created automatically +# resource "azurerm_servicebus_topic" "data" { +# name = "${var.RESOURCE_GROUP_NAME}-sbtopic" +# resource_group_name = "${azurerm_resource_group.data.name}" +# namespace_name = "${azurerm_servicebus_namespace.data.name}" +# enable_partitioning = true +# } + +#! Verify if this one is created automatically +# resource "azurerm_servicebus_subscription" "data" { +# name = "${var.RESOURCE_GROUP_NAME}-sbsubscription" +# resource_group_name = "${azurerm_resource_group.data.name}" +# namespace_name = "${azurerm_servicebus_namespace.data.name}" +# topic_name = "${azurerm_servicebus_topic.data.name}" +# max_delivery_count = 1 +# } + +resource "azurerm_servicebus_queue" "serverQueueSendgridMime" { + name = var.serverQueueSendgridMime + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 5120 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "serverQueueEmailSend" { + name = var.serverQueueEmailSend + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 5120 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "serverQueueClientPackage" { + name = var.serverQueueClientPackage + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 5120 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +#! Verify these Queue items aren't populated automatically. It seems they are. +#! https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions +resource "azurerm_servicebus_queue" "mailboxreceived" { + name = "mailboxreceived" + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 1024 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "mailboxsent" { + name = "mailboxsent" + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 1024 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "register" { + name = "register" + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 1024 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +resource "azurerm_servicebus_queue" "service" { + name = "service" + resource_group_name = azurerm_resource_group.data.name + namespace_name = azurerm_servicebus_namespace.data.name + max_size_in_megabytes = 1024 + + # Optional Values + lock_duration = "PT1M" + requires_duplicate_detection = false + requires_session = false + default_message_ttl = "P14D" + dead_lettering_on_message_expiration = false + duplicate_detection_history_time_window = "PT10M" + max_delivery_count = 10 + status = "Active" + enable_partitioning = false + enable_express = false +} + +# ------------------------------ +# Test Resource Group +# ------------------------------ + +# Create a resource group if it doesn't exist +resource "azurerm_resource_group" "test" { + name = "${var.RESOURCE_GROUP_NAME}test" + location = var.location + + tags = {} +} + +# ------------------------------ +# Virtual Machine Resource Group +# ------------------------------ + +# Create a resource group if it doesn't exist +resource "azurerm_resource_group" "vm" { + name = var.vmName + location = var.location + + tags = {} +} + +#! Current infra uses port 24 on vnet, azure docs indicate to use 16 and 24 on subnet +# https://docs.microsoft.com/en-us/azure/developer/terraform/create-linux-virtual-machine-with-infrastructure +# Create virtual network +resource "azurerm_virtual_network" "vm" { + name = "vm-vnet" + location = var.location + resource_group_name = azurerm_resource_group.vm.name + address_space = ["10.0.0.0/16"] + + # subnet { + # name = "subnet1" + # address_prefix = "10.0.1.0/24" + # } + + tags = {} +} + +#! Verify address prefix. Current infra has "10.0.0.0/24" which is the same as primary +resource "azurerm_subnet" "vmsubnet" { + name = "vmsubnet" + resource_group_name = azurerm_resource_group.vm.name + virtual_network_name = azurerm_virtual_network.vm.name + address_prefix = "10.0.2.0/24" +} + +# Create public IPs +resource "azurerm_public_ip" "vm" { + name = "vm-ip" + location = var.location + resource_group_name = azurerm_resource_group.vm.name + allocation_method = "Dynamic" + sku = "Basic" + ip_version = "IPv4" + domain_name_label = "opwenvmtest" + #! Verify if this is necessary + #reverse_fqdn = "opwenvmtest.${var.location}.cloudapp.azure.com" + idle_timeout_in_minutes = 4 + + tags = {} +} + +# Create Network Security Group and rule +resource "azurerm_network_security_group" "vm" { + name = "vm-nsg" + location = var.location + resource_group_name = azurerm_resource_group.vm.name + + security_rule { + name = "SSH" + priority = 300 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "22" + source_address_prefix = "*" + destination_address_prefix = "*" + } + security_rule { + name = "HTTPS" + priority = 320 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "443" + source_address_prefix = "*" + destination_address_prefix = "*" + } + security_rule { + name = "HTTP" + priority = 340 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "80" + source_address_prefix = "*" + destination_address_prefix = "*" + } + # TODO: Add other security rules + # Inbound: HTTPS / HTTP / AllowVnetInbound / AllowAzureLoadBalancerInBound / DenyAllInBound + # Outbound: AllowVnetOutBound / AllowInternetOutBound / DenyAllOutBound + + tags = {} +} + +# Create network interface +# https://www.terraform.io/docs/providers/azurerm/r/network_interface.html +resource "azurerm_network_interface" "vm" { + name = "vm-nic" + location = var.location + resource_group_name = azurerm_resource_group.vm.name + + ip_configuration { + name = "vm-nicConfiguration" + private_ip_address_allocation = "Dynamic" + public_ip_address_id = azurerm_public_ip.vm.id + subnet_id = azurerm_subnet.vmsubnet.id + primary = true + } + + tags = {} +} + +# Connect the security group to the network interface +resource "azurerm_network_interface_security_group_association" "vm" { + network_interface_id = azurerm_network_interface.vm.id + network_security_group_id = azurerm_network_security_group.vm.id +} + +# Generate random text for a unique storage account name +resource "random_id" "randomId" { + keepers = { + # Generate a new ID only when a new resource group is defined + resource_group = azurerm_resource_group.vm.name + } + + byte_length = 8 +} + +#! Verify whether this is necessary +# Create storage account for boot diagnostics +resource "azurerm_storage_account" "vm" { + name = "diag${random_id.randomId.hex}" + resource_group_name = azurerm_resource_group.vm.name + location = var.location + account_tier = "Standard" + account_replication_type = "LRS" + + tags = {} +} + +# Create (and display) an SSH key +resource "tls_private_key" "vm" { + algorithm = "RSA" + rsa_bits = 4096 +} +output "tls_private_key" { value = tls_private_key.vm.private_key_pem } + +# Create virtual machine +resource "azurerm_linux_virtual_machine" "vm" { + name = "vm" + location = var.location + resource_group_name = azurerm_resource_group.vm.name + network_interface_ids = [azurerm_network_interface.vm.id] + size = "Standard_D4s_v3" + provision_vm_agent = true + + os_disk { + name = "vm-disk" + caching = "ReadWrite" + storage_account_type = "Premium_LRS" + # disk_size must exceed that of the image of the vm if declared explicitly. + # disk_size_gb = 30 + } + + source_image_reference { + publisher = "Canonical" + offer = "UbuntuServer" + sku = "18.04-LTS" + version = "latest" + } + + admin_username = var.RESOURCE_GROUP_NAME + disable_password_authentication = true + allow_extension_operations = true + + admin_ssh_key { + username = var.RESOURCE_GROUP_NAME + public_key = tls_private_key.vm.public_key_openssh + } + + boot_diagnostics { + storage_account_uri = azurerm_storage_account.vm.primary_blob_endpoint + } + + tags = {} +} \ No newline at end of file diff --git a/docker/setup/terraform/outputs.tf b/docker/setup/terraform/outputs.tf new file mode 100644 index 00000000..0930548f --- /dev/null +++ b/docker/setup/terraform/outputs.tf @@ -0,0 +1,55 @@ +#TODO: Ensure all outputs match TF format. setup.sh outputs found below. +/* +output "Namespace Connection String" { + value = "${azurerm_servicebus_namespace.example.default_primary_connection_string}" +} + +output "Shared Access Policy PrimaryKey" { + value = "${azurerm_servicebus_namespace.example.default_primary_key}" +} +*/ + +# "appinsightsName": { +# "type": "string", +# "value": "[variables('appinsightsName')]" +# }, +# "appinsightsKey": { +# "type": "string", +# "value": "[reference(resourceId('Microsoft.Insights/components', variables('appinsightsName')), '2014-04-01').InstrumentationKey]" +# }, +# "clientBlobsName": { +# "type": "string", +# "value": "[variables('clientBlobsName')]" +# }, +# "clientBlobsKey": { +# "type": "string", +# "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clientBlobsName')), '2016-01-01').keys[0].value]" +# }, +# "serverBlobsName": { +# "type": "string", +# "value": "[variables('serverBlobsName')]" +# }, +# "serverBlobsKey": { +# "type": "string", +# "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('serverBlobsName')), '2016-01-01').keys[0].value]" +# }, +# "serverTablesName": { +# "type": "string", +# "value": "[variables('serverTablesName')]" +# }, +# "serverTablesKey": { +# "type": "string", +# "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('serverTablesName')), '2016-01-01').keys[0].value]" +# }, +# "serverQueuesName": { +# "type": "string", +# "value": "[variables('serverQueuesName')]" +# }, +# "serverQueuesSasName": { +# "type": "string", +# "value": "[variables('serverQueuesSasName')]" +# }, +# "serverQueuesSasKey": { +# "type": "string", +# "value": "[listKeys(resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', variables('serverQueuesName'), variables('serverQueuesSasName')), '2017-04-01').primaryKey]" +# } \ No newline at end of file diff --git a/docker/setup/terraform/terraform.tfvars b/docker/setup/terraform/terraform.tfvars new file mode 100644 index 00000000..85cd8aa9 --- /dev/null +++ b/docker/setup/terraform/terraform.tfvars @@ -0,0 +1,15 @@ +#TODO Using this as an example of the possibility. Given we populate from a docker-compose command, +# I don't know if this will be super useful for us, vice utilising the Default values found in variables.tf +# See: https://learn.hashicorp.com/tutorials/terraform/azure-variables +RESOURCE_GROUP_NAME = "opwen" +vmName = "opwenvm" +appinsightsName = "opwenlogs" +clientBlobsName = "opwenclient" +serverBlobsName = "opwenserverblobs" +serverTablesName = "opwenservertables" +serverQueuesName = "opwenserverqueues" +serverQueuesSasName = "celery" +serverQueueSendgridMime = "inbound" +serverQueueClientPackage = "written" +serverQueueEmailSend = "send" +location = "eastus" \ No newline at end of file diff --git a/docker/setup/terraform/variables.tf b/docker/setup/terraform/variables.tf new file mode 100644 index 00000000..883f4a4d --- /dev/null +++ b/docker/setup/terraform/variables.tf @@ -0,0 +1,81 @@ +variable "RESOURCE_GROUP_NAME" { + type = string + default = "opwenTest" + description = "The prefix which should be used for all resources in this application." +} + +# variable "SUBSCRIPTION_ID" { +# type = string +# description = "Lorum ipsum doler." +# } + +# variable "client_id" { +# type = string +# description = "Lorum ipsum doler." +# } + +# variable "SP_PASSWORD" { +# type = string +# description = "Lorum ipsum doler." +# } + +# variable "SP_TENANT" { +# type = string +# description = "Lorum ipsum doler." +# } + +variable "location" { + type = string + default = "eastus" + description = "The Azure Region in which all resources in this example should be created." +} + +variable "vmName" { + type = string + default = "opwenvm" +} + +variable "appinsightsName" { + type = string + default = "opwenlogs" +} + +variable "clientBlobsName" { + type = string + default = "opwenclient" +} + +variable "serverBlobsName" { + type = string + default = "opwenserverblobs" +} + +variable "serverTablesName" { + type = string + default = "opwenservertables" +} + +variable "serverQueuesName" { + type = string + default = "opwenserverqueues" +} + +variable "serverQueuesSasName" { + type = string + default = "celery" +} + +variable "serverQueueSendgridMime" { + type = string + default = "inbound" +} + +variable "serverQueueClientPackage" { + type = string + default = "written" +} + +variable "serverQueueEmailSend" { + type = string + default = "send" +} \ No newline at end of file From 35ff247f8d76690c91c4f78f4abc6c9e68ff4630 Mon Sep 17 00:00:00 2001 From: Shaun B Date: Thu, 13 Aug 2020 12:46:36 -0700 Subject: [PATCH 06/21] Update formatting, Update variables --- docker/setup/terraform/02_data_rg.tf | 49 ++++++++++------------ docker/setup/terraform/06_dashboards_rg.tf | 11 +++++ docker/setup/terraform/variables.tf | 7 +++- 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/docker/setup/terraform/02_data_rg.tf b/docker/setup/terraform/02_data_rg.tf index cfef780f..dc1919e7 100644 --- a/docker/setup/terraform/02_data_rg.tf +++ b/docker/setup/terraform/02_data_rg.tf @@ -20,10 +20,9 @@ resource "random_id" "randomId" { byte_length = 8 } -#TODO: data-template.json indicates encryption, cannot find on terraform. # Create server table storage account if it doesn't exist resource "azurerm_storage_account" "serverTablesName" { - name = var.serverTablesName + name = "${var.serverTablesName}${random_id.randomId.hex}" resource_group_name = azurerm_resource_group.data.name location = azurerm_resource_group.data.location account_kind = "Storage" @@ -34,8 +33,8 @@ resource "azurerm_storage_account" "serverTablesName" { network_rules { default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] + bypass = ["AzureServices"] + ip_rules = [] } tags = {} @@ -43,7 +42,7 @@ resource "azurerm_storage_account" "serverTablesName" { # Create server blob storage account if it doesn't exist resource "azurerm_storage_account" "serverBlobsName" { - name = var.serverBlobsName + name = "${var.serverBlobsName}${random_id.randomId.hex}" resource_group_name = azurerm_resource_group.data.name location = azurerm_resource_group.data.location account_kind = "Storage" @@ -54,8 +53,8 @@ resource "azurerm_storage_account" "serverBlobsName" { network_rules { default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] + bypass = ["AzureServices"] + ip_rules = [] } tags = {} @@ -63,7 +62,7 @@ resource "azurerm_storage_account" "serverBlobsName" { # Create client blob storage account if it doesn't exist resource "azurerm_storage_account" "clientBlobsName" { - name = var.clientBlobsName + name = "${var.clientBlobsName}${random_id.randomId.hex}" resource_group_name = azurerm_resource_group.data.name location = azurerm_resource_group.data.location account_kind = "Storage" @@ -74,8 +73,8 @@ resource "azurerm_storage_account" "clientBlobsName" { network_rules { default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] + bypass = ["AzureServices"] + ip_rules = [] } tags = {} @@ -182,13 +181,13 @@ resource "azurerm_servicebus_queue" "serverQueueSendgridMime" { # Optional Values lock_duration = "PT1M" - requires_duplicate_detection = false + requires_duplicate_detection = false requires_session = false default_message_ttl = "P14D" dead_lettering_on_message_expiration = false duplicate_detection_history_time_window = "PT10M" max_delivery_count = 10 - status = "Active" + status = "Active" enable_partitioning = false enable_express = false } @@ -201,13 +200,13 @@ resource "azurerm_servicebus_queue" "serverQueueEmailSend" { # Optional Values lock_duration = "PT1M" - requires_duplicate_detection = false + requires_duplicate_detection = false requires_session = false default_message_ttl = "P14D" dead_lettering_on_message_expiration = false duplicate_detection_history_time_window = "PT10M" max_delivery_count = 10 - status = "Active" + status = "Active" enable_partitioning = false enable_express = false } @@ -220,19 +219,17 @@ resource "azurerm_servicebus_queue" "serverQueueClientPackage" { # Optional Values lock_duration = "PT1M" - requires_duplicate_detection = false + requires_duplicate_detection = false requires_session = false default_message_ttl = "P14D" dead_lettering_on_message_expiration = false duplicate_detection_history_time_window = "PT10M" max_delivery_count = 10 - status = "Active" + status = "Active" enable_partitioning = false enable_express = false } -#! Verify these Queue items aren't populated automatically. It seems they are. -#! https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions resource "azurerm_servicebus_queue" "mailboxreceived" { name = "mailboxreceived" resource_group_name = azurerm_resource_group.data.name @@ -241,13 +238,13 @@ resource "azurerm_servicebus_queue" "mailboxreceived" { # Optional Values lock_duration = "PT1M" - requires_duplicate_detection = false + requires_duplicate_detection = false requires_session = false default_message_ttl = "P14D" dead_lettering_on_message_expiration = false duplicate_detection_history_time_window = "PT10M" max_delivery_count = 10 - status = "Active" + status = "Active" enable_partitioning = false enable_express = false } @@ -260,13 +257,13 @@ resource "azurerm_servicebus_queue" "mailboxsent" { # Optional Values lock_duration = "PT1M" - requires_duplicate_detection = false + requires_duplicate_detection = false requires_session = false default_message_ttl = "P14D" dead_lettering_on_message_expiration = false duplicate_detection_history_time_window = "PT10M" max_delivery_count = 10 - status = "Active" + status = "Active" enable_partitioning = false enable_express = false } @@ -279,13 +276,13 @@ resource "azurerm_servicebus_queue" "register" { # Optional Values lock_duration = "PT1M" - requires_duplicate_detection = false + requires_duplicate_detection = false requires_session = false default_message_ttl = "P14D" dead_lettering_on_message_expiration = false duplicate_detection_history_time_window = "PT10M" max_delivery_count = 10 - status = "Active" + status = "Active" enable_partitioning = false enable_express = false } @@ -298,13 +295,13 @@ resource "azurerm_servicebus_queue" "service" { # Optional Values lock_duration = "PT1M" - requires_duplicate_detection = false + requires_duplicate_detection = false requires_session = false default_message_ttl = "P14D" dead_lettering_on_message_expiration = false duplicate_detection_history_time_window = "PT10M" max_delivery_count = 10 - status = "Active" + status = "Active" enable_partitioning = false enable_express = false } diff --git a/docker/setup/terraform/06_dashboards_rg.tf b/docker/setup/terraform/06_dashboards_rg.tf index e69de29b..030c3897 100644 --- a/docker/setup/terraform/06_dashboards_rg.tf +++ b/docker/setup/terraform/06_dashboards_rg.tf @@ -0,0 +1,11 @@ +# ------------------------------ +# Dashboards Resource Group +# ------------------------------ + +# Create a resource group if it doesn't exist +resource "azurerm_resource_group" "dashboards" { + name = "dashboards" + location = var.location + + tags = {} +} \ No newline at end of file diff --git a/docker/setup/terraform/variables.tf b/docker/setup/terraform/variables.tf index 883f4a4d..bd06ab2e 100644 --- a/docker/setup/terraform/variables.tf +++ b/docker/setup/terraform/variables.tf @@ -1,6 +1,6 @@ variable "RESOURCE_GROUP_NAME" { type = string - default = "opwenTest" + default = "opwen" description = "The prefix which should be used for all resources in this application." } @@ -33,6 +33,7 @@ variable "location" { variable "vmName" { type = string default = "opwenvm" + description = "The name of Virtual Machine resource group." } variable "appinsightsName" { @@ -43,21 +44,25 @@ variable "appinsightsName" { variable "clientBlobsName" { type = string default = "opwenclient" + description = "The name of the client Blobs storage account within the Data resource group." } variable "serverBlobsName" { type = string default = "opwenserverblobs" + description = "The name of the server Blobs storage account within the Data resource group." } variable "serverTablesName" { type = string default = "opwenservertables" + description = "The name of the server Tables storage account within the Data resource group." } variable "serverQueuesName" { type = string default = "opwenserverqueues" + description = "The name of the server Queues Service Bus Namespace within the Data resource group." } variable "serverQueuesSasName" { From 0a1dfc3c382628b77112bc2def9f8eb2b9e63867 Mon Sep 17 00:00:00 2001 From: Shaun B Date: Thu, 13 Aug 2020 13:09:04 -0700 Subject: [PATCH 07/21] Update random_id generator --- docker/setup/terraform/02_data_rg.tf | 2 +- docker/setup/terraform/04_vm_rg.tf | 4 +- .../current infra/dashboard-parameters.json | 39 - .../current infra/dashboard-template.json | 2049 ----------------- .../current infra/data-parameters.json | 18 - .../current infra/data-template.json | 558 ----- .../current infra/test-parameters.json | 12 - .../current infra/test-template.json | 868 ------- .../current infra/vm-parameters.json | 21 - .../terraform/current infra/vm-template.json | 307 --- docker/setup/terraform/lokole_azure.tf | 535 ----- 11 files changed, 3 insertions(+), 4410 deletions(-) delete mode 100644 docker/setup/terraform/current infra/dashboard-parameters.json delete mode 100644 docker/setup/terraform/current infra/dashboard-template.json delete mode 100644 docker/setup/terraform/current infra/data-parameters.json delete mode 100644 docker/setup/terraform/current infra/data-template.json delete mode 100644 docker/setup/terraform/current infra/test-parameters.json delete mode 100644 docker/setup/terraform/current infra/test-template.json delete mode 100644 docker/setup/terraform/current infra/vm-parameters.json delete mode 100644 docker/setup/terraform/current infra/vm-template.json delete mode 100644 docker/setup/terraform/lokole_azure.tf diff --git a/docker/setup/terraform/02_data_rg.tf b/docker/setup/terraform/02_data_rg.tf index dc1919e7..800f24e8 100644 --- a/docker/setup/terraform/02_data_rg.tf +++ b/docker/setup/terraform/02_data_rg.tf @@ -17,7 +17,7 @@ resource "random_id" "randomId" { resource_group = azurerm_resource_group.vm.name } - byte_length = 8 + byte_length = 3 } # Create server table storage account if it doesn't exist diff --git a/docker/setup/terraform/04_vm_rg.tf b/docker/setup/terraform/04_vm_rg.tf index 4d6262ee..1508be85 100644 --- a/docker/setup/terraform/04_vm_rg.tf +++ b/docker/setup/terraform/04_vm_rg.tf @@ -116,7 +116,7 @@ resource "azurerm_network_interface_security_group_association" "vm" { } # Generate random text for a unique storage account name -resource "random_id" "randomId" { +resource "random_id" "randomVmId" { keepers = { # Generate a new ID only when a new resource group is defined resource_group = azurerm_resource_group.vm.name @@ -128,7 +128,7 @@ resource "random_id" "randomId" { #! Verify whether this is necessary # Create storage account for boot diagnostics resource "azurerm_storage_account" "vm" { - name = "diag${random_id.randomId.hex}" + name = "diag${random_id.randomVmId.hex}" location = azurerm_resource_group.vm.location resource_group_name = azurerm_resource_group.vm.name account_tier = "Standard" diff --git a/docker/setup/terraform/current infra/dashboard-parameters.json b/docker/setup/terraform/current infra/dashboard-parameters.json deleted file mode 100644 index d7cda4e3..00000000 --- a/docker/setup/terraform/current infra/dashboard-parameters.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "metricAlerts_opwenserver_exceptions_description": { - "value": null - }, - "actionGroups_Migration_AG1_name": { - "value": null - }, - "actionGroups_Migration_AG2_name": { - "value": null - }, - "actionGroups_Migration_AG3_name": { - "value": null - }, - "components_opwenlogsopzrs57fzm73k_name": { - "value": null - }, - "metricAlerts_opwenserver_exceptions_name": { - "value": null - }, - "actionGroups_Exceptions_in_opwen_cloudserver_name": { - "value": null - }, - "dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name": { - "value": null - }, - "dashboards_e2253a02_3cff_471e_881c_fd5de37bc557_dashboard_name": { - "value": null - }, - "smartdetectoralertrules_failure_anomalies___opwenlogsopzrs57fzm73k_name": { - "value": null - }, - "virtualMachines_opwenvm_externalid": { - "value": null - } - } -} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/dashboard-template.json b/docker/setup/terraform/current infra/dashboard-template.json deleted file mode 100644 index 2817f6b4..00000000 --- a/docker/setup/terraform/current infra/dashboard-template.json +++ /dev/null @@ -1,2049 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "metricAlerts_opwenserver_exceptions_description": { - "type": "SecureString" - }, - "actionGroups_Migration_AG1_name": { - "defaultValue": "Migration_AG1", - "type": "String" - }, - "actionGroups_Migration_AG2_name": { - "defaultValue": "Migration_AG2", - "type": "String" - }, - "actionGroups_Migration_AG3_name": { - "defaultValue": "Migration_AG3", - "type": "String" - }, - "components_opwenlogsopzrs57fzm73k_name": { - "defaultValue": "opwenlogsopzrs57fzm73k", - "type": "String" - }, - "metricAlerts_opwenserver_exceptions_name": { - "defaultValue": "opwenserver-exceptions", - "type": "String" - }, - "actionGroups_Exceptions_in_opwen_cloudserver_name": { - "defaultValue": "Exceptions in opwen-cloudserver", - "type": "String" - }, - "dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name": { - "defaultValue": "9acf2952-ca98-426a-b17d-48e31e534483", - "type": "String" - }, - "dashboards_e2253a02_3cff_471e_881c_fd5de37bc557_dashboard_name": { - "defaultValue": "e2253a02-3cff-471e-881c-fd5de37bc557-dashboard", - "type": "String" - }, - "smartdetectoralertrules_failure_anomalies___opwenlogsopzrs57fzm73k_name": { - "defaultValue": "failure anomalies - opwenlogsopzrs57fzm73k", - "type": "String" - }, - "virtualMachines_opwenvm_externalid": { - "defaultValue": "/subscriptions/7251246a-f6e5-4759-a1a1-4dc4a730ee4d/resourceGroups/opwenvm/providers/Microsoft.Compute/virtualMachines/opwenvm", - "type": "String" - } - }, - "variables": {}, - "resources": [ - { - "type": "microsoft.insights/actionGroups", - "apiVersion": "2019-03-01", - "name": "[parameters('actionGroups_Exceptions_in_opwen_cloudserver_name')]", - "location": "Global", - "properties": { - "groupShortName": "exceptions", - "enabled": true, - "emailReceivers": [ - { - "name": "Send email_-EmailAction-", - "emailAddress": "clemens.wolff+ascoderualerts@gmail.com", - "useCommonAlertSchema": true - } - ], - "smsReceivers": [], - "webhookReceivers": [], - "itsmReceivers": [], - "azureAppPushReceivers": [], - "automationRunbookReceivers": [], - "voiceReceivers": [], - "logicAppReceivers": [], - "azureFunctionReceivers": [] - } - }, - { - "type": "microsoft.insights/actionGroups", - "apiVersion": "2019-03-01", - "name": "[parameters('actionGroups_Migration_AG1_name')]", - "location": "Global", - "properties": { - "groupShortName": "Migrated1", - "enabled": true, - "emailReceivers": [], - "smsReceivers": [], - "webhookReceivers": [], - "itsmReceivers": [], - "azureAppPushReceivers": [], - "automationRunbookReceivers": [], - "voiceReceivers": [], - "logicAppReceivers": [], - "azureFunctionReceivers": [] - } - }, - { - "type": "microsoft.insights/actionGroups", - "apiVersion": "2019-03-01", - "name": "[parameters('actionGroups_Migration_AG2_name')]", - "location": "Global", - "properties": { - "groupShortName": "Migrated2", - "enabled": true, - "emailReceivers": [ - { - "name": "emailId_1", - "emailAddress": "ascoderu.opwen@gmail.com", - "useCommonAlertSchema": false - }, - { - "name": "emailId_2", - "emailAddress": "clemens.wolff@gmail.com", - "useCommonAlertSchema": false - } - ], - "smsReceivers": [], - "webhookReceivers": [], - "itsmReceivers": [], - "azureAppPushReceivers": [], - "automationRunbookReceivers": [], - "voiceReceivers": [], - "logicAppReceivers": [], - "azureFunctionReceivers": [] - } - }, - { - "type": "microsoft.insights/actionGroups", - "apiVersion": "2019-03-01", - "name": "[parameters('actionGroups_Migration_AG3_name')]", - "location": "Global", - "properties": { - "groupShortName": "Migrated3", - "enabled": true, - "emailReceivers": [], - "smsReceivers": [], - "webhookReceivers": [], - "itsmReceivers": [], - "azureAppPushReceivers": [], - "automationRunbookReceivers": [], - "voiceReceivers": [], - "logicAppReceivers": [], - "azureFunctionReceivers": [] - } - }, - { - "type": "microsoft.insights/components", - "apiVersion": "2018-05-01-preview", - "name": "[parameters('components_opwenlogsopzrs57fzm73k_name')]", - "location": "eastus", - "kind": "other", - "properties": { - "Application_Type": "web", - "RetentionInDays": 90, - "publicNetworkAccessForIngestion": "Enabled", - "publicNetworkAccessForQuery": "Enabled" - } - }, - { - "type": "Microsoft.Portal/dashboards", - "apiVersion": "2019-01-01-preview", - "name": "[parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name')]", - "location": "eastus", - "dependsOn": [ - "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - ], - "tags": { - "hidden-title": "Analytics" - }, - "properties": { - "lenses": { - "0": { - "order": 0, - "parts": { - "0": { - "position": { - "x": 0, - "y": 0, - "rowSpan": 3, - "colSpan": 6 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards", - "Name": "opwenlogsopzrs57fzm73k", - "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - } - }, - { - "name": "Query", - "value": "customEvents\n| where name == \"email_delivered_from_client\"\n| extend dayOfYear = timestamp\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\n| extend domains = tostring(customDimensions.domain)\n| summarize count() by days, domains, dayOfYear\n| order by dayOfYear asc \n| project-away dayOfYear \n| project-rename total_email_delivered_from_client = count_ \n| render barchart kind=unstacked\n" - }, - { - "name": "TimeRange", - "value": "P1D" - }, - { - "name": "Dimensions", - "value": { - "xAxis": { - "name": "days", - "type": "String" - }, - "yAxis": [ - { - "name": "total_email_delivered_from_client", - "type": "Int64" - } - ], - "splitBy": [ - { - "name": "domains", - "type": "String" - } - ], - "aggregation": "Sum" - } - }, - { - "name": "Version", - "value": "1.0" - }, - { - "name": "DashboardId", - "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" - }, - { - "name": "PartId", - "value": "c16be6ed-991f-41a1-a612-9db779762654" - }, - { - "name": "PartTitle", - "value": "Analytics" - }, - { - "name": "PartSubTitle", - "value": "opwenlogsopzrs57fzm73k" - }, - { - "name": "resourceTypeMode", - "value": "components" - }, - { - "name": "ControlType", - "value": "AnalyticsChart" - }, - { - "name": "SpecificChart", - "value": "GroupedBar" - } - ], - "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", - "settings": {}, - "asset": {} - } - }, - "1": { - "position": { - "x": 7, - "y": 0, - "rowSpan": 3, - "colSpan": 6 - }, - "metadata": { - "inputs": [ - { - "name": "sharedTimeRange", - "isOptional": true - }, - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[parameters('virtualMachines_opwenvm_externalid')]" - }, - "name": "Percentage CPU", - "aggregationType": 4, - "metricVisualization": { - "displayName": "Percentage CPU", - "resourceDisplayName": "opwenvm" - } - } - ], - "title": "CPU (average)", - "titleKind": 2, - "visualization": { - "chartType": 2 - }, - "openBladeOnClick": { - "openBlade": true - } - } - }, - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {}, - "filters": {} - } - }, - "2": { - "position": { - "x": 14, - "y": 0, - "rowSpan": 6, - "colSpan": 6 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards", - "Name": "opwenlogsopzrs57fzm73k", - "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - } - }, - { - "name": "Query", - "value": "exceptions\r\n| extend dayOfYear = timestamp\r\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\r\n| extend domains = tostring(customDimensions.domain)\r\n| summarize count() by days, domains, dayOfYear\r\n| order by dayOfYear asc\r\n| project-rename exceptions = count_ \r\n| render barchart kind=unstacked\r\n" - }, - { - "name": "TimeRange", - "value": "P7D" - }, - { - "name": "Dimensions", - "value": { - "xAxis": { - "name": "dayOfYear", - "type": "DateTime" - }, - "yAxis": [ - { - "name": "exceptions", - "type": "Int64" - } - ], - "splitBy": [ - { - "name": "days", - "type": "String" - } - ], - "aggregation": "Sum" - } - }, - { - "name": "Version", - "value": "1.0" - }, - { - "name": "DashboardId", - "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" - }, - { - "name": "PartId", - "value": "4d781d53-1c6f-4768-9534-9f19a9ffb5a3" - }, - { - "name": "PartTitle", - "value": "Analytics" - }, - { - "name": "PartSubTitle", - "value": "opwenlogsopzrs57fzm73k" - }, - { - "name": "resourceTypeMode", - "value": "components" - }, - { - "name": "ControlType", - "value": "AnalyticsChart" - }, - { - "name": "SpecificChart", - "value": "GroupedBar" - } - ], - "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", - "settings": {}, - "asset": {} - } - }, - "3": { - "position": { - "x": 0, - "y": 3, - "rowSpan": 3, - "colSpan": 6 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards", - "Name": "opwenlogsopzrs57fzm73k", - "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - } - }, - { - "name": "Query", - "value": "customEvents\n| where name == \"emails_delivered_to_client\"\n| extend dayOfYear = timestamp\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\n| extend domains = tostring(customDimensions.domain)\n| summarize count() by days, domains, dayOfYear\n| order by dayOfYear asc \n| project-away dayOfYear \n| project-rename total_emails_delivered_to_client = count_ \n| render barchart kind=unstacked\n" - }, - { - "name": "TimeRange", - "value": "P1D" - }, - { - "name": "Dimensions", - "value": { - "xAxis": { - "name": "days", - "type": "String" - }, - "yAxis": [ - { - "name": "total_emails_delivered_to_client", - "type": "Int64" - } - ], - "splitBy": [ - { - "name": "domains", - "type": "String" - } - ], - "aggregation": "Sum" - } - }, - { - "name": "Version", - "value": "1.0" - }, - { - "name": "DashboardId", - "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" - }, - { - "name": "PartId", - "value": "ce74b6ba-08e2-48b6-a570-6c3afff2ed1e" - }, - { - "name": "PartTitle", - "value": "Analytics" - }, - { - "name": "PartSubTitle", - "value": "opwenlogsopzrs57fzm73k" - }, - { - "name": "resourceTypeMode", - "value": "components" - }, - { - "name": "ControlType", - "value": "AnalyticsChart" - }, - { - "name": "SpecificChart", - "value": "GroupedBar" - } - ], - "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", - "settings": {}, - "asset": {} - } - }, - "4": { - "position": { - "x": 7, - "y": 3, - "rowSpan": 3, - "colSpan": 6 - }, - "metadata": { - "inputs": [ - { - "name": "sharedTimeRange", - "isOptional": true - }, - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[parameters('virtualMachines_opwenvm_externalid')]" - }, - "name": "Network In Total", - "aggregationType": 1, - "metricVisualization": { - "displayName": "Network In Total", - "resourceDisplayName": "opwenvm" - } - }, - { - "resourceMetadata": { - "id": "[parameters('virtualMachines_opwenvm_externalid')]" - }, - "name": "Network Out Total", - "aggregationType": 1, - "metricVisualization": { - "displayName": "Network Out Total", - "resourceDisplayName": "opwenvm" - } - } - ], - "title": "Network (total)", - "titleKind": 2, - "visualization": { - "chartType": 2 - }, - "openBladeOnClick": { - "openBlade": true - } - } - }, - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {}, - "filters": {} - } - }, - "5": { - "position": { - "x": 0, - "y": 6, - "rowSpan": 3, - "colSpan": 6 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards", - "Name": "opwenlogsopzrs57fzm73k", - "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - } - }, - { - "name": "Query", - "value": "customEvents\n| where name == \"email_received_for_client\"\n| extend dayOfYear = timestamp\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\n| extend domains = tostring(customDimensions.domain)\n| summarize count() by days, domains, dayOfYear\n| order by dayOfYear asc \n| project-away dayOfYear \n| project-rename total_email_received_for_client = count_ \n| render barchart kind=unstacked\n" - }, - { - "name": "TimeRange", - "value": "P1D" - }, - { - "name": "Dimensions", - "value": { - "xAxis": { - "name": "days", - "type": "String" - }, - "yAxis": [ - { - "name": "total_email_received_for_client", - "type": "Int64" - } - ], - "splitBy": [ - { - "name": "domains", - "type": "String" - } - ], - "aggregation": "Sum" - } - }, - { - "name": "Version", - "value": "1.0" - }, - { - "name": "DashboardId", - "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" - }, - { - "name": "PartId", - "value": "88017b9a-b1f3-4cbb-8832-cc6e0d640713" - }, - { - "name": "PartTitle", - "value": "Analytics" - }, - { - "name": "PartSubTitle", - "value": "opwenlogsopzrs57fzm73k" - }, - { - "name": "resourceTypeMode", - "value": "components" - }, - { - "name": "ControlType", - "value": "AnalyticsChart" - }, - { - "name": "SpecificChart", - "value": "GroupedBar" - } - ], - "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", - "settings": {}, - "asset": {} - } - }, - "6": { - "position": { - "x": 7, - "y": 6, - "rowSpan": 3, - "colSpan": 6 - }, - "metadata": { - "inputs": [ - { - "name": "sharedTimeRange", - "isOptional": true - }, - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[parameters('virtualMachines_opwenvm_externalid')]" - }, - "name": "Disk Read Operations/Sec", - "aggregationType": 4, - "metricVisualization": { - "displayName": "Disk Read Operations/Sec", - "resourceDisplayName": "opwenvm" - } - }, - { - "resourceMetadata": { - "id": "[parameters('virtualMachines_opwenvm_externalid')]" - }, - "name": "Disk Write Operations/Sec", - "aggregationType": 4, - "metricVisualization": { - "displayName": "Disk Write Operations/Sec", - "resourceDisplayName": "opwenvm" - } - } - ], - "title": "Disk operations/sec (average)", - "titleKind": 2, - "visualization": { - "chartType": 2 - }, - "openBladeOnClick": { - "openBlade": true - } - } - }, - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {}, - "filters": {} - } - }, - "7": { - "position": { - "x": 0, - "y": 9, - "rowSpan": 3, - "colSpan": 6 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards", - "Name": "opwenlogsopzrs57fzm73k", - "ResourceId": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - } - }, - { - "name": "Query", - "value": "customEvents\n| where name == \"emails_received_from_client\"\n| extend dayOfYear = timestamp\n| extend days = format_datetime(todatetime(timestamp), 'yyyy-MM-d')\n| extend domains = tostring(customDimensions.domain)\n| summarize count() by days, domains, dayOfYear\n| order by dayOfYear asc \n| project-away dayOfYear \n| project-rename total_email_received_from_client = count_ \n| render barchart kind=unstacked\n" - }, - { - "name": "TimeRange", - "value": "P1D" - }, - { - "name": "Dimensions", - "value": { - "xAxis": { - "name": "days", - "type": "String" - }, - "yAxis": [ - { - "name": "total_email_received_from_client", - "type": "Int64" - } - ], - "splitBy": [ - { - "name": "domains", - "type": "String" - } - ], - "aggregation": "Sum" - } - }, - { - "name": "Version", - "value": "1.0" - }, - { - "name": "DashboardId", - "value": "[resourceId('Microsoft.Portal/dashboards', parameters('dashboards_9acf2952_ca98_426a_b17d_48e31e534483_name'))]" - }, - { - "name": "PartId", - "value": "59bdce89-9f52-4bd6-becf-5b221bff8072" - }, - { - "name": "PartTitle", - "value": "Analytics" - }, - { - "name": "PartSubTitle", - "value": "opwenlogsopzrs57fzm73k" - }, - { - "name": "resourceTypeMode", - "value": "components" - }, - { - "name": "ControlType", - "value": "AnalyticsChart" - }, - { - "name": "SpecificChart", - "value": "GroupedBar" - } - ], - "type": "Extension/AppInsightsExtension/PartType/AnalyticsPart", - "settings": {}, - "asset": {} - } - } - } - } - }, - "metadata": { - "model": {} - } - } - }, - { - "type": "Microsoft.Portal/dashboards", - "apiVersion": "2019-01-01-preview", - "name": "[parameters('dashboards_e2253a02_3cff_471e_881c_fd5de37bc557_dashboard_name')]", - "location": "eastus", - "dependsOn": [ - "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - ], - "tags": { - "hidden-title": "opwenlogsopzrs57fzm73k Dashboard" - }, - "properties": { - "lenses": { - "0": { - "order": 0, - "parts": { - "0": { - "position": { - "x": 0, - "y": 0, - "rowSpan": 1, - "colSpan": 2 - }, - "metadata": { - "inputs": [ - { - "name": "id", - "value": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - { - "name": "Version", - "value": "1.0" - } - ], - "type": "Extension/AppInsightsExtension/PartType/AspNetOverviewPinnedPart", - "asset": {}, - "defaultMenuItemId": "overview" - } - }, - "1": { - "position": { - "x": 2, - "y": 0, - "rowSpan": 1, - "colSpan": 1 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "Name": "opwenlogsopzrs57fzm73k", - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards" - } - }, - { - "name": "Version", - "value": "1.0" - } - ], - "type": "Extension/AppInsightsExtension/PartType/ProactiveDetectionAsyncPart", - "asset": {}, - "defaultMenuItemId": "ProactiveDetection" - } - }, - "2": { - "position": { - "x": 3, - "y": 0, - "rowSpan": 1, - "colSpan": 1 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "Name": "opwenlogsopzrs57fzm73k", - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards" - } - }, - { - "name": "ResourceId", - "value": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - } - ], - "type": "Extension/AppInsightsExtension/PartType/QuickPulseButtonSmallPart", - "asset": {} - } - }, - "3": { - "position": { - "x": 4, - "y": 0, - "rowSpan": 1, - "colSpan": 1 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "Name": "opwenlogsopzrs57fzm73k", - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards" - } - }, - { - "name": "TimeContext", - "value": { - "durationMs": 86400000, - "endTime": null, - "createdTime": "2018-05-04T01:20:33.345Z", - "isInitialTime": true, - "grain": 1, - "useDashboardTimeRange": false - } - }, - { - "name": "Version", - "value": "1.0" - }, - { - "name": "componentId", - "isOptional": true - }, - { - "name": "id", - "isOptional": true - } - ], - "type": "Extension/AppInsightsExtension/PartType/WebTestsPinnedPart", - "asset": {} - } - }, - "4": { - "position": { - "x": 5, - "y": 0, - "rowSpan": 1, - "colSpan": 1 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "Name": "opwenlogsopzrs57fzm73k", - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards" - } - }, - { - "name": "TimeContext", - "value": { - "durationMs": 86400000, - "endTime": null, - "createdTime": "2018-05-08T18:47:35.237Z", - "isInitialTime": true, - "grain": 1, - "useDashboardTimeRange": false - } - }, - { - "name": "ConfigurationId", - "value": "78ce933e-e864-4b05-a27b-71fd55a6afad" - }, - { - "name": "MainResourceId", - "isOptional": true - }, - { - "name": "ResourceIds", - "isOptional": true - }, - { - "name": "DataModel", - "isOptional": true - }, - { - "name": "UseCallerTimeContext", - "isOptional": true - }, - { - "name": "OverrideSettings", - "isOptional": true - }, - { - "name": "PartId", - "isOptional": true - } - ], - "type": "Extension/AppInsightsExtension/PartType/ApplicationMapPart", - "settings": {}, - "asset": {} - } - }, - "5": { - "position": { - "x": 0, - "y": 1, - "rowSpan": 1, - "colSpan": 3 - }, - "metadata": { - "inputs": [], - "type": "Extension/HubsExtension/PartType/MarkdownPart", - "settings": {} - } - }, - "6": { - "position": { - "x": 3, - "y": 1, - "rowSpan": 1, - "colSpan": 1 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "Name": "opwenlogsopzrs57fzm73k", - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards" - } - }, - { - "name": "TimeContext", - "value": { - "durationMs": 86400000, - "endTime": null, - "createdTime": "2018-05-04T01:22:35.782Z", - "isInitialTime": true, - "grain": 1, - "useDashboardTimeRange": false - } - } - ], - "type": "Extension/AppInsightsExtension/PartType/UsageUsersOverviewPart", - "asset": {} - } - }, - "7": { - "position": { - "x": 4, - "y": 1, - "rowSpan": 1, - "colSpan": 3 - }, - "metadata": { - "inputs": [], - "type": "Extension/HubsExtension/PartType/MarkdownPart", - "settings": {} - } - }, - "8": { - "position": { - "x": 7, - "y": 1, - "rowSpan": 1, - "colSpan": 1 - }, - "metadata": { - "inputs": [ - { - "name": "ResourceId", - "value": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - { - "name": "DataModel", - "value": { - "version": "1.0.0", - "timeContext": { - "durationMs": 86400000, - "createdTime": "2018-05-04T23:42:40.072Z", - "isInitialTime": false, - "grain": 1, - "useDashboardTimeRange": false - } - }, - "isOptional": true - }, - { - "name": "ConfigurationId", - "value": "8a02f7bf-ac0f-40e1-afe9-f0e72cfee77f", - "isOptional": true - } - ], - "type": "Extension/AppInsightsExtension/PartType/CuratedBladeFailuresPinnedPart", - "isAdapter": true, - "asset": {}, - "defaultMenuItemId": "failures" - } - }, - "9": { - "position": { - "x": 8, - "y": 1, - "rowSpan": 1, - "colSpan": 3 - }, - "metadata": { - "inputs": [], - "type": "Extension/HubsExtension/PartType/MarkdownPart", - "settings": {} - } - }, - "10": { - "position": { - "x": 11, - "y": 1, - "rowSpan": 1, - "colSpan": 1 - }, - "metadata": { - "inputs": [ - { - "name": "ResourceId", - "value": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - { - "name": "DataModel", - "value": { - "version": "1.0.0", - "timeContext": { - "durationMs": 86400000, - "createdTime": "2018-05-04T23:43:37.804Z", - "isInitialTime": false, - "grain": 1, - "useDashboardTimeRange": false - } - }, - "isOptional": true - }, - { - "name": "ConfigurationId", - "value": "2a8ede4f-2bee-4b9c-aed9-2db0e8a01865", - "isOptional": true - } - ], - "type": "Extension/AppInsightsExtension/PartType/CuratedBladePerformancePinnedPart", - "isAdapter": true, - "asset": {}, - "defaultMenuItemId": "performance" - } - }, - "11": { - "position": { - "x": 12, - "y": 1, - "rowSpan": 1, - "colSpan": 3 - }, - "metadata": { - "inputs": [], - "type": "Extension/HubsExtension/PartType/MarkdownPart", - "settings": {} - } - }, - "12": { - "position": { - "x": 15, - "y": 1, - "rowSpan": 1, - "colSpan": 1 - }, - "metadata": { - "inputs": [ - { - "name": "ComponentId", - "value": { - "Name": "opwenlogsopzrs57fzm73k", - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards" - } - }, - { - "name": "MetricsExplorerJsonDefinitionId", - "value": "BrowserPerformanceTimelineMetrics" - }, - { - "name": "TimeContext", - "value": { - "durationMs": 86400000, - "createdTime": "2018-05-08T12:16:27.534Z", - "isInitialTime": false, - "grain": 1, - "useDashboardTimeRange": false - } - }, - { - "name": "CurrentFilter", - "value": { - "eventTypes": [ - 4, - 1, - 3, - 5, - 2, - 6, - 13 - ], - "typeFacets": {}, - "isPermissive": false - } - }, - { - "name": "id", - "value": { - "Name": "opwenlogsopzrs57fzm73k", - "SubscriptionId": "7251246a-f6e5-4759-a1a1-4dc4a730ee4d", - "ResourceGroup": "dashboards" - } - }, - { - "name": "Version", - "value": "1.0" - } - ], - "type": "Extension/AppInsightsExtension/PartType/MetricsExplorerBladePinnedPart", - "asset": {}, - "defaultMenuItemId": "browser" - } - }, - "13": { - "position": { - "x": 0, - "y": 2, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "sessions/count", - "aggregationType": 5, - "namespace": "microsoft.insights/components/kusto", - "metricVisualization": { - "displayName": "Sessions", - "color": "#47BDF5" - } - }, - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "users/count", - "aggregationType": 5, - "namespace": "microsoft.insights/components/kusto", - "metricVisualization": { - "displayName": "Users", - "color": "#7E58FF" - } - } - ], - "title": "Unique sessions and users", - "visualization": { - "chartType": 2, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - }, - "openBladeOnClick": { - "openBlade": true, - "destinationBlade": { - "extensionName": "HubsExtension", - "bladeName": "ResourceMenuBlade", - "parameters": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", - "menuid": "segmentationUsers" - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "14": { - "position": { - "x": 4, - "y": 2, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "requests/failed", - "aggregationType": 7, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Failed requests", - "color": "#EC008C" - } - } - ], - "title": "Failed requests", - "visualization": { - "chartType": 3, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - }, - "openBladeOnClick": { - "openBlade": true, - "destinationBlade": { - "extensionName": "HubsExtension", - "bladeName": "ResourceMenuBlade", - "parameters": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", - "menuid": "failures" - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "15": { - "position": { - "x": 8, - "y": 2, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "requests/duration", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Server response time", - "color": "#00BCF2" - } - } - ], - "title": "Server response time", - "visualization": { - "chartType": 2, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - }, - "openBladeOnClick": { - "openBlade": true, - "destinationBlade": { - "extensionName": "HubsExtension", - "bladeName": "ResourceMenuBlade", - "parameters": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", - "menuid": "performance" - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "16": { - "position": { - "x": 12, - "y": 2, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "browserTimings/networkDuration", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Page load network connect time", - "color": "#7E58FF" - } - }, - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "browserTimings/processingDuration", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Client processing time", - "color": "#44F1C8" - } - }, - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "browserTimings/sendDuration", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Send request time", - "color": "#EB9371" - } - }, - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "browserTimings/receiveDuration", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Receiving response time", - "color": "#0672F1" - } - } - ], - "title": "Average page load time breakdown", - "visualization": { - "chartType": 3, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "17": { - "position": { - "x": 0, - "y": 5, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "availabilityResults/availabilityPercentage", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Availability", - "color": "#47BDF5" - } - } - ], - "title": "Average availability", - "visualization": { - "chartType": 3, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - }, - "openBladeOnClick": { - "openBlade": true, - "destinationBlade": { - "extensionName": "HubsExtension", - "bladeName": "ResourceMenuBlade", - "parameters": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", - "menuid": "availability" - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "18": { - "position": { - "x": 4, - "y": 5, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "exceptions/server", - "aggregationType": 7, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Server exceptions", - "color": "#47BDF5" - } - }, - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "dependencies/failed", - "aggregationType": 7, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Dependency failures", - "color": "#7E58FF" - } - } - ], - "title": "Server exceptions and Dependency failures", - "visualization": { - "chartType": 2, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "19": { - "position": { - "x": 8, - "y": 5, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "performanceCounters/processorCpuPercentage", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Processor time", - "color": "#47BDF5" - } - }, - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "performanceCounters/processCpuPercentage", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Process CPU", - "color": "#7E58FF" - } - } - ], - "title": "Average processor and process CPU utilization", - "visualization": { - "chartType": 2, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "20": { - "position": { - "x": 12, - "y": 5, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "exceptions/browser", - "aggregationType": 7, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Browser exceptions", - "color": "#47BDF5" - } - } - ], - "title": "Browser exceptions", - "visualization": { - "chartType": 2, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "21": { - "position": { - "x": 0, - "y": 8, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "availabilityResults/count", - "aggregationType": 7, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Availability test results count", - "color": "#47BDF5" - } - } - ], - "title": "Availability test results count", - "visualization": { - "chartType": 2, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "22": { - "position": { - "x": 4, - "y": 8, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "performanceCounters/processIOBytesPerSecond", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Process IO rate", - "color": "#47BDF5" - } - } - ], - "title": "Average process I/O rate", - "visualization": { - "chartType": 2, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - }, - "23": { - "position": { - "x": 8, - "y": 8, - "rowSpan": 3, - "colSpan": 4 - }, - "metadata": { - "inputs": [ - { - "name": "options", - "value": { - "chart": { - "metrics": [ - { - "resourceMetadata": { - "id": "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - }, - "name": "performanceCounters/memoryAvailableBytes", - "aggregationType": 4, - "namespace": "microsoft.insights/components", - "metricVisualization": { - "displayName": "Available memory", - "color": "#47BDF5" - } - } - ], - "title": "Average available memory", - "visualization": { - "chartType": 2, - "legendVisualization": { - "isVisible": true, - "position": 2, - "hideSubtitle": false - }, - "axisVisualization": { - "x": { - "isVisible": true, - "axisType": 2 - }, - "y": { - "isVisible": true, - "axisType": 1 - } - } - } - } - } - }, - { - "name": "sharedTimeRange", - "isOptional": true - } - ], - "type": "Extension/HubsExtension/PartType/MonitorChartPart", - "settings": {} - } - } - } - } - }, - "metadata": { - "model": {} - } - } - }, - { - "type": "microsoft.insights/metricAlerts", - "apiVersion": "2018-03-01", - "name": "[parameters('metricAlerts_opwenserver_exceptions_name')]", - "location": "global", - "dependsOn": [ - "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", - "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG2_name'))]" - ], - "tags": { - "hidden-link:/subscriptions/7251246a-f6e5-4759-a1a1-4dc4a730ee4d/resourceGroups/dashboards/providers/Microsoft.Insights/components/opwenlogsopzrs57fzm73k": "Resource" - }, - "properties": { - "severity": 3, - "enabled": true, - "scopes": [ - "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - ], - "evaluationFrequency": "PT5M", - "windowSize": "PT6H", - "criteria": { - "allOf": [ - { - "threshold": 1, - "name": "Metric1", - "metricNamespace": "microsoft.insights/components", - "metricName": "performanceCounters/exceptionsPerSecond", - "dimensions": [], - "operator": "GreaterThanOrEqual", - "timeAggregation": "Average", - "criterionType": "StaticThresholdCriterion" - } - ], - "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" - }, - "targetResourceType": "microsoft.insights/components", - "actions": [ - { - "actionGroupId": "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG2_name'))]", - "webHookProperties": {} - } - ], - "description": "[parameters('metricAlerts_opwenserver_exceptions_description')]" - } - }, - { - "type": "microsoft.alertsmanagement/smartdetectoralertrules", - "apiVersion": "2019-06-01", - "name": "[parameters('smartdetectoralertrules_failure_anomalies___opwenlogsopzrs57fzm73k_name')]", - "location": "global", - "dependsOn": [ - "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]", - "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG1_name'))]", - "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG3_name'))]" - ], - "tags": { - "hidden-link:/subscriptions/7251246a-f6e5-4759-a1a1-4dc4a730ee4d/resourceGroups/dashboards/providers/microsoft.insights/components/opwenlogsopzrs57fzm73k": "Resource" - }, - "properties": { - "description": "Failure Anomalies notifies you of an unusual rise in the rate of failed HTTP requests or dependency calls", - "state": "Disabled", - "severity": "Sev3", - "frequency": "PT1M", - "detector": { - "id": "FailureAnomaliesDetector", - "name": "Failure Anomalies", - "description": "Detects if your application experiences an abnormal rise in the rate of HTTP requests or dependency calls that are reported as failed. The anomaly detection uses machine learning algorithms and occurs in near real time, therefore there's no need to define a frequency for this signal.

To help you triage and diagnose the problem, an analysis of the characteristics of the failures and related telemetry is provided with the detection. This feature works for any app, hosted in the cloud or on your own servers, that generates request or dependency telemetry - for example, if you have a worker role that calls TrackRequest() or TrackDependency().

Learn more about Failure Anomalies", - "supportedResourceTypes": [ - "ApplicationInsights" - ] - }, - "scope": [ - "[resourceId('microsoft.insights/components', parameters('components_opwenlogsopzrs57fzm73k_name'))]" - ], - "actionGroups": { - "groupIds": [ - "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG1_name'))]", - "[resourceId('microsoft.insights/actionGroups', parameters('actionGroups_Migration_AG3_name'))]" - ] - } - } - } - ] -} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/data-parameters.json b/docker/setup/terraform/current infra/data-parameters.json deleted file mode 100644 index 363623fb..00000000 --- a/docker/setup/terraform/current infra/data-parameters.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "namespaces_opwenserverqueuesopzrs_name": { - "value": null - }, - "storageAccounts_opwenclientblobsopzrs5_name": { - "value": null - }, - "storageAccounts_opwenserverblobsopzrs5_name": { - "value": null - }, - "storageAccounts_opwenservertablesopzrs_name": { - "value": null - } - } -} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/data-template.json b/docker/setup/terraform/current infra/data-template.json deleted file mode 100644 index 7ab205dc..00000000 --- a/docker/setup/terraform/current infra/data-template.json +++ /dev/null @@ -1,558 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "namespaces_opwenserverqueuesopzrs_name": { - "defaultValue": "opwenserverqueuesopzrs", - "type": "String" - }, - "storageAccounts_opwenclientblobsopzrs5_name": { - "defaultValue": "opwenclientblobsopzrs5", - "type": "String" - }, - "storageAccounts_opwenserverblobsopzrs5_name": { - "defaultValue": "opwenserverblobsopzrs5", - "type": "String" - }, - "storageAccounts_opwenservertablesopzrs_name": { - "defaultValue": "opwenservertablesopzrs", - "type": "String" - } - }, - "variables": {}, - "resources": [ - // { - // "type": "Microsoft.ServiceBus/namespaces", - // "apiVersion": "2018-01-01-preview", - // "name": "[parameters('namespaces_opwenserverqueuesopzrs_name')]", - // "location": "East US", - // "sku": { - // "name": "Basic", - // "tier": "Basic" - // }, - // "properties": { - // "zoneRedundant": false - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts", - // "apiVersion": "2019-06-01", - // "name": "[parameters('storageAccounts_opwenclientblobsopzrs5_name')]", - // "location": "eastus", - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "kind": "Storage", - // "properties": { - // "networkAcls": { - // "bypass": "AzureServices", - // "virtualNetworkRules": [], - // "ipRules": [], - // "defaultAction": "Allow" - // }, - // "supportsHttpsTrafficOnly": false, - // "encryption": { - // "services": { - // "file": { - // "keyType": "Account", - // "enabled": true - // }, - // "blob": { - // "keyType": "Account", - // "enabled": true - // } - // }, - // "keySource": "Microsoft.Storage" - // } - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts", - // "apiVersion": "2019-06-01", - // "name": "[parameters('storageAccounts_opwenserverblobsopzrs5_name')]", - // "location": "eastus", - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "kind": "Storage", - // "properties": { - // "networkAcls": { - // "bypass": "AzureServices", - // "virtualNetworkRules": [], - // "ipRules": [], - // "defaultAction": "Allow" - // }, - // "supportsHttpsTrafficOnly": false, - // "encryption": { - // "services": { - // "file": { - // "keyType": "Account", - // "enabled": true - // }, - // "blob": { - // "keyType": "Account", - // "enabled": true - // } - // }, - // "keySource": "Microsoft.Storage" - // } - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts", - // "apiVersion": "2019-06-01", - // "name": "[parameters('storageAccounts_opwenservertablesopzrs_name')]", - // "location": "eastus", - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "kind": "Storage", - // "properties": { - // "networkAcls": { - // "bypass": "AzureServices", - // "virtualNetworkRules": [], - // "ipRules": [], - // "defaultAction": "Allow" - // }, - // "supportsHttpsTrafficOnly": false, - // "encryption": { - // "services": { - // "file": { - // "keyType": "Account", - // "enabled": true - // }, - // "blob": { - // "keyType": "Account", - // "enabled": true - // } - // }, - // "keySource": "Microsoft.Storage" - // } - // } - // }, - // { - // "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/celery')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "rights": [ - // "Manage", - // "Send", - // "Listen" - // ] - // } - // }, - // { - // "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/RootManageSharedAccessKey')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "rights": [ - // "Listen", - // "Manage", - // "Send" - // ] - // } - // }, - { - "type": "Microsoft.ServiceBus/namespaces/networkRuleSets", - "apiVersion": "2018-01-01-preview", - "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/default')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - ], - "properties": { - "defaultAction": "Deny", - "virtualNetworkRules": [], - "ipRules": [] - } - }, - // { - // "type": "Microsoft.ServiceBus/namespaces/queues", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/inbound')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "lockDuration": "PT1M", - // "maxSizeInMegabytes": 5120, - // "requiresDuplicateDetection": false, - // "requiresSession": false, - // "defaultMessageTimeToLive": "P14D", - // "deadLetteringOnMessageExpiration": false, - // "enableBatchedOperations": true, - // "duplicateDetectionHistoryTimeWindow": "PT10M", - // "maxDeliveryCount": 10, - // "status": "Active", - // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - // "enablePartitioning": false, - // "enableExpress": false - // } - // }, - // { - // "type": "Microsoft.ServiceBus/namespaces/queues", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/mailboxreceived')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "lockDuration": "PT1M", - // "maxSizeInMegabytes": 1024, - // "requiresDuplicateDetection": false, - // "requiresSession": false, - // "defaultMessageTimeToLive": "P14D", - // "deadLetteringOnMessageExpiration": false, - // "enableBatchedOperations": true, - // "duplicateDetectionHistoryTimeWindow": "PT10M", - // "maxDeliveryCount": 10, - // "status": "Active", - // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - // "enablePartitioning": false, - // "enableExpress": false - // } - // }, - // { - // "type": "Microsoft.ServiceBus/namespaces/queues", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/mailboxsent')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "lockDuration": "PT1M", - // "maxSizeInMegabytes": 1024, - // "requiresDuplicateDetection": false, - // "requiresSession": false, - // "defaultMessageTimeToLive": "P14D", - // "deadLetteringOnMessageExpiration": false, - // "enableBatchedOperations": true, - // "duplicateDetectionHistoryTimeWindow": "PT10M", - // "maxDeliveryCount": 10, - // "status": "Active", - // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - // "enablePartitioning": false, - // "enableExpress": false - // } - // }, - // { - // "type": "Microsoft.ServiceBus/namespaces/queues", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/register')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "lockDuration": "PT1M", - // "maxSizeInMegabytes": 1024, - // "requiresDuplicateDetection": false, - // "requiresSession": false, - // "defaultMessageTimeToLive": "P14D", - // "deadLetteringOnMessageExpiration": false, - // "enableBatchedOperations": true, - // "duplicateDetectionHistoryTimeWindow": "PT10M", - // "maxDeliveryCount": 10, - // "status": "Active", - // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - // "enablePartitioning": false, - // "enableExpress": false - // } - // }, - // { - // "type": "Microsoft.ServiceBus/namespaces/queues", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/send')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "lockDuration": "PT1M", - // "maxSizeInMegabytes": 5120, - // "requiresDuplicateDetection": false, - // "requiresSession": false, - // "defaultMessageTimeToLive": "P14D", - // "deadLetteringOnMessageExpiration": false, - // "enableBatchedOperations": true, - // "duplicateDetectionHistoryTimeWindow": "PT10M", - // "maxDeliveryCount": 10, - // "status": "Active", - // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - // "enablePartitioning": false, - // "enableExpress": false - // } - // }, - // { - // "type": "Microsoft.ServiceBus/namespaces/queues", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/service')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "lockDuration": "PT1M", - // "maxSizeInMegabytes": 1024, - // "requiresDuplicateDetection": false, - // "requiresSession": false, - // "defaultMessageTimeToLive": "P14D", - // "deadLetteringOnMessageExpiration": false, - // "enableBatchedOperations": true, - // "duplicateDetectionHistoryTimeWindow": "PT10M", - // "maxDeliveryCount": 10, - // "status": "Active", - // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - // "enablePartitioning": false, - // "enableExpress": false - // } - // }, - // { - // "type": "Microsoft.ServiceBus/namespaces/queues", - // "apiVersion": "2017-04-01", - // "name": "[concat(parameters('namespaces_opwenserverqueuesopzrs_name'), '/written')]", - // "location": "East US", - // "dependsOn": [ - // "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwenserverqueuesopzrs_name'))]" - // ], - // "properties": { - // "lockDuration": "PT1M", - // "maxSizeInMegabytes": 5120, - // "requiresDuplicateDetection": false, - // "requiresSession": false, - // "defaultMessageTimeToLive": "P14D", - // "deadLetteringOnMessageExpiration": false, - // "enableBatchedOperations": true, - // "duplicateDetectionHistoryTimeWindow": "PT10M", - // "maxDeliveryCount": 10, - // "status": "Active", - // "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - // "enablePartitioning": false, - // "enableExpress": false - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts/blobServices", - // "apiVersion": "2019-06-01", - // "name": "[concat(parameters('storageAccounts_opwenclientblobsopzrs5_name'), '/default')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenclientblobsopzrs5_name'))]" - // ], - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "properties": { - // "cors": { - // "corsRules": [] - // }, - // "deleteRetentionPolicy": { - // "enabled": false - // } - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts/blobServices", - // "apiVersion": "2019-06-01", - // "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" - // ], - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "properties": { - // "cors": { - // "corsRules": [] - // }, - // "deleteRetentionPolicy": { - // "enabled": false - // } - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts/blobServices", - // "apiVersion": "2019-06-01", - // "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" - // ], - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "properties": { - // "cors": { - // "corsRules": [] - // }, - // "deleteRetentionPolicy": { - // "enabled": false - // } - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts/fileServices", - // "apiVersion": "2019-06-01", - // "name": "[concat(parameters('storageAccounts_opwenclientblobsopzrs5_name'), '/default')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenclientblobsopzrs5_name'))]" - // ], - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "properties": { - // "cors": { - // "corsRules": [] - // } - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts/fileServices", - // "apiVersion": "2019-06-01", - // "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" - // ], - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "properties": { - // "cors": { - // "corsRules": [] - // } - // } - // }, - // { - // "type": "Microsoft.Storage/storageAccounts/fileServices", - // "apiVersion": "2019-06-01", - // "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" - // ], - // "sku": { - // "name": "Standard_GRS", - // "tier": "Standard" - // }, - // "properties": { - // "cors": { - // "corsRules": [] - // } - // } - // }, -// { -// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", -// "apiVersion": "2019-06-01", -// "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default/clientsauth')]", -// "dependsOn": [ -// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenservertablesopzrs_name'), 'default')]", -// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" -// ], -// "properties": { -// "publicAccess": "None" -// } -// }, -// { -// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", -// "apiVersion": "2019-06-01", -// "name": "[concat(parameters('storageAccounts_opwenclientblobsopzrs5_name'), '/default/compressedpackages')]", -// "dependsOn": [ -// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenclientblobsopzrs5_name'), 'default')]", -// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenclientblobsopzrs5_name'))]" -// ], -// "properties": { -// "publicAccess": "None" -// } -// }, -// { -// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", -// "apiVersion": "2019-06-01", -// "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default/emails')]", -// "dependsOn": [ -// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenserverblobsopzrs5_name'), 'default')]", -// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" -// ], -// "properties": { -// "publicAccess": "None" -// } -// }, -// { -// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", -// "apiVersion": "2019-06-01", -// "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default/mailbox')]", -// "dependsOn": [ -// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenserverblobsopzrs5_name'), 'default')]", -// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" -// ], -// "properties": { -// "publicAccess": "None" -// } -// }, -// { -// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", -// "apiVersion": "2019-06-01", -// "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default/pendingemails')]", -// "dependsOn": [ -// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenservertablesopzrs_name'), 'default')]", -// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" -// ], -// "properties": { -// "publicAccess": "None" -// } -// }, -// { -// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", -// "apiVersion": "2019-06-01", -// "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default/secrets-opwenclusterg2czekda')]", -// "dependsOn": [ -// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenserverblobsopzrs5_name'), 'default')]", -// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" -// ], -// "properties": { -// "publicAccess": "None" -// } -// }, -// { -// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", -// "apiVersion": "2019-06-01", -// "name": "[concat(parameters('storageAccounts_opwenserverblobsopzrs5_name'), '/default/sendgridinboundemails')]", -// "dependsOn": [ -// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenserverblobsopzrs5_name'), 'default')]", -// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenserverblobsopzrs5_name'))]" -// ], -// "properties": { -// "publicAccess": "None" -// } -// }, -// { -// "type": "Microsoft.Storage/storageAccounts/blobServices/containers", -// "apiVersion": "2019-06-01", -// "name": "[concat(parameters('storageAccounts_opwenservertablesopzrs_name'), '/default/users')]", -// "dependsOn": [ -// "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwenservertablesopzrs_name'), 'default')]", -// "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwenservertablesopzrs_name'))]" -// ], -// "properties": { -// "publicAccess": "None" -// } -// } -// ] -// } \ No newline at end of file diff --git a/docker/setup/terraform/current infra/test-parameters.json b/docker/setup/terraform/current infra/test-parameters.json deleted file mode 100644 index cad128dc..00000000 --- a/docker/setup/terraform/current infra/test-parameters.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "namespaces_opwentest_name": { - "value": null - }, - "storageAccounts_opwentest_name": { - "value": null - } - } -} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/test-template.json b/docker/setup/terraform/current infra/test-template.json deleted file mode 100644 index aea2374a..00000000 --- a/docker/setup/terraform/current infra/test-template.json +++ /dev/null @@ -1,868 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "namespaces_opwentest_name": { - "defaultValue": "opwentest", - "type": "String" - }, - "storageAccounts_opwentest_name": { - "defaultValue": "opwentest", - "type": "String" - } - }, - "variables": {}, - "resources": [ - { - "type": "Microsoft.ServiceBus/namespaces", - "apiVersion": "2018-01-01-preview", - "name": "[parameters('namespaces_opwentest_name')]", - "location": "East US", - "sku": { - "name": "Basic", - "tier": "Basic" - }, - "properties": { - "zoneRedundant": false - } - }, - { - "type": "Microsoft.Storage/storageAccounts", - "apiVersion": "2019-06-01", - "name": "[parameters('storageAccounts_opwentest_name')]", - "location": "eastus", - "sku": { - "name": "Standard_LRS", - "tier": "Standard" - }, - "kind": "StorageV2", - "properties": { - "largeFileSharesState": "Disabled", - "networkAcls": { - "bypass": "AzureServices", - "virtualNetworkRules": [], - "ipRules": [], - "defaultAction": "Allow" - }, - "supportsHttpsTrafficOnly": true, - "encryption": { - "services": { - "file": { - "keyType": "Account", - "enabled": true - }, - "blob": { - "keyType": "Account", - "enabled": true - } - }, - "keySource": "Microsoft.Storage" - }, - "accessTier": "Hot" - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/celery')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "rights": [ - "Manage", - "Listen", - "Send" - ] - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/AuthorizationRules", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/RootManageSharedAccessKey')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "rights": [ - "Listen", - "Manage", - "Send" - ] - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/networkRuleSets", - "apiVersion": "2018-01-01-preview", - "name": "[concat(parameters('namespaces_opwentest_name'), '/default')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "defaultAction": "Deny", - "virtualNetworkRules": [], - "ipRules": [] - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/inbound1717960e_b271_4f42_9751_cd8b27c27e94')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/inbound73777c3d_d88e_47bb_b98a_1b952fb812ef')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/inbounde242952e_58a6_4ae0_9cbf_624273fa9dc3')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxreceived1717960e_b271_4f42_9751_cd8b27c27e94')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxreceived73777c3d_d88e_47bb_b98a_1b952fb812ef')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxreceivede242952e_58a6_4ae0_9cbf_624273fa9dc3')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxsent1717960e_b271_4f42_9751_cd8b27c27e94')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxsent73777c3d_d88e_47bb_b98a_1b952fb812ef')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/mailboxsente242952e_58a6_4ae0_9cbf_624273fa9dc3')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/register1717960e_b271_4f42_9751_cd8b27c27e94')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/register73777c3d_d88e_47bb_b98a_1b952fb812ef')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/registere242952e_58a6_4ae0_9cbf_624273fa9dc3')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/send1717960e_b271_4f42_9751_cd8b27c27e94')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/send73777c3d_d88e_47bb_b98a_1b952fb812ef')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/sende242952e_58a6_4ae0_9cbf_624273fa9dc3')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/service1717960e_b271_4f42_9751_cd8b27c27e94')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/service73777c3d_d88e_47bb_b98a_1b952fb812ef')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/servicee242952e_58a6_4ae0_9cbf_624273fa9dc3')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/written1717960e_b271_4f42_9751_cd8b27c27e94')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/written73777c3d_d88e_47bb_b98a_1b952fb812ef')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.ServiceBus/namespaces/queues", - "apiVersion": "2017-04-01", - "name": "[concat(parameters('namespaces_opwentest_name'), '/writtene242952e_58a6_4ae0_9cbf_624273fa9dc3')]", - "location": "East US", - "dependsOn": [ - "[resourceId('Microsoft.ServiceBus/namespaces', parameters('namespaces_opwentest_name'))]" - ], - "properties": { - "lockDuration": "PT1M", - "maxSizeInMegabytes": 1024, - "requiresDuplicateDetection": false, - "requiresSession": false, - "defaultMessageTimeToLive": "P14D", - "deadLetteringOnMessageExpiration": false, - "enableBatchedOperations": true, - "duplicateDetectionHistoryTimeWindow": "PT10M", - "maxDeliveryCount": 10, - "status": "Active", - "autoDeleteOnIdle": "P10675199DT2H48M5.4775807S", - "enablePartitioning": false, - "enableExpress": false - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "sku": { - "name": "Standard_LRS", - "tier": "Standard" - }, - "properties": { - "cors": { - "corsRules": [] - }, - "deleteRetentionPolicy": { - "enabled": false - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts/fileServices", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "sku": { - "name": "Standard_LRS", - "tier": "Standard" - }, - "properties": { - "cors": { - "corsRules": [] - } - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/1717960e-b271-4f42-9751-cd8b27c27e94')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/4c76fe33-2a0f-4a23-b93d-6641fd20091d')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/73777c3d-d88e-47bb-b98a-1b952fb812ef')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/clientsauth1717960e-b271-4f42-9751-cd8b27c27e94')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/clientsauth73777c3d-d88e-47bb-b98a-1b952fb812ef')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/clientsauthe242952e-58a6-4ae0-9cbf-624273fa9dc3')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/compressedpackages73777c3d-d88e-47bb-b98a-1b952fb812ef')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/compressedpackagese242952e-58a6-4ae0-9cbf-624273fa9dc3')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/e242952e-58a6-4ae0-9cbf-624273fa9dc3')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/emails73777c3d-d88e-47bb-b98a-1b952fb812ef')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/emailse242952e-58a6-4ae0-9cbf-624273fa9dc3')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/mailbox73777c3d-d88e-47bb-b98a-1b952fb812ef')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/mailboxe242952e-58a6-4ae0-9cbf-624273fa9dc3')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/pendingemails73777c3d-d88e-47bb-b98a-1b952fb812ef')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/pendingemailse242952e-58a6-4ae0-9cbf-624273fa9dc3')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/sendgridinboundemails73777c3d-d88e-47bb-b98a-1b952fb812ef')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/users73777c3d-d88e-47bb-b98a-1b952fb812ef')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - }, - { - "type": "Microsoft.Storage/storageAccounts/blobServices/containers", - "apiVersion": "2019-06-01", - "name": "[concat(parameters('storageAccounts_opwentest_name'), '/default/userse242952e-58a6-4ae0-9cbf-624273fa9dc3')]", - "dependsOn": [ - "[resourceId('Microsoft.Storage/storageAccounts/blobServices', parameters('storageAccounts_opwentest_name'), 'default')]", - "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccounts_opwentest_name'))]" - ], - "properties": { - "publicAccess": "None" - } - } - ] -} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/vm-parameters.json b/docker/setup/terraform/current infra/vm-parameters.json deleted file mode 100644 index 7b350b97..00000000 --- a/docker/setup/terraform/current infra/vm-parameters.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "virtualMachines_opwenvm_name": { - "value": null - }, - "networkInterfaces_opwenvm763_name": { - "value": null - }, - "publicIPAddresses_opwenvm_ip_name": { - "value": null - }, - "virtualNetworks_opwenvm_vnet_name": { - "value": null - }, - "networkSecurityGroups_opwenvm_nsg_name": { - "value": null - } - } -} \ No newline at end of file diff --git a/docker/setup/terraform/current infra/vm-template.json b/docker/setup/terraform/current infra/vm-template.json deleted file mode 100644 index 26aa898d..00000000 --- a/docker/setup/terraform/current infra/vm-template.json +++ /dev/null @@ -1,307 +0,0 @@ -{ - "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", - "contentVersion": "1.0.0.0", - "parameters": { - "virtualMachines_opwenvm_name": { - "defaultValue": "opwenvm", - "type": "String" - }, - "networkInterfaces_opwenvm763_name": { - "defaultValue": "opwenvm763", - "type": "String" - }, - "publicIPAddresses_opwenvm_ip_name": { - "defaultValue": "opwenvm-ip", - "type": "String" - }, - "virtualNetworks_opwenvm_vnet_name": { - "defaultValue": "opwenvm-vnet", - "type": "String" - }, - "networkSecurityGroups_opwenvm_nsg_name": { - "defaultValue": "opwenvm-nsg", - "type": "String" - } - }, - "variables": {}, - // "resources": [ - // { - // "type": "Microsoft.Network/networkSecurityGroups", - // "apiVersion": "2020-05-01", - // "name": "[parameters('networkSecurityGroups_opwenvm_nsg_name')]", - // "location": "eastus", - // "properties": { - // "securityRules": [ - // { - // "name": "SSH", - // "properties": { - // "protocol": "TCP", - // "sourcePortRange": "*", - // "destinationPortRange": "22", - // "sourceAddressPrefix": "*", - // "destinationAddressPrefix": "*", - // "access": "Allow", - // "priority": 300, - // "direction": "Inbound", - // "sourcePortRanges": [], - // "destinationPortRanges": [], - // "sourceAddressPrefixes": [], - // "destinationAddressPrefixes": [] - // } - // }, - // { - // "name": "HTTPS", - // "properties": { - // "protocol": "TCP", - // "sourcePortRange": "*", - // "destinationPortRange": "443", - // "sourceAddressPrefix": "*", - // "destinationAddressPrefix": "*", - // "access": "Allow", - // "priority": 320, - // "direction": "Inbound", - // "sourcePortRanges": [], - // "destinationPortRanges": [], - // "sourceAddressPrefixes": [], - // "destinationAddressPrefixes": [] - // } - // }, - // { - // "name": "HTTP", - // "properties": { - // "protocol": "TCP", - // "sourcePortRange": "*", - // "destinationPortRange": "80", - // "sourceAddressPrefix": "*", - // "destinationAddressPrefix": "*", - // "access": "Allow", - // "priority": 340, - // "direction": "Inbound", - // "sourcePortRanges": [], - // "destinationPortRanges": [], - // "sourceAddressPrefixes": [], - // "destinationAddressPrefixes": [] - // } - // } - // ] - // } - // }, - // { - // "type": "Microsoft.Network/publicIPAddresses", - // "apiVersion": "2020-05-01", - // "name": "[parameters('publicIPAddresses_opwenvm_ip_name')]", - // "location": "eastus", - // "sku": { - // "name": "Basic" - // }, - // "properties": { - // "ipAddress": "20.185.45.240", - // "publicIPAddressVersion": "IPv4", - // "publicIPAllocationMethod": "Dynamic", - // "idleTimeoutInMinutes": 4, - // "dnsSettings": { - // "domainNameLabel": "opwenvm", - // "fqdn": "opwenvm.eastus.cloudapp.azure.com" - // }, - // "ipTags": [] - // } - // }, - // { - // "type": "Microsoft.Network/virtualNetworks", - // "apiVersion": "2020-05-01", - // "name": "[parameters('virtualNetworks_opwenvm_vnet_name')]", - // "location": "eastus", - // "properties": { - // "addressSpace": { - // "addressPrefixes": [ - // "10.0.0.0/24" - // ] - // }, - // "subnets": [ - // { - // "name": "default", - // "properties": { - // "addressPrefix": "10.0.0.0/24", - // "delegations": [], - // "privateEndpointNetworkPolicies": "Enabled", - // "privateLinkServiceNetworkPolicies": "Enabled" - // } - // } - // ], - // "virtualNetworkPeerings": [], - // "enableDdosProtection": false, - // "enableVmProtection": false - // } - // }, - { - "type": "Microsoft.Compute/virtualMachines", - "apiVersion": "2019-07-01", - "name": "[parameters('virtualMachines_opwenvm_name')]", - "location": "eastus", - "dependsOn": [ - "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_opwenvm763_name'))]" - ], - "properties": { - // "hardwareProfile": { - // "vmSize": "Standard_D4s_v3" - // }, - // "storageProfile": { - // "imageReference": { - // "publisher": "Canonical", - // "offer": "UbuntuServer", - // "sku": "18.04-LTS", - // "version": "latest" - // }, - // "osDisk": { - // "osType": "Linux", - // "name": "[concat(parameters('virtualMachines_opwenvm_name'), '_OsDisk_1_ced0b0dbccc04536acb7743a366f2ed4')]", - // "createOption": "FromImage", - // "caching": "ReadWrite", - // "managedDisk": { - // "storageAccountType": "Premium_LRS", - // "id": "[resourceId('Microsoft.Compute/disks', concat(parameters('virtualMachines_opwenvm_name'), '_OsDisk_1_ced0b0dbccc04536acb7743a366f2ed4'))]" - // }, - // "diskSizeGB": 30 - // }, - // "dataDisks": [] - // }, - // "osProfile": { - // "computerName": "[parameters('virtualMachines_opwenvm_name')]", - // "adminUsername": "opwen", - // "linuxConfiguration": { - // "disablePasswordAuthentication": false, - // "provisionVMAgent": true - // }, - // "secrets": [], - // "allowExtensionOperations": true, - // "requireGuestProvisionSignal": true - // }, - // "networkProfile": { - // "networkInterfaces": [ - // { - // "id": "[resourceId('Microsoft.Network/networkInterfaces', parameters('networkInterfaces_opwenvm763_name'))]" - // } - // ] - // } - // } - // }, - // { - // "type": "Microsoft.Network/networkSecurityGroups/securityRules", - // "apiVersion": "2020-05-01", - // "name": "[concat(parameters('networkSecurityGroups_opwenvm_nsg_name'), '/HTTP')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" - // ], - // "properties": { - // "protocol": "TCP", - // "sourcePortRange": "*", - // "destinationPortRange": "80", - // "sourceAddressPrefix": "*", - // "destinationAddressPrefix": "*", - // "access": "Allow", - // "priority": 340, - // "direction": "Inbound", - // "sourcePortRanges": [], - // "destinationPortRanges": [], - // "sourceAddressPrefixes": [], - // "destinationAddressPrefixes": [] - // } - // }, - // { - // "type": "Microsoft.Network/networkSecurityGroups/securityRules", - // "apiVersion": "2020-05-01", - // "name": "[concat(parameters('networkSecurityGroups_opwenvm_nsg_name'), '/HTTPS')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" - // ], - // "properties": { - // "protocol": "TCP", - // "sourcePortRange": "*", - // "destinationPortRange": "443", - // "sourceAddressPrefix": "*", - // "destinationAddressPrefix": "*", - // "access": "Allow", - // "priority": 320, - // "direction": "Inbound", - // "sourcePortRanges": [], - // "destinationPortRanges": [], - // "sourceAddressPrefixes": [], - // "destinationAddressPrefixes": [] - // } - // }, - // { - // "type": "Microsoft.Network/networkSecurityGroups/securityRules", - // "apiVersion": "2020-05-01", - // "name": "[concat(parameters('networkSecurityGroups_opwenvm_nsg_name'), '/SSH')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" - // ], - // "properties": { - // "protocol": "TCP", - // "sourcePortRange": "*", - // "destinationPortRange": "22", - // "sourceAddressPrefix": "*", - // "destinationAddressPrefix": "*", - // "access": "Allow", - // "priority": 300, - // "direction": "Inbound", - // "sourcePortRanges": [], - // "destinationPortRanges": [], - // "sourceAddressPrefixes": [], - // "destinationAddressPrefixes": [] - // } - // }, - // { - // "type": "Microsoft.Network/virtualNetworks/subnets", - // "apiVersion": "2020-05-01", - // "name": "[concat(parameters('virtualNetworks_opwenvm_vnet_name'), '/default')]", - // "dependsOn": [ - // "[resourceId('Microsoft.Network/virtualNetworks', parameters('virtualNetworks_opwenvm_vnet_name'))]" - // ], - // "properties": { - // "addressPrefix": "10.0.0.0/24", - // "delegations": [], - // "privateEndpointNetworkPolicies": "Enabled", - // "privateLinkServiceNetworkPolicies": "Enabled" - // } - // }, - { - "type": "Microsoft.Network/networkInterfaces", - "apiVersion": "2020-05-01", - "name": "[parameters('networkInterfaces_opwenvm763_name')]", - "location": "eastus", - "dependsOn": [ - "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_opwenvm_ip_name'))]", - "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_opwenvm_vnet_name'), 'default')]", - "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" - ], - // "properties": { - // "ipConfigurations": [ - // { - // "name": "ipconfig1", - // "properties": { - // "privateIPAddress": "10.0.0.4", - // "privateIPAllocationMethod": "Dynamic", - // "publicIPAddress": { - // "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIPAddresses_opwenvm_ip_name'))]" - // }, - // "subnet": { - // "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('virtualNetworks_opwenvm_vnet_name'), 'default')]" - // }, - // "primary": true, - // "privateIPAddressVersion": "IPv4" - // } - // } - // ], - "dnsSettings": { - "dnsServers": [] - }, - "enableAcceleratedNetworking": true, - "enableIPForwarding": false, - "networkSecurityGroup": { - "id": "[resourceId('Microsoft.Network/networkSecurityGroups', parameters('networkSecurityGroups_opwenvm_nsg_name'))]" - } - } - } - ] -} \ No newline at end of file diff --git a/docker/setup/terraform/lokole_azure.tf b/docker/setup/terraform/lokole_azure.tf deleted file mode 100644 index e6fa32a5..00000000 --- a/docker/setup/terraform/lokole_azure.tf +++ /dev/null @@ -1,535 +0,0 @@ -#TODO: -# [X] - Configure VM -# [] - Configure Opwen Data -# [] - Configure Opwen Server -# [] - Configure Opwen Test -# [] - Configure dashboards -# [] - Verify depends_on aren't necessary. See celery in arm.tempalte.json. -# [] - Delete tags = {} if not necessary - - -# Configure the Microsoft Azure Provider -provider "azurerm" { - # The "feature" block is required for AzureRM provider 2.x. - # If you're using version 1.x, the "features" block is not allowed. - version = "~>2.0" - - features {} -} - -# ------------------------------ -# Server Resource Group -# ------------------------------ - -# Create the server resource group if it doesn't exist -resource "azurerm_resource_group" "server" { - name = "${var.RESOURCE_GROUP_NAME}server" - location = var.location - - tags = {} -} - -# ------------------------------ -# Data Resource Group -# ------------------------------ - -# Create a data resource group if it doesn't exist -resource "azurerm_resource_group" "data" { - name = "${var.RESOURCE_GROUP_NAME}data" - location = var.location - - tags = {} -} - -#TODO: data-template.json indicates encryption, cannot find on terraform. -# Create server table storage account if it doesn't exist -resource "azurerm_storage_account" "serverTablesName" { - name = var.serverTablesName - resource_group_name = azurerm_resource_group.data.name - location = azurerm_resource_group.data.location - account_kind = "Storage" - account_tier = "Standard" - account_replication_type = "GRS" - allow_blob_public_access = true - enable_https_traffic_only = false - - network_rules { - default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] - } - - tags = {} -} - -# Create server blob storage account if it doesn't exist -resource "azurerm_storage_account" "serverBlobsName" { - name = var.serverBlobsName - resource_group_name = azurerm_resource_group.data.name - location = azurerm_resource_group.data.location - account_kind = "Storage" - account_tier = "Standard" - account_replication_type = "GRS" - allow_blob_public_access = true - enable_https_traffic_only = false - - network_rules { - default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] - } - - tags = {} -} - -# Create client blob storage account if it doesn't exist -resource "azurerm_storage_account" "clientBlobsName" { - name = var.clientBlobsName - resource_group_name = azurerm_resource_group.data.name - location = azurerm_resource_group.data.location - account_kind = "Storage" - account_tier = "Standard" - account_replication_type = "GRS" - allow_blob_public_access = true - enable_https_traffic_only = false - - network_rules { - default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] - } - - tags = {} -} - -resource "azurerm_storage_container" "clientsauth" { - name = "clientsauth" - storage_account_name = azurerm_storage_account.serverTablesName.name - container_access_type = "private" -} - -resource "azurerm_storage_container" "pendingemails" { - name = "pendingemails" - storage_account_name = azurerm_storage_account.serverTablesName.name - container_access_type = "private" -} - -resource "azurerm_storage_container" "users" { - name = "users" - storage_account_name = azurerm_storage_account.serverTablesName.name - container_access_type = "private" -} - -resource "azurerm_storage_container" "emails" { - name = "emails" - storage_account_name = azurerm_storage_account.serverBlobsName.name - container_access_type = "private" -} - -resource "azurerm_storage_container" "mailbox" { - name = "mailbox" - storage_account_name = azurerm_storage_account.serverBlobsName.name - container_access_type = "private" -} - -resource "azurerm_storage_container" "secretsopwencluster" { - name = "secretsopwencluster" - storage_account_name = azurerm_storage_account.serverBlobsName.name - container_access_type = "private" -} - -resource "azurerm_storage_container" "sendgridinboundemails" { - name = "sendgridinboundemails" - storage_account_name = azurerm_storage_account.serverBlobsName.name - container_access_type = "private" -} - -resource "azurerm_storage_container" "compressedpackages" { - name = "compressedpackages" - storage_account_name = azurerm_storage_account.clientBlobsName.name - container_access_type = "private" -} - -# Create a server queue if it doesn't exist -resource "azurerm_servicebus_namespace" "data" { - name = var.serverQueuesName - location = azurerm_resource_group.data.location - resource_group_name = azurerm_resource_group.data.name - sku = "Standard" - zone_redundant = false -} - -resource "azurerm_servicebus_namespace_authorization_rule" "data" { - name = var.serverQueuesSasName - namespace_name = azurerm_servicebus_namespace.data.name - resource_group_name = azurerm_resource_group.data.name - send = true - listen = true - manage = true -} - -#! Verify if this one is created automatically -# resource "azurerm_servicebus_namespace_authorization_rule" "data" { -# name = "RootManageSharedAccessKey" -# namespace_name = "${azurerm_servicebus_namespace.data.name}" -# resource_group_name = "${azurerm_resource_group.data.name}" -# send = true -# listen = true -# manage = true -# } - -#! Verify if this one is created automatically -# resource "azurerm_servicebus_topic" "data" { -# name = "${var.RESOURCE_GROUP_NAME}-sbtopic" -# resource_group_name = "${azurerm_resource_group.data.name}" -# namespace_name = "${azurerm_servicebus_namespace.data.name}" -# enable_partitioning = true -# } - -#! Verify if this one is created automatically -# resource "azurerm_servicebus_subscription" "data" { -# name = "${var.RESOURCE_GROUP_NAME}-sbsubscription" -# resource_group_name = "${azurerm_resource_group.data.name}" -# namespace_name = "${azurerm_servicebus_namespace.data.name}" -# topic_name = "${azurerm_servicebus_topic.data.name}" -# max_delivery_count = 1 -# } - -resource "azurerm_servicebus_queue" "serverQueueSendgridMime" { - name = var.serverQueueSendgridMime - resource_group_name = azurerm_resource_group.data.name - namespace_name = azurerm_servicebus_namespace.data.name - max_size_in_megabytes = 5120 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false -} - -resource "azurerm_servicebus_queue" "serverQueueEmailSend" { - name = var.serverQueueEmailSend - resource_group_name = azurerm_resource_group.data.name - namespace_name = azurerm_servicebus_namespace.data.name - max_size_in_megabytes = 5120 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false -} - -resource "azurerm_servicebus_queue" "serverQueueClientPackage" { - name = var.serverQueueClientPackage - resource_group_name = azurerm_resource_group.data.name - namespace_name = azurerm_servicebus_namespace.data.name - max_size_in_megabytes = 5120 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false -} - -#! Verify these Queue items aren't populated automatically. It seems they are. -#! https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions -resource "azurerm_servicebus_queue" "mailboxreceived" { - name = "mailboxreceived" - resource_group_name = azurerm_resource_group.data.name - namespace_name = azurerm_servicebus_namespace.data.name - max_size_in_megabytes = 1024 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false -} - -resource "azurerm_servicebus_queue" "mailboxsent" { - name = "mailboxsent" - resource_group_name = azurerm_resource_group.data.name - namespace_name = azurerm_servicebus_namespace.data.name - max_size_in_megabytes = 1024 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false -} - -resource "azurerm_servicebus_queue" "register" { - name = "register" - resource_group_name = azurerm_resource_group.data.name - namespace_name = azurerm_servicebus_namespace.data.name - max_size_in_megabytes = 1024 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false -} - -resource "azurerm_servicebus_queue" "service" { - name = "service" - resource_group_name = azurerm_resource_group.data.name - namespace_name = azurerm_servicebus_namespace.data.name - max_size_in_megabytes = 1024 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false -} - -# ------------------------------ -# Test Resource Group -# ------------------------------ - -# Create a resource group if it doesn't exist -resource "azurerm_resource_group" "test" { - name = "${var.RESOURCE_GROUP_NAME}test" - location = var.location - - tags = {} -} - -# ------------------------------ -# Virtual Machine Resource Group -# ------------------------------ - -# Create a resource group if it doesn't exist -resource "azurerm_resource_group" "vm" { - name = var.vmName - location = var.location - - tags = {} -} - -#! Current infra uses port 24 on vnet, azure docs indicate to use 16 and 24 on subnet -# https://docs.microsoft.com/en-us/azure/developer/terraform/create-linux-virtual-machine-with-infrastructure -# Create virtual network -resource "azurerm_virtual_network" "vm" { - name = "vm-vnet" - location = var.location - resource_group_name = azurerm_resource_group.vm.name - address_space = ["10.0.0.0/16"] - - # subnet { - # name = "subnet1" - # address_prefix = "10.0.1.0/24" - # } - - tags = {} -} - -#! Verify address prefix. Current infra has "10.0.0.0/24" which is the same as primary -resource "azurerm_subnet" "vmsubnet" { - name = "vmsubnet" - resource_group_name = azurerm_resource_group.vm.name - virtual_network_name = azurerm_virtual_network.vm.name - address_prefix = "10.0.2.0/24" -} - -# Create public IPs -resource "azurerm_public_ip" "vm" { - name = "vm-ip" - location = var.location - resource_group_name = azurerm_resource_group.vm.name - allocation_method = "Dynamic" - sku = "Basic" - ip_version = "IPv4" - domain_name_label = "opwenvmtest" - #! Verify if this is necessary - #reverse_fqdn = "opwenvmtest.${var.location}.cloudapp.azure.com" - idle_timeout_in_minutes = 4 - - tags = {} -} - -# Create Network Security Group and rule -resource "azurerm_network_security_group" "vm" { - name = "vm-nsg" - location = var.location - resource_group_name = azurerm_resource_group.vm.name - - security_rule { - name = "SSH" - priority = 300 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "22" - source_address_prefix = "*" - destination_address_prefix = "*" - } - security_rule { - name = "HTTPS" - priority = 320 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "443" - source_address_prefix = "*" - destination_address_prefix = "*" - } - security_rule { - name = "HTTP" - priority = 340 - direction = "Inbound" - access = "Allow" - protocol = "Tcp" - source_port_range = "*" - destination_port_range = "80" - source_address_prefix = "*" - destination_address_prefix = "*" - } - # TODO: Add other security rules - # Inbound: HTTPS / HTTP / AllowVnetInbound / AllowAzureLoadBalancerInBound / DenyAllInBound - # Outbound: AllowVnetOutBound / AllowInternetOutBound / DenyAllOutBound - - tags = {} -} - -# Create network interface -# https://www.terraform.io/docs/providers/azurerm/r/network_interface.html -resource "azurerm_network_interface" "vm" { - name = "vm-nic" - location = var.location - resource_group_name = azurerm_resource_group.vm.name - - ip_configuration { - name = "vm-nicConfiguration" - private_ip_address_allocation = "Dynamic" - public_ip_address_id = azurerm_public_ip.vm.id - subnet_id = azurerm_subnet.vmsubnet.id - primary = true - } - - tags = {} -} - -# Connect the security group to the network interface -resource "azurerm_network_interface_security_group_association" "vm" { - network_interface_id = azurerm_network_interface.vm.id - network_security_group_id = azurerm_network_security_group.vm.id -} - -# Generate random text for a unique storage account name -resource "random_id" "randomId" { - keepers = { - # Generate a new ID only when a new resource group is defined - resource_group = azurerm_resource_group.vm.name - } - - byte_length = 8 -} - -#! Verify whether this is necessary -# Create storage account for boot diagnostics -resource "azurerm_storage_account" "vm" { - name = "diag${random_id.randomId.hex}" - resource_group_name = azurerm_resource_group.vm.name - location = var.location - account_tier = "Standard" - account_replication_type = "LRS" - - tags = {} -} - -# Create (and display) an SSH key -resource "tls_private_key" "vm" { - algorithm = "RSA" - rsa_bits = 4096 -} -output "tls_private_key" { value = tls_private_key.vm.private_key_pem } - -# Create virtual machine -resource "azurerm_linux_virtual_machine" "vm" { - name = "vm" - location = var.location - resource_group_name = azurerm_resource_group.vm.name - network_interface_ids = [azurerm_network_interface.vm.id] - size = "Standard_D4s_v3" - provision_vm_agent = true - - os_disk { - name = "vm-disk" - caching = "ReadWrite" - storage_account_type = "Premium_LRS" - # disk_size must exceed that of the image of the vm if declared explicitly. - # disk_size_gb = 30 - } - - source_image_reference { - publisher = "Canonical" - offer = "UbuntuServer" - sku = "18.04-LTS" - version = "latest" - } - - admin_username = var.RESOURCE_GROUP_NAME - disable_password_authentication = true - allow_extension_operations = true - - admin_ssh_key { - username = var.RESOURCE_GROUP_NAME - public_key = tls_private_key.vm.public_key_openssh - } - - boot_diagnostics { - storage_account_uri = azurerm_storage_account.vm.primary_blob_endpoint - } - - tags = {} -} \ No newline at end of file From 85eca658215e2b343b431ee1d9f96663a4d31c25 Mon Sep 17 00:00:00 2001 From: Shaun B Date: Wed, 28 Oct 2020 10:27:28 -0700 Subject: [PATCH 08/21] Add AKS configuration --- docker/setup/terraform/07_aks_cluster.tf | 30 ++++++++++++++++++++++++ docker/setup/terraform/terraform.tfvars | 4 ++++ docker/setup/terraform/variables.tf | 22 ++++++++++++++++- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 docker/setup/terraform/07_aks_cluster.tf diff --git a/docker/setup/terraform/07_aks_cluster.tf b/docker/setup/terraform/07_aks_cluster.tf new file mode 100644 index 00000000..f3da119f --- /dev/null +++ b/docker/setup/terraform/07_aks_cluster.tf @@ -0,0 +1,30 @@ +resource "azurerm_kubernetes_cluster" "default" { + name = "${random_pet.prefix.id}-aks" + location = var.location + resource_group_name = var.KUBERNETES_RESOURCE_GROUP_NAME + dns_prefix = "${random_pet.prefix.id}-k8s" + kubernetes_version = "${var.k8s_version}" + + default_node_pool { + name = var.k8sname + node_count = var.KUBERNETES_NODE_COUNT + vm_size = var.KUBERNETES_NODE_SKU + os_disk_size_gb = var.os_disk_size + } + + service_principal { + client_id = var.SP_APPID + client_secret = var.SP_PASSWORD + } + + role_based_access_control { + enabled = true + } + + addon_profile { + } + + tags = { + environment = "Demo" + } +} \ No newline at end of file diff --git a/docker/setup/terraform/terraform.tfvars b/docker/setup/terraform/terraform.tfvars index 85cd8aa9..e1c1439f 100644 --- a/docker/setup/terraform/terraform.tfvars +++ b/docker/setup/terraform/terraform.tfvars @@ -1,6 +1,10 @@ #TODO Using this as an example of the possibility. Given we populate from a docker-compose command, # I don't know if this will be super useful for us, vice utilising the Default values found in variables.tf # See: https://learn.hashicorp.com/tutorials/terraform/azure-variables +SP_APPID = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" +SP_PASSWORD = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" +SP_TENANT = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" +SUBSCRIPTION_ID = "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa" RESOURCE_GROUP_NAME = "opwen" vmName = "opwenvm" appinsightsName = "opwenlogs" diff --git a/docker/setup/terraform/variables.tf b/docker/setup/terraform/variables.tf index bd06ab2e..ec2397e0 100644 --- a/docker/setup/terraform/variables.tf +++ b/docker/setup/terraform/variables.tf @@ -83,4 +83,24 @@ variable "serverQueueClientPackage" { variable "serverQueueEmailSend" { type = string default = "send" -} \ No newline at end of file +} + +variable "k8s_version" { + description = "Version of Kubernetes to use" + default = "1.12.7" +} + +variable "KUBERNETES_NODE_SKU" { + description = "Azure VM type" + default = "Standard_D2" +} + +variable "os_type" { + description = "OS type for agents: Windows or Linux" + default = "Linux" +} + +variable "os_disk_size" { + description = "OS disk size in GB" + default = "30" +} From e831f774c9a1256505cc3193d1bb1b7dd2c9cf61 Mon Sep 17 00:00:00 2001 From: Shaun B Date: Wed, 28 Oct 2020 10:27:43 -0700 Subject: [PATCH 09/21] Add Cloudflare configuration --- docker/setup/terraform/01_provider.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docker/setup/terraform/01_provider.tf b/docker/setup/terraform/01_provider.tf index 3ee6a729..77ccce44 100644 --- a/docker/setup/terraform/01_provider.tf +++ b/docker/setup/terraform/01_provider.tf @@ -1,8 +1,16 @@ +variable "client_secret" { +} + # Configure the Microsoft Azure Provider provider "azurerm" { # The "feature" block is required for AzureRM provider 2.x. # If you're using version 1.x, the "features" block is not allowed. version = "=2.23.0" + subscription_id = var.SUBSCRIPTION_ID + client_id = var.SP_APPID + client_secret = var.SP_PASSWORD + tenant_id = var.SP_TENANT + features {} } \ No newline at end of file From 97e93d463caa5728a5c601dd85094adbabb2abf9 Mon Sep 17 00:00:00 2001 From: Shaun B Date: Fri, 6 Nov 2020 15:25:37 -0800 Subject: [PATCH 10/21] Add cloudflare terraform --- docker/setup/terraform/08_cloudflare.tf | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 docker/setup/terraform/08_cloudflare.tf diff --git a/docker/setup/terraform/08_cloudflare.tf b/docker/setup/terraform/08_cloudflare.tf new file mode 100644 index 00000000..e637083e --- /dev/null +++ b/docker/setup/terraform/08_cloudflare.tf @@ -0,0 +1,12 @@ +provider "cloudflare" { + email = var.cloudflare_user + token = var.cloudflare_key +} + +resource "cloudflare_record" "www" { + domain = "${var.ingressip}" + name = "${var.lokole_dns_name}" + value = "203.0.113.10" + type = "A" + proxied = false +} \ No newline at end of file From 5ed69702aa7389c6c9dd29c6f25cd4feb61288b0 Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Thu, 26 Nov 2020 23:06:12 -0800 Subject: [PATCH 11/21] Add Terraform to CI/CD --- .github/workflows/cd.yml | 23 +++++++++++++++++++++++ .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index b22c73ad..337784a5 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -6,6 +6,29 @@ on: - created jobs: + terraform: + runs-on: ubuntu-18.04 + + env: + ARM_CLIENT_ID: ${{secrets.SP_CLIENT}} + ARM_CLIENT_SECRET: ${{secrets.SP_PASSWORD}} + ARM_SUBSCRIPTION_ID: ${{secrets.SUBSCRIPTION_ID}} + ARM_TENANT_ID: ${{secrets.SP_TENANT}} + TF_ACTION_WORKING_DIR: "./docker/setup/terraform" + + steps: + - uses: actions/checkout@v2 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v1 + + - name: Terraform Init + run: terraform init + + - name: Terraform Apply + run: terraform apply -auto-approve + + release: runs-on: ubuntu-18.04 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b53deb98..1fb3aaea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,3 +63,28 @@ jobs: ci build verify-build - run: bash <(curl -s https://codecov.io/bash) if: ${{ success() }} + + terraform-plan: + runs-on: ubuntu-18.04 + + env: + ARM_CLIENT_ID: ${{secrets.SP_CLIENT}} + ARM_CLIENT_SECRET: ${{secrets.SP_PASSWORD}} + ARM_SUBSCRIPTION_ID: ${{secrets.SUBSCRIPTION_ID}} + ARM_TENANT_ID: ${{secrets.SP_TENANT}} + TF_ACTION_WORKING_DIR: "./docker/setup/terraform" + + steps: + - uses: actions/checkout@v2 + + - name: Setup Terraform + uses: hashicorp/setup-terraform@v1 + + - name: Terraform Init + run: terraform init + + - name: Terraform Format + run: terraform fmt -check + + - name: Terraform Plan + run: terraform plan From 68db66ffe40a01975924a98e4e4a10b52c98213b Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Thu, 26 Nov 2020 23:07:24 -0800 Subject: [PATCH 12/21] Add tstate RG --- docker/setup/terraform/01_provider.tf | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docker/setup/terraform/01_provider.tf b/docker/setup/terraform/01_provider.tf index 77ccce44..1be1effc 100644 --- a/docker/setup/terraform/01_provider.tf +++ b/docker/setup/terraform/01_provider.tf @@ -1,16 +1,17 @@ -variable "client_secret" { +# Configure Azure storage to manage Terraform State +# ref: https://docs.microsoft.com/en-us/azure/developer/terraform/store-state-in-azure-storage +terraform { + backend "azurerm" { + resource_group_name = "tstate" + storage_account_name = "tstate31414" + container_name = "tstate" + key = "terraform.tfstate" + } } # Configure the Microsoft Azure Provider provider "azurerm" { - # The "feature" block is required for AzureRM provider 2.x. - # If you're using version 1.x, the "features" block is not allowed. version = "=2.23.0" - subscription_id = var.SUBSCRIPTION_ID - client_id = var.SP_APPID - client_secret = var.SP_PASSWORD - tenant_id = var.SP_TENANT - features {} } \ No newline at end of file From dd1398420b3ecdd9b438f455ee82e9ae151337c0 Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Thu, 26 Nov 2020 23:08:44 -0800 Subject: [PATCH 13/21] Clean up terraform configs --- docker/setup/terraform/02_data_rg.tf | 27 ------------------- .../terraform/environments/terraform.tfvars | 11 ++++++++ docker/setup/terraform/outputs.tf | 24 ++++++++++++++++- docker/setup/terraform/variables.tf | 14 +++------- 4 files changed, 37 insertions(+), 39 deletions(-) create mode 100644 docker/setup/terraform/environments/terraform.tfvars diff --git a/docker/setup/terraform/02_data_rg.tf b/docker/setup/terraform/02_data_rg.tf index 800f24e8..e35a37b0 100644 --- a/docker/setup/terraform/02_data_rg.tf +++ b/docker/setup/terraform/02_data_rg.tf @@ -146,33 +146,6 @@ resource "azurerm_servicebus_namespace_authorization_rule" "data" { manage = true } -#! Verify if this one is created automatically -# resource "azurerm_servicebus_namespace_authorization_rule" "data" { -# name = "RootManageSharedAccessKey" -# namespace_name = "${azurerm_servicebus_namespace.data.name}" -# resource_group_name = "${azurerm_resource_group.data.name}" -# send = true -# listen = true -# manage = true -# } - -#! Verify if this one is created automatically -# resource "azurerm_servicebus_topic" "data" { -# name = "${var.RESOURCE_GROUP_NAME}-sbtopic" -# resource_group_name = "${azurerm_resource_group.data.name}" -# namespace_name = "${azurerm_servicebus_namespace.data.name}" -# enable_partitioning = true -# } - -#! Verify if this one is created automatically -# resource "azurerm_servicebus_subscription" "data" { -# name = "${var.RESOURCE_GROUP_NAME}-sbsubscription" -# resource_group_name = "${azurerm_resource_group.data.name}" -# namespace_name = "${azurerm_servicebus_namespace.data.name}" -# topic_name = "${azurerm_servicebus_topic.data.name}" -# max_delivery_count = 1 -# } - resource "azurerm_servicebus_queue" "serverQueueSendgridMime" { name = var.serverQueueSendgridMime resource_group_name = azurerm_resource_group.data.name diff --git a/docker/setup/terraform/environments/terraform.tfvars b/docker/setup/terraform/environments/terraform.tfvars new file mode 100644 index 00000000..cb5bc09c --- /dev/null +++ b/docker/setup/terraform/environments/terraform.tfvars @@ -0,0 +1,11 @@ +# RESOURCE_GROUP_NAME = "opwen" +# vmName = "opwenvm" +# appinsightsName = "opwenlogs" +# clientBlobsName = "opwenclient" +# serverBlobsName = "opwenserverblobs" +# serverTablesName = "opwenservertables" +# serverQueuesName = "opwenserverqueues" +# serverQueuesSasName = "celery" +# serverQueueSendgridMime = "inbound" +# serverQueueClientPackage = "written" +# serverQueueEmailSend = "send" \ No newline at end of file diff --git a/docker/setup/terraform/outputs.tf b/docker/setup/terraform/outputs.tf index 0930548f..34055fa8 100644 --- a/docker/setup/terraform/outputs.tf +++ b/docker/setup/terraform/outputs.tf @@ -52,4 +52,26 @@ output "Shared Access Policy PrimaryKey" { # "serverQueuesSasKey": { # "type": "string", # "value": "[listKeys(resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', variables('serverQueuesName'), variables('serverQueuesSasName')), '2017-04-01').primaryKey]" -# } \ No newline at end of file +# } + + +# The following is output: +# cat >/secrets/azure.env < Date: Thu, 26 Nov 2020 23:14:42 -0800 Subject: [PATCH 14/21] Add AZURE_STORAGE_ACCOUNT env --- .github/workflows/cd.yml | 1 + .github/workflows/ci.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 337784a5..820c8cce 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -14,6 +14,7 @@ jobs: ARM_CLIENT_SECRET: ${{secrets.SP_PASSWORD}} ARM_SUBSCRIPTION_ID: ${{secrets.SUBSCRIPTION_ID}} ARM_TENANT_ID: ${{secrets.SP_TENANT}} + AZURE_STORAGE_ACCOUNT: "tstate31414" TF_ACTION_WORKING_DIR: "./docker/setup/terraform" steps: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1fb3aaea..659421c4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,6 +72,7 @@ jobs: ARM_CLIENT_SECRET: ${{secrets.SP_PASSWORD}} ARM_SUBSCRIPTION_ID: ${{secrets.SUBSCRIPTION_ID}} ARM_TENANT_ID: ${{secrets.SP_TENANT}} + AZURE_STORAGE_ACCOUNT: "tstate31414" TF_ACTION_WORKING_DIR: "./docker/setup/terraform" steps: From 650f6f8173dcc656804e533fce82bfae8099de5f Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Thu, 26 Nov 2020 23:21:43 -0800 Subject: [PATCH 15/21] Remove AKS and Cloudflare --- docker/setup/terraform/07_aks_cluster.tf | 30 ------------------------ docker/setup/terraform/08_cloudflare.tf | 12 ---------- 2 files changed, 42 deletions(-) delete mode 100644 docker/setup/terraform/07_aks_cluster.tf delete mode 100644 docker/setup/terraform/08_cloudflare.tf diff --git a/docker/setup/terraform/07_aks_cluster.tf b/docker/setup/terraform/07_aks_cluster.tf deleted file mode 100644 index f3da119f..00000000 --- a/docker/setup/terraform/07_aks_cluster.tf +++ /dev/null @@ -1,30 +0,0 @@ -resource "azurerm_kubernetes_cluster" "default" { - name = "${random_pet.prefix.id}-aks" - location = var.location - resource_group_name = var.KUBERNETES_RESOURCE_GROUP_NAME - dns_prefix = "${random_pet.prefix.id}-k8s" - kubernetes_version = "${var.k8s_version}" - - default_node_pool { - name = var.k8sname - node_count = var.KUBERNETES_NODE_COUNT - vm_size = var.KUBERNETES_NODE_SKU - os_disk_size_gb = var.os_disk_size - } - - service_principal { - client_id = var.SP_APPID - client_secret = var.SP_PASSWORD - } - - role_based_access_control { - enabled = true - } - - addon_profile { - } - - tags = { - environment = "Demo" - } -} \ No newline at end of file diff --git a/docker/setup/terraform/08_cloudflare.tf b/docker/setup/terraform/08_cloudflare.tf deleted file mode 100644 index e637083e..00000000 --- a/docker/setup/terraform/08_cloudflare.tf +++ /dev/null @@ -1,12 +0,0 @@ -provider "cloudflare" { - email = var.cloudflare_user - token = var.cloudflare_key -} - -resource "cloudflare_record" "www" { - domain = "${var.ingressip}" - name = "${var.lokole_dns_name}" - value = "203.0.113.10" - type = "A" - proxied = false -} \ No newline at end of file From f59d851311cdf9be45440e1dfc701d1d2bbfd37a Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Thu, 26 Nov 2020 23:27:19 -0800 Subject: [PATCH 16/21] Add new line at end of file --- docker/setup/terraform/01_provider.tf | 2 +- docker/setup/terraform/04_vm_rg.tf | 4 ++-- docker/setup/terraform/05_test_rg.tf | 2 +- docker/setup/terraform/06_dashboards_rg.tf | 2 +- .../terraform/environments/terraform.tfvars | 2 +- docker/setup/terraform/outputs.tf | 2 +- docker/setup/terraform/variables.tf | 22 +------------------ 7 files changed, 8 insertions(+), 28 deletions(-) diff --git a/docker/setup/terraform/01_provider.tf b/docker/setup/terraform/01_provider.tf index 1be1effc..24630ae6 100644 --- a/docker/setup/terraform/01_provider.tf +++ b/docker/setup/terraform/01_provider.tf @@ -14,4 +14,4 @@ provider "azurerm" { version = "=2.23.0" features {} -} \ No newline at end of file +} diff --git a/docker/setup/terraform/04_vm_rg.tf b/docker/setup/terraform/04_vm_rg.tf index 1508be85..f91c8396 100644 --- a/docker/setup/terraform/04_vm_rg.tf +++ b/docker/setup/terraform/04_vm_rg.tf @@ -84,7 +84,7 @@ resource "azurerm_network_security_group" "vm" { source_address_prefix = "*" destination_address_prefix = "*" } - # TODO: Add other security rules + # Verify other security rules # Inbound: HTTPS / HTTP / AllowVnetInbound / AllowAzureLoadBalancerInBound / DenyAllInBound # Outbound: AllowVnetOutBound / AllowInternetOutBound / DenyAllOutBound @@ -182,4 +182,4 @@ resource "azurerm_linux_virtual_machine" "vm" { } tags = {} -} \ No newline at end of file +} diff --git a/docker/setup/terraform/05_test_rg.tf b/docker/setup/terraform/05_test_rg.tf index 6132f55b..6d2404f5 100644 --- a/docker/setup/terraform/05_test_rg.tf +++ b/docker/setup/terraform/05_test_rg.tf @@ -8,4 +8,4 @@ resource "azurerm_resource_group" "test" { location = var.location tags = {} -} \ No newline at end of file +} diff --git a/docker/setup/terraform/06_dashboards_rg.tf b/docker/setup/terraform/06_dashboards_rg.tf index 030c3897..7622b465 100644 --- a/docker/setup/terraform/06_dashboards_rg.tf +++ b/docker/setup/terraform/06_dashboards_rg.tf @@ -8,4 +8,4 @@ resource "azurerm_resource_group" "dashboards" { location = var.location tags = {} -} \ No newline at end of file +} diff --git a/docker/setup/terraform/environments/terraform.tfvars b/docker/setup/terraform/environments/terraform.tfvars index cb5bc09c..1a8f4b98 100644 --- a/docker/setup/terraform/environments/terraform.tfvars +++ b/docker/setup/terraform/environments/terraform.tfvars @@ -8,4 +8,4 @@ # serverQueuesSasName = "celery" # serverQueueSendgridMime = "inbound" # serverQueueClientPackage = "written" -# serverQueueEmailSend = "send" \ No newline at end of file +# serverQueueEmailSend = "send" diff --git a/docker/setup/terraform/outputs.tf b/docker/setup/terraform/outputs.tf index 34055fa8..9c253356 100644 --- a/docker/setup/terraform/outputs.tf +++ b/docker/setup/terraform/outputs.tf @@ -74,4 +74,4 @@ output "Shared Access Policy PrimaryKey" { # LOKOLE_EMAIL_SERVER_QUEUES_NAMESPACE=$(jq -r .properties.outputs.serverQueuesName.value /tmp/deployment.json) # LOKOLE_EMAIL_SERVER_QUEUES_SAS_NAME=$(jq -r .properties.outputs.serverQueuesSasName.value /tmp/deployment.json) # LOKOLE_EMAIL_SERVER_QUEUES_SAS_KEY=$(jq -r .properties.outputs.serverQueuesSasKey.value /tmp/deployment.json) -# EOF \ No newline at end of file +# EOF diff --git a/docker/setup/terraform/variables.tf b/docker/setup/terraform/variables.tf index 8c42d94b..86bc36f2 100644 --- a/docker/setup/terraform/variables.tf +++ b/docker/setup/terraform/variables.tf @@ -4,26 +4,6 @@ variable "RESOURCE_GROUP_NAME" { description = "The prefix which should be used for all resources in this application." } -# variable "SUBSCRIPTION_ID" { -# type = string -# description = "Lorum ipsum doler." -# } - -# variable "client_id" { -# type = string -# description = "Lorum ipsum doler." -# } - -# variable "SP_PASSWORD" { -# type = string -# description = "Lorum ipsum doler." -# } - -# variable "SP_TENANT" { -# type = string -# description = "Lorum ipsum doler." -# } - variable "location" { type = string default = "eastus" @@ -95,4 +75,4 @@ variable "os_disk_size" { type = string description = "OS disk size in GB" default = "30" -} \ No newline at end of file +} From e5388310c078d2e81f0898188b18682ef0185737 Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Sat, 5 Dec 2020 17:28:23 -0800 Subject: [PATCH 17/21] Update working-directory, extract fmt --- .github/workflows/ci.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 659421c4..e42e6ed7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,8 +72,10 @@ jobs: ARM_CLIENT_SECRET: ${{secrets.SP_PASSWORD}} ARM_SUBSCRIPTION_ID: ${{secrets.SUBSCRIPTION_ID}} ARM_TENANT_ID: ${{secrets.SP_TENANT}} - AZURE_STORAGE_ACCOUNT: "tstate31414" - TF_ACTION_WORKING_DIR: "./docker/setup/terraform" + + defaults: + run: + working-directory: "./docker/setup/terraform" steps: - uses: actions/checkout@v2 @@ -84,8 +86,5 @@ jobs: - name: Terraform Init run: terraform init - - name: Terraform Format - run: terraform fmt -check - - name: Terraform Plan run: terraform plan From 4d469dda08a2bc58f74d04e3212e05627463c83a Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Sat, 5 Dec 2020 17:29:36 -0800 Subject: [PATCH 18/21] Add terraform fmt and validate --- docker/ci/Dockerfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docker/ci/Dockerfile b/docker/ci/Dockerfile index f1bd7694..59155846 100644 --- a/docker/ci/Dockerfile +++ b/docker/ci/Dockerfile @@ -34,6 +34,14 @@ RUN wget -q https://github.com/mvdan/sh/releases/download/v${SHFMT_VERSION}/shfm && chmod +x /usr/local/bin/shfmt \ && shfmt -version +ARG TERRAFORM_VERSION=0.13.5 +RUN wget -q https://github.com/hashicorp/terraform/archive/v${TERRAFORM_VERSION}.tar.gz \ + && tar xf v${TERRAFORM_VERSION}.tar.gz \ + && mv v${TERRAFORM_VERSION} terraform \ + && cp terraform /usr/local/bin \ + && rm v${TERRAFORM_VERSION}.tar.gz \ + && terraform --version + COPY docker/ci/requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt @@ -70,3 +78,7 @@ RUN helm lint --strict ./helm/opwen_cloudserver \ && rm helm.yaml RUN shfmt -d -i 2 -ci . + +RUN terraform fmt -check + +RUN terraform validate -no-color \ No newline at end of file From eeaf94e12713589845c6d694d035909eded29c8f Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Sat, 5 Dec 2020 17:30:37 -0800 Subject: [PATCH 19/21] Remove default values to make more readable --- docker/setup/terraform/02_data_rg.tf | 116 +----------------- docker/setup/terraform/04_vm_rg.tf | 9 -- .../terraform/environments/terraform.tfvars | 11 -- docker/setup/terraform/outputs.tf | 77 ------------ docker/setup/terraform/terraform.tfvars | 19 --- docker/setup/terraform/variables.tf | 12 -- 6 files changed, 1 insertion(+), 243 deletions(-) delete mode 100644 docker/setup/terraform/environments/terraform.tfvars delete mode 100644 docker/setup/terraform/outputs.tf delete mode 100644 docker/setup/terraform/terraform.tfvars diff --git a/docker/setup/terraform/02_data_rg.tf b/docker/setup/terraform/02_data_rg.tf index e35a37b0..c38bdf26 100644 --- a/docker/setup/terraform/02_data_rg.tf +++ b/docker/setup/terraform/02_data_rg.tf @@ -28,16 +28,6 @@ resource "azurerm_storage_account" "serverTablesName" { account_kind = "Storage" account_tier = "Standard" account_replication_type = "GRS" - allow_blob_public_access = true - enable_https_traffic_only = false - - network_rules { - default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] - } - - tags = {} } # Create server blob storage account if it doesn't exist @@ -48,16 +38,6 @@ resource "azurerm_storage_account" "serverBlobsName" { account_kind = "Storage" account_tier = "Standard" account_replication_type = "GRS" - allow_blob_public_access = true - enable_https_traffic_only = false - - network_rules { - default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] - } - - tags = {} } # Create client blob storage account if it doesn't exist @@ -68,16 +48,6 @@ resource "azurerm_storage_account" "clientBlobsName" { account_kind = "Storage" account_tier = "Standard" account_replication_type = "GRS" - allow_blob_public_access = true - enable_https_traffic_only = false - - network_rules { - default_action = "Allow" - bypass = ["AzureServices"] - ip_rules = [] - } - - tags = {} } resource "azurerm_storage_container" "clientsauth" { @@ -150,19 +120,7 @@ resource "azurerm_servicebus_queue" "serverQueueSendgridMime" { name = var.serverQueueSendgridMime resource_group_name = azurerm_resource_group.data.name namespace_name = azurerm_servicebus_namespace.data.name - max_size_in_megabytes = 5120 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false + max_size_in_megabytes = 512 } resource "azurerm_servicebus_queue" "serverQueueEmailSend" { @@ -170,18 +128,6 @@ resource "azurerm_servicebus_queue" "serverQueueEmailSend" { resource_group_name = azurerm_resource_group.data.name namespace_name = azurerm_servicebus_namespace.data.name max_size_in_megabytes = 5120 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false } resource "azurerm_servicebus_queue" "serverQueueClientPackage" { @@ -189,18 +135,6 @@ resource "azurerm_servicebus_queue" "serverQueueClientPackage" { resource_group_name = azurerm_resource_group.data.name namespace_name = azurerm_servicebus_namespace.data.name max_size_in_megabytes = 5120 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false } resource "azurerm_servicebus_queue" "mailboxreceived" { @@ -208,18 +142,6 @@ resource "azurerm_servicebus_queue" "mailboxreceived" { resource_group_name = azurerm_resource_group.data.name namespace_name = azurerm_servicebus_namespace.data.name max_size_in_megabytes = 1024 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false } resource "azurerm_servicebus_queue" "mailboxsent" { @@ -227,18 +149,6 @@ resource "azurerm_servicebus_queue" "mailboxsent" { resource_group_name = azurerm_resource_group.data.name namespace_name = azurerm_servicebus_namespace.data.name max_size_in_megabytes = 1024 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false } resource "azurerm_servicebus_queue" "register" { @@ -246,18 +156,6 @@ resource "azurerm_servicebus_queue" "register" { resource_group_name = azurerm_resource_group.data.name namespace_name = azurerm_servicebus_namespace.data.name max_size_in_megabytes = 1024 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false } resource "azurerm_servicebus_queue" "service" { @@ -265,16 +163,4 @@ resource "azurerm_servicebus_queue" "service" { resource_group_name = azurerm_resource_group.data.name namespace_name = azurerm_servicebus_namespace.data.name max_size_in_megabytes = 1024 - - # Optional Values - lock_duration = "PT1M" - requires_duplicate_detection = false - requires_session = false - default_message_ttl = "P14D" - dead_lettering_on_message_expiration = false - duplicate_detection_history_time_window = "PT10M" - max_delivery_count = 10 - status = "Active" - enable_partitioning = false - enable_express = false } diff --git a/docker/setup/terraform/04_vm_rg.tf b/docker/setup/terraform/04_vm_rg.tf index f91c8396..451e4f21 100644 --- a/docker/setup/terraform/04_vm_rg.tf +++ b/docker/setup/terraform/04_vm_rg.tf @@ -10,8 +10,6 @@ resource "azurerm_resource_group" "vm" { tags = {} } -#! Current infra uses port 24 on vnet, azure docs indicate to use 16 and 24 on subnet -# https://docs.microsoft.com/en-us/azure/developer/terraform/create-linux-virtual-machine-with-infrastructure # Create virtual network resource "azurerm_virtual_network" "vm" { name = "vm-vnet" @@ -84,15 +82,11 @@ resource "azurerm_network_security_group" "vm" { source_address_prefix = "*" destination_address_prefix = "*" } - # Verify other security rules - # Inbound: HTTPS / HTTP / AllowVnetInbound / AllowAzureLoadBalancerInBound / DenyAllInBound - # Outbound: AllowVnetOutBound / AllowInternetOutBound / DenyAllOutBound tags = {} } # Create network interface -# https://www.terraform.io/docs/providers/azurerm/r/network_interface.html resource "azurerm_network_interface" "vm" { name = "vm-nic" location = azurerm_resource_group.vm.location @@ -125,7 +119,6 @@ resource "random_id" "randomVmId" { byte_length = 8 } -#! Verify whether this is necessary # Create storage account for boot diagnostics resource "azurerm_storage_account" "vm" { name = "diag${random_id.randomVmId.hex}" @@ -157,8 +150,6 @@ resource "azurerm_linux_virtual_machine" "vm" { name = "vm-disk" caching = "ReadWrite" storage_account_type = "Premium_LRS" - # disk_size must exceed that of the image of the vm if declared explicitly. - # disk_size_gb = 30 } source_image_reference { diff --git a/docker/setup/terraform/environments/terraform.tfvars b/docker/setup/terraform/environments/terraform.tfvars deleted file mode 100644 index 1a8f4b98..00000000 --- a/docker/setup/terraform/environments/terraform.tfvars +++ /dev/null @@ -1,11 +0,0 @@ -# RESOURCE_GROUP_NAME = "opwen" -# vmName = "opwenvm" -# appinsightsName = "opwenlogs" -# clientBlobsName = "opwenclient" -# serverBlobsName = "opwenserverblobs" -# serverTablesName = "opwenservertables" -# serverQueuesName = "opwenserverqueues" -# serverQueuesSasName = "celery" -# serverQueueSendgridMime = "inbound" -# serverQueueClientPackage = "written" -# serverQueueEmailSend = "send" diff --git a/docker/setup/terraform/outputs.tf b/docker/setup/terraform/outputs.tf deleted file mode 100644 index 9c253356..00000000 --- a/docker/setup/terraform/outputs.tf +++ /dev/null @@ -1,77 +0,0 @@ -#TODO: Ensure all outputs match TF format. setup.sh outputs found below. -/* -output "Namespace Connection String" { - value = "${azurerm_servicebus_namespace.example.default_primary_connection_string}" -} - -output "Shared Access Policy PrimaryKey" { - value = "${azurerm_servicebus_namespace.example.default_primary_key}" -} -*/ - -# "appinsightsName": { -# "type": "string", -# "value": "[variables('appinsightsName')]" -# }, -# "appinsightsKey": { -# "type": "string", -# "value": "[reference(resourceId('Microsoft.Insights/components', variables('appinsightsName')), '2014-04-01').InstrumentationKey]" -# }, -# "clientBlobsName": { -# "type": "string", -# "value": "[variables('clientBlobsName')]" -# }, -# "clientBlobsKey": { -# "type": "string", -# "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('clientBlobsName')), '2016-01-01').keys[0].value]" -# }, -# "serverBlobsName": { -# "type": "string", -# "value": "[variables('serverBlobsName')]" -# }, -# "serverBlobsKey": { -# "type": "string", -# "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('serverBlobsName')), '2016-01-01').keys[0].value]" -# }, -# "serverTablesName": { -# "type": "string", -# "value": "[variables('serverTablesName')]" -# }, -# "serverTablesKey": { -# "type": "string", -# "value": "[listKeys(resourceId('Microsoft.Storage/storageAccounts', variables('serverTablesName')), '2016-01-01').keys[0].value]" -# }, -# "serverQueuesName": { -# "type": "string", -# "value": "[variables('serverQueuesName')]" -# }, -# "serverQueuesSasName": { -# "type": "string", -# "value": "[variables('serverQueuesSasName')]" -# }, -# "serverQueuesSasKey": { -# "type": "string", -# "value": "[listKeys(resourceId('Microsoft.ServiceBus/namespaces/AuthorizationRules', variables('serverQueuesName'), variables('serverQueuesSasName')), '2017-04-01').primaryKey]" -# } - - -# The following is output: -# cat >/secrets/azure.env < Date: Sat, 5 Dec 2020 17:47:28 -0800 Subject: [PATCH 20/21] Update terraform file name --- docker/ci/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/ci/Dockerfile b/docker/ci/Dockerfile index 59155846..6fc9785a 100644 --- a/docker/ci/Dockerfile +++ b/docker/ci/Dockerfile @@ -37,7 +37,7 @@ RUN wget -q https://github.com/mvdan/sh/releases/download/v${SHFMT_VERSION}/shfm ARG TERRAFORM_VERSION=0.13.5 RUN wget -q https://github.com/hashicorp/terraform/archive/v${TERRAFORM_VERSION}.tar.gz \ && tar xf v${TERRAFORM_VERSION}.tar.gz \ - && mv v${TERRAFORM_VERSION} terraform \ + && mv terraform-${TERRAFORM_VERSION} terraform \ && cp terraform /usr/local/bin \ && rm v${TERRAFORM_VERSION}.tar.gz \ && terraform --version From 62d9e2596c1b2f4f45f84ee63d99c839090e71a2 Mon Sep 17 00:00:00 2001 From: Shaun Bathgate Date: Sat, 5 Dec 2020 18:01:09 -0800 Subject: [PATCH 21/21] Update terraform file name --- docker/ci/Dockerfile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docker/ci/Dockerfile b/docker/ci/Dockerfile index 6fc9785a..0d03fd95 100644 --- a/docker/ci/Dockerfile +++ b/docker/ci/Dockerfile @@ -35,11 +35,10 @@ RUN wget -q https://github.com/mvdan/sh/releases/download/v${SHFMT_VERSION}/shfm && shfmt -version ARG TERRAFORM_VERSION=0.13.5 -RUN wget -q https://github.com/hashicorp/terraform/archive/v${TERRAFORM_VERSION}.tar.gz \ - && tar xf v${TERRAFORM_VERSION}.tar.gz \ - && mv terraform-${TERRAFORM_VERSION} terraform \ +RUN wget -q https://releases.hashicorp.com/terraform/${TERRAFORM_VERSION}/terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ + && unzip terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ && cp terraform /usr/local/bin \ - && rm v${TERRAFORM_VERSION}.tar.gz \ + && rm terraform_${TERRAFORM_VERSION}_linux_amd64.zip \ && terraform --version COPY docker/ci/requirements.txt ./