From c2c2e30c7454d68fd9ae9d54f9a6656d603a427b Mon Sep 17 00:00:00 2001 From: Gabriel Monteiro Nepomuceno Date: Mon, 15 Jun 2020 11:37:19 +0100 Subject: [PATCH] This Commit change the resources to be auto generated from a json file (#2) * Adding auto generation * Correcting terraform fmt * Adding resource definitions * Correcting review * Correcting append Co-authored-by: Gabriel Nepomuceno --- README.md | 244 +++-- docs/defined_specs | 103 ++ docs/missing_resources.md | 93 ++ docs/not_defined.md | 61 ++ go.mod | 5 + go.sum | 2 + main.go | 64 ++ main.tf | 1704 ++++++++++++++++++++++++++++-- outputs.tf | 1458 +++++++++++--------------- resorceDefinition.jsonc | 18 - resourceDefinition.jsonc | 1774 ++++++++++++++++++++++++++++++++ resourceDefinition_guess.jsonc | 14 + templates/main.tmpl | 54 + templates/outputs.tmpl | 16 + variables.tf | 15 +- 15 files changed, 4586 insertions(+), 1039 deletions(-) create mode 100644 docs/defined_specs create mode 100644 docs/missing_resources.md create mode 100644 docs/not_defined.md create mode 100644 go.mod create mode 100644 go.sum create mode 100644 main.go delete mode 100644 resorceDefinition.jsonc create mode 100644 resourceDefinition.jsonc create mode 100644 resourceDefinition_guess.jsonc create mode 100644 templates/main.tmpl create mode 100644 templates/outputs.tmpl diff --git a/README.md b/README.md index 50dedf1..a996d50 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,46 @@ +# Azure Naming + +This module helps you to keep consistency on your resources names for terraform The goal of this module it is that for each resource that requires a name in terraform you would be easialy able to compose this name using this module and this will keep the consistency in your repositories. + +# Usage + +For every resource in `terraform_azurerm` just remove the `azurerm` part of the module and use the `name` property of this output. + +example for `azurerm_resource_group` you can use : + +```tf +module "naming" "main" { + suffix = [ "test" ] +} +resource "azurerm_resource_group" "example" { + name = module.naming.main.resource_group.name + location = "West Europe" +} +``` + +if you want this to be unique for this module and not shared with other instances of this module you can use `name_unique` + +```tf +module "naming" "main" { + suffix = [ "test" ] +} +resource "azurerm_resource_group" "example" { + name = module.naming.main.resource_group.name + location = "West Europe" +} +``` +There are other advances usages that will be explained in the [Advanced usages](#advancedusages) part og this docs. + +# Internals + +## Modifying resources + +The resources are automatically generated using `go` to change the generation please change the file on the `templates` folder. To add a new resource, include their definition at `resourceDefinition.jsonc` file it will be automatically generated. + +# Current implementation + +You can find a list bellow of all the resources that are currently implemented. To get a list of the ones that are missing implementation you can check at [Missing resources](docs/missing_ressources.md) the resources that have no documentation about their limitation on naming currently on Microsoft docs are on the [Not defined](docs/not_defined.md) list. + @@ -19,98 +62,175 @@ |------|-------------|------|---------|:--------:| | prefix | It is not recommended that you use prefix by azure you should be using a suffix for your resources. | `list(string)` | `[]` | no | | suffix | It is recommended that you specify a suffix for consistency. please use only lowercase charactes when possible | `list(string)` | `[]` | no | -| unique-include-numbers | n/a | `bool` | `true` | no | -| unique-length | n/a | `number` | `4` | no | -| unique-seed | n/a | `string` | `""` | no | +| unique-include-numbers | If you want to iunclude numbers in the unique generation | `bool` | `true` | no | +| unique-length | Max length of the uniquiness suffix to be added | `number` | `4` | no | +| unique-seed | Custom value for the randon charecters to be used | `string` | `""` | no | ## Outputs | Name | Description | |------|-------------| -| aks\_cluster | n/a | | analysis\_services\_server | n/a | -| api\_management | n/a | -| app\_service\_environment | n/a | -| app\_service\_plan | n/a | +| api\_managment\_service | n/a | +| app\_configuration | n/a | | application\_gateway | n/a | -| application\_insights | n/a | -| application\_security\_group | n/a | | automation\_account | n/a | +| automation\_certificate | n/a | +| automation\_credential | n/a | +| automation\_runbook | n/a | +| automation\_schedule | n/a | +| automation\_variable | n/a | | availability\_set | n/a | -| azure\_arc\_connected\_machine | n/a | -| blueprint | n/a | -| cloud\_service | n/a | -| cognitive\_search | n/a | -| cognitive\_services | n/a | -| container\_instance | n/a | -| cosmos\_db | n/a | +| bastion\_host | n/a | +| batch\_account | n/a | +| batch\_application | n/a | +| batch\_certificate | n/a | +| batch\_pool | n/a | +| bot\_channel\_Email | n/a | +| bot\_channel\_directline | n/a | +| bot\_channel\_ms\_teams | n/a | +| bot\_channel\_slack | n/a | +| bot\_channels\_registration | n/a | +| bot\_connection | n/a | +| bot\_web\_app | n/a | +| cdn\_endpoint | n/a | +| cdn\_profile | n/a | +| cognitive\_account | n/a | +| containerGroups | n/a | +| container\_registry | n/a | +| container\_registry\_webhook | n/a | +| cosmosdb\_account | n/a | +| custom\_provider | n/a | | data\_factory | n/a | +| data\_factory\_dataset\_mysql | n/a | +| data\_factory\_dataset\_postgresql | n/a | +| data\_factory\_dataset\_sql\_server\_table | n/a | +| data\_factory\_integration\_runtime\_managed | n/a | +| data\_factory\_linked\_service\_data\_lake\_storage\_gen2 | n/a | +| data\_factory\_linked\_service\_key\_vault | n/a | +| data\_factory\_linked\_service\_mysql | n/a | +| data\_factory\_linked\_service\_postgresql | n/a | +| data\_factory\_linked\_service\_sql\_server | n/a | +| data\_factory\_pipeline | n/a | +| data\_factory\_trigger\_schedule | n/a | | data\_lake\_analytics\_account | n/a | -| data\_lake\_file\_system | n/a | -| data\_lake\_store\_account | n/a | -| data\_warehouse | n/a | -| database\_migration\_service\_instance | n/a | +| data\_lake\_analytics\_firewall\_rule | n/a | +| data\_lake\_store | n/a | +| data\_lake\_store\_firewall\_rule | n/a | +| database\_migration\_project | n/a | +| database\_migration\_service | n/a | | databricks\_workspace | n/a | -| event\_hub | n/a | -| event\_hub\_authorization\_rule | n/a | -| event\_hub\_namespace | n/a | -| event\_hub\_namespace\_authorization\_rule | n/a | +| dev\_test\_lab | n/a | +| dev\_test\_linux\_virtual\_machine | n/a | +| dev\_test\_windows\_virtual\_machine | n/a | +| disk\_encryption\_set | n/a | +| eventhub | n/a | +| eventhub\_authorization\_rule | n/a | +| eventhub\_consumer\_group | n/a | +| eventhub\_namespace | n/a | +| eventhub\_namespace\_authorization\_rule | n/a | +| eventhub\_namespace\_disaster\_recovery\_config | n/a | +| express\_route\_circuit | n/a | +| express\_route\_gateway | n/a | | firewall | n/a | -| firewall\_ip\_configuration | n/a | -| function\_app | n/a | -| hdinsights\_hadoop\_cluster | n/a | -| hdinsights\_hbase\_cluster | n/a | -| hdinsights\_kafka\_cluster | n/a | -| hdinsights\_ml\_services\_cluster | n/a | -| hdinsights\_spark\_cluster | n/a | -| hdinsights\_storm\_cluster | n/a | -| iot\_hub | n/a | +| frontdoor | n/a | +| frontdoor\_firewall\_policy | n/a | +| hdinsight\_hadoop\_cluster | n/a | +| hdinsight\_hbase\_cluster | n/a | +| hdinsight\_interactive\_query\_cluster | n/a | +| hdinsight\_kafka\_cluster | n/a | +| hdinsight\_ml\_services\_cluster | n/a | +| hdinsight\_rserver\_cluster | n/a | +| hdinsight\_spark\_cluster | n/a | +| hdinsight\_storm\_cluster | n/a | +| image | n/a | +| iotcentral\_application | n/a | +| iothub | n/a | +| iothub\_consumer\_group | n/a | +| iothub\_dps | n/a | +| iothub\_dps\_certificate | n/a | | key\_vault | n/a | +| key\_vault\_certificate | n/a | | key\_vault\_key | n/a | -| load\_balancer\_external | n/a | -| load\_balancer\_internal | n/a | +| key\_vault\_secret | n/a | +| kubernetes\_cluster | n/a | +| kusto\_cluster | n/a | +| kusto\_database | n/a | +| kusto\_eventhub\_data\_connection | n/a | +| lb | n/a | +| lb\_nat\_rule | n/a | +| linux\_virtual\_machine | n/a | +| linux\_virtual\_machine\_scale\_set | n/a | | local\_network\_gateway | n/a | | log\_analytics\_workspace | n/a | -| logic\_apps | n/a | | machine\_learning\_workspace | n/a | -| migrate\_project | n/a | -| mysql | n/a | +| managed\_disk | n/a | +| maps\_account | n/a | +| mariadb\_database | n/a | +| mariadb\_firewall\_rule | n/a | +| mariadb\_server | n/a | +| mariadb\_virtual\_network\_rule | n/a | +| mssql\_database | n/a | +| mssql\_elasticpool | n/a | +| mssql\_server | n/a | +| mysql\_database | n/a | +| mysql\_firewall\_rule | n/a | +| mysql\_server | n/a | +| mysql\_virtual\_network\_rule | n/a | | network\_interface | n/a | -| network\_security\_group | n/a | -| notification\_hubs | n/a | -| notification\_hubs\_namespace | n/a | -| policy | n/a | -| postgre | n/a | -| private\_endpoint | n/a | -| private\_service\_connection | n/a | +| network\_watcher | n/a | +| point\_to\_site\_vpn\_gateway | n/a | +| postgresql\_database | n/a | +| postgresql\_firewall\_rule | n/a | +| postgresql\_server | n/a | +| postgresql\_virtual\_network\_rule | n/a | | public\_ip | n/a | -| recovery\_services\_vault | n/a | +| public\_ip\_prefix | n/a | | redis\_cache | n/a | -| resource\_group | n/a | -| service\_bus | n/a | -| service\_bus\_queue | n/a | -| service\_bus\_topic | n/a | -| service\_fabric | n/a | -| sql\_database | n/a | +| redis\_firewall\_rule | n/a | +| role\_assignment | n/a | +| role\_definition | n/a | +| route | n/a | +| route\_table | n/a | +| service\_fabric\_cluster | n/a | +| shared\_image | n/a | +| shared\_image\_gallery | n/a | +| snapshots | n/a | +| sql\_elasticpool | n/a | +| sql\_failover\_group | n/a | +| sql\_firewall\_rule | n/a | | sql\_server | n/a | -| sql\_server\_strech\_database | n/a | | storage\_account | n/a | -| storage\_managed\_encryption\_key | n/a | -| storagesimple | n/a | -| stream\_analytics | n/a | +| storage\_blob | n/a | +| storage\_container | n/a | +| storage\_data\_lake\_gen2\_filesystem | n/a | +| storage\_queue | n/a | +| storage\_share | n/a | +| storage\_share\_directory | n/a | +| storage\_table | n/a | +| stream\_analytics\_function\_javascript\_udf | n/a | +| stream\_analytics\_job | n/a | +| stream\_analytics\_output\_blob | n/a | +| stream\_analytics\_output\_eventhub | n/a | +| stream\_analytics\_output\_mssql | n/a | +| stream\_analytics\_output\_servicebus\_queue | n/a | +| stream\_analytics\_output\_servicebus\_topic | n/a | +| stream\_analytics\_reference\_input\_blob | n/a | +| stream\_analytics\_stream\_input\_blob | n/a | +| stream\_analytics\_stream\_input\_eventhub | n/a | +| stream\_analytics\_stream\_input\_iothub | n/a | | subnet | n/a | -| synapse | n/a | +| template\_deployment | n/a | | traffic\_manager\_profile | n/a | | unique-seed | n/a | | virtual\_machine | n/a | -| virtual\_machine\_linux | n/a | | virtual\_machine\_scale\_set | n/a | -| virtual\_machine\_scale\_set\_linux | n/a | | virtual\_network | n/a | | virtual\_network\_gateway | n/a | -| vm\_storage\_account | n/a | -| vpn\_connection | n/a | -| web\_app | n/a | +| virtual\_network\_peering | n/a | +| virtual\_wan | n/a | +| windows\_virtual\_machine | n/a | +| windows\_virtual\_machine\_scale\_set | n/a | diff --git a/docs/defined_specs b/docs/defined_specs new file mode 100644 index 0000000..4337d7d --- /dev/null +++ b/docs/defined_specs @@ -0,0 +1,103 @@ +az = { + // General + resource_group = "rg" + policy = "policy" + api_management = "apim" + + // Networking + virtual_network = "vnet" + subnet = "snet" + network_interface = "nic" + public_ip = "pip" + load_balancer_internal = "lbi" + load_balancer_external = "lbe" + network_security_group = "nsg" + application_security_group = "asg" + local_network_gateway = "lgw" + virtual_network_gateway = "vgw" + vpn_connection = "cn" + application_gateway = "agw" + route_table = "route" + traffic_manager_profile = "traf" + private_endpoint = "pe" // Not in the specs + private_service_connection = "psc" // Not in the specs + firewall = "fw" // Not in the specs + firewall_ip_configuration = "fwipc" // Not in the specs + + // Compute and Web + virtual_machine = "vm" + virtual_machine_scale_set = "vmss" + availability_set = "avail" + vm_storage_account = "stvm" + azure_arc_connected_machine = "arcm" + container_instance = "aci" + aks_cluster = "aks" + service_fabric = "sf" + app_service_environment = "ase" + app_service_plan = "plan" + web_app = "app" + function_app = "func" + cloud_service = "cld" + notification_hubs = "ntf" + notification_hubs_namespace = "ntfns" + + // Databases + azure_sql_database_server = "sql" + azure_sql_database = "sqldb" + cosmos_db = "cosmos" + azure_cache_redis = "redis" + mysql_database = "mysql" + postgre_database = "psql" + azure_data_warehouse = "sqldw" + azure_synapse_analytics = "syn" + sql_server_strech_database = "sqlstrdb" + + // Storage + storage_account = "st" + azure_storsimple = "ssimp" + storage_managed_encryption_key = "smek" # Not in the specs + + // AI + Machine Learning + azure_cognitive_search = "srch" + azure_cognitive_services = "cog" + azure_machine_learning_workspace = "mlw" + + // Analytics and IoT + azure_analysis_services_server = "as" + azure_databricks_workspace = "dbw" + azure_stream_analytics = "asa" + azure_data_factory = "adf" + data_lake_store_account = "dls" + data_lake_file_system = "dlfs" // Not in the specs + data_lake_analytics_account = "dla" + event_hub = "evh" + event_hub_namespace = "ehn" // Not in the specs + event_hub_namespace_authorization_rule = "ehnar" // Not in the specs + event_hub_authorization_rule = "ehar" // Not in the specs + hdinsights_hadoop_cluster = "hadoop" + hdinsights_hbase_cluster = "hbase" + hdinsights_kafka_cluster = "kafka" + hdinsights_spark_cluster = "spark" + hdinsights_storm_cluster = "storm" + hdinsights_ml_services_cluster = "mls" + iot_hub = "iot" + + // Integration + logic_apps = "logic" + service_bus = "sb" + service_bus_queue = "sbq" + service_bus_topic = "sbt" + automation_account = "aa" // Not in the specs + + // Managment and governance + blueprint = "bp" + key_vault = "kv" + key_vault_key = "kvk" + log_analytics_workspace = "log" + application_insights = "appi" + recovery_services_vault = "rsv" + + //Migration + azure_migrate_project = "migr" + database_migration_service_instance = "dms" + } \ No newline at end of file diff --git a/docs/missing_resources.md b/docs/missing_resources.md new file mode 100644 index 0000000..61b9815 --- /dev/null +++ b/docs/missing_resources.md @@ -0,0 +1,93 @@ +managed_application_definition +managed_application +proximity_placement_group +shared_image_version +virtual_machine_extension +virtual_machine_scale_set_extension +orchestrated_virtual_machine_scale_set / preview +sql_virtual_network_rule +dns_a_record +dns_aaaa_record +dns_caa_record +dns_cname_record +dns_mx_record +dns_ns_record +dns_ptr_record +dns_srv_record +dns_txt_record +dns_zone +private_dns_a_record +private_dns_a_record +private_dns_aaaa_record +private_dns_cname_record +private_dns_mx_record +private_dns_ptr_record +private_dns_srv_record +private_dns_txt_record +private_dns_zone +private_dns_zone_virtual_network_link +iot_time_series_insights_access_policy +iot_time_series_insights_standard_environment +iot_time_series_insights_reference_data_set +log_analytics_datasource_windows_event +log_analytics_datasource_windows_performance_counter +log_analytics_linked_service +log_analytics_solution +logic_app_action_custom +logic_app_action_http +logic_app_integration_account +logic_app_trigger_custom +logic_app_trigger_http_request +logic_app_trigger_recurrence +logic_app_workflow +maintenance_configuration +management_lock +management_group +media_services_account +spatial_anchors_account +eventgrid_domain +eventgrid_domain_topic +eventgrid_event_subscription +eventgrid_topic +notification_hub +notification_hub_authorization_rule +notification_hub_namespace +relay_hybrid_connection +relay_namespace +servicebus_namespace +servicebus_namespace_authorization_rule +servicebus_queue +servicebus_queue_authorization_rule +servicebus_subscription +servicebus_subscription_rule +servicebus_topic +servicebus_topic_authorization_rule +signalr_service +scheduled_query_rule_log +application_security_group +network_ddos_protection_plan +express_route_circuit_authorization +nat_gateway +network_packet_capture +network_profile +network_security_group +network_security_rule +packet_capture //deprecated +private_link_service +web_application_firewall_policy +netapp_account +netapp_pool +netapp_volume +netapp_snapshot +dashboard +powerbi_embedded +recovery_services_vault +site_recovery_fabric +site_recovery_network_mapping +site_recovery_protection_container_mapping +site_recovery_protection_container +site_recovery_replicated_vm +site_recovery_replication_policy +hpc_cache +hpc_cache_nfs_target +hpc_cache_blob_target \ No newline at end of file diff --git a/docs/not_defined.md b/docs/not_defined.md new file mode 100644 index 0000000..b64bd08 --- /dev/null +++ b/docs/not_defined.md @@ -0,0 +1,61 @@ +# Not Difined limits + +// https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftdocumentdb +kubernetes_cluster_node_pool +cosmosdb_cassandra_keyspace +cosmosdb_gremlin_database +cosmosdb_gremlin_graph +cosmosdb_mongo_collection +cosmosdb_mongo_database +cosmosdb_sql_container +cosmosdb_sql_database +cosmosdb_table +cost_management_export_resource_group +mariadb_configuration +mysql_configuration +postgresql_configuration +policy_assignment +policy_definition +policy_remediation +policy_set_definition +data_share +data_share_account +devspace_controller +dev_test_policy +dev_test_schedule +dev_test_virtual_network +healthcare_service +iothub_dps_shared_access_policy +iothub_endpoint_eventhub +iothub_endpoint_servicebus_queue +iothub_endpoint_servicebus_topic +iothub_endpoint_storage_container +iothub_route +iothub_shared_access_policy +lb_backend_address_pool +lb_rule +lb_outbound_rule +lb_nat_pool +lb_probe +traffic_manager_endpoint +virtual_hub +virtual_hub_connection +virtual_network_gateway_connection +vpn_server_configuration +firewall_ip_configuration +firewall_application_rule_collection +firewall_nat_rule_collection +firewall_network_rule_collection +monitor_action_group +monitor_action_rule_action_group +monitor_action_rule_suppression +monitor_activity_log_alert +monitor_autoscale_setting +monitor_diagnostic_setting +monitor_log_profile +monitor_metric_alert +monitor_scheduled_query_rules_alert +storage_table_entity +search_service +sentinel_alert_rule_ms_security_incident +sentinel_alert_rule_scheduled diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..2b38988 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/azure/terraform-azurerm-naming + +go 1.13 + +require muzzammil.xyz/jsonc v0.0.0-20200303171503-1e787b591db7 diff --git a/go.sum b/go.sum new file mode 100644 index 0000000..f3c2311 --- /dev/null +++ b/go.sum @@ -0,0 +1,2 @@ +muzzammil.xyz/jsonc v0.0.0-20200303171503-1e787b591db7 h1:3CowZIBYWC4gEerMAHeKy4jF2fHoS45Q27yqsU/BsX0= +muzzammil.xyz/jsonc v0.0.0-20200303171503-1e787b591db7/go.mod h1:rFv8tUUKe+QLh7v02BhfxXEf4ZHhYD7unR93HL/1Uvo= diff --git a/main.go b/main.go new file mode 100644 index 0000000..e05222e --- /dev/null +++ b/main.go @@ -0,0 +1,64 @@ +package main + +import ( + "encoding/json" + "io/ioutil" + "log" + "os" + "text/template" + + "muzzammil.xyz/jsonc" +) + +// Resource definityion for the package +type Resource struct { + Name string `json:"name"` + Length *Length `json:"length,omitempty"` + Regex *string `json:"regex,omitempty"` + Scope *string `json:"scope,omitempty"` + Slug *string `json:"slug,omitempty"` + Dashes bool `json:"dashes"` +} + +// Length allowed for that resorce +type Length struct { + Min int `json:"min"` + Max int `json:"max"` +} + +func main() { + files, err := ioutil.ReadDir("templates") + if err != nil { + log.Fatal(err) + } + var fileNames = make([]string, len(files)) + for i, file := range files { + fileNames[i] = "templates/" + file.Name() + } + parsedTemplate, err := template.ParseFiles(fileNames...) + if err != nil { + log.Fatal(err) + } + + sourceDefinitions, err := ioutil.ReadFile("resourceDefinition.jsonc") + if err != nil { + log.Fatal(err) + } + var data []Resource + jc := jsonc.ToJSON(sourceDefinitions) + err = json.Unmarshal(jc, &data) + if err != nil { + log.Fatal(err) + } + + mainFile, err := os.OpenFile("main.tf", os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + log.Fatal(err) + } + parsedTemplate.ExecuteTemplate(mainFile, "main", data) + outputsFile, err := os.OpenFile("outputs.tf", os.O_TRUNC|os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + log.Fatal(err) + } + parsedTemplate.ExecuteTemplate(outputsFile, "outputs", data) +} diff --git a/main.tf b/main.tf index 5d42d05..16d2694 100644 --- a/main.tf +++ b/main.tf @@ -31,109 +31,1605 @@ locals { // Names based in the recomendations of // https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging az = { - // General - resource_group = "rg" - policy = "policy" - api_management = "apim" - - // Networking - virtual_network = "vnet" - subnet = "snet" - network_interface = "nic" - public_ip = "pip" - load_balancer_internal = "lbi" - load_balancer_external = "lbe" - network_security_group = "nsg" - application_security_group = "asg" - local_network_gateway = "lgw" - virtual_network_gateway = "vgw" - vpn_connection = "cn" - application_gateway = "agw" - route_table = "route" - traffic_manager_profile = "traf" - private_endpoint = "pe" // Not in the specs - private_service_connection = "psc" // Not in the specs - firewall = "fw" // Not in the specs - firewall_ip_configuration = "fwipc" // Not in the specs - - // Compute and Web - virtual_machine = "vm" - virtual_machine_scale_set = "vmss" - availability_set = "avail" - vm_storage_account = "stvm" - azure_arc_connected_machine = "arcm" - container_instance = "aci" - aks_cluster = "aks" - service_fabric = "sf" - app_service_environment = "ase" - app_service_plan = "plan" - web_app = "app" - function_app = "func" - cloud_service = "cld" - notification_hubs = "ntf" - notification_hubs_namespace = "ntfns" - - // Databases - azure_sql_database_server = "sql" - azure_sql_database = "sqldb" - cosmos_db = "cosmos" - azure_cache_redis = "redis" - mysql_database = "mysql" - postgre_database = "psql" - azure_data_warehouse = "sqldw" - azure_synapse_analytics = "syn" - sql_server_strech_database = "sqlstrdb" - - // Storage - storage_account = "st" - azure_storsimple = "ssimp" - storage_managed_encryption_key = "smek" # Not in the specs - - // AI + Machine Learning - azure_cognitive_search = "srch" - azure_cognitive_services = "cog" - azure_machine_learning_workspace = "mlw" - - // Analytics and IoT - azure_analysis_services_server = "as" - azure_databricks_workspace = "dbw" - azure_stream_analytics = "asa" - azure_data_factory = "adf" - data_lake_store_account = "dls" - data_lake_file_system = "dlfs" // Not in the specs - data_lake_analytics_account = "dla" - event_hub = "evh" - event_hub_namespace = "ehn" // Not in the specs - event_hub_namespace_authorization_rule = "ehnar" // Not in the specs - event_hub_authorization_rule = "ehar" // Not in the specs - hdinsights_hadoop_cluster = "hadoop" - hdinsights_hbase_cluster = "hbase" - hdinsights_kafka_cluster = "kafka" - hdinsights_spark_cluster = "spark" - hdinsights_storm_cluster = "storm" - hdinsights_ml_services_cluster = "mls" - iot_hub = "iot" - - // Integration - logic_apps = "logic" - service_bus = "sb" - service_bus_queue = "sbq" - service_bus_topic = "sbt" - automation_account = "aa" // Not in the specs - - // Managment and governance - blueprint = "bp" - key_vault = "kv" - key_vault_key = "kvk" - log_analytics_workspace = "log" - application_insights = "appi" - recovery_services_vault = "rsv" - - //Migration - azure_migrate_project = "migr" - database_migration_service_instance = "dms" + analysis_services_server = { + name = substr(join("", compact([local.prefix_safe, "as", local.suffix_safe])), 0, 63) + name_unique = substr(join("", compact([local.prefix_safe, "as", local.suffix_unique_safe])), 0, 63) + dashes = false + slug = "as" + min_length = 3 + max_length = 63 + scope = "resourceGroup" + regex = "/^(?=.{3,63}$)[a-z][a-z0-9]+$/" + } + api_managment_service = { + name = substr(join("", compact([local.prefix_safe, "apim", local.suffix_safe])), 0, 50) + name_unique = substr(join("", compact([local.prefix_safe, "apim", local.suffix_unique_safe])), 0, 50) + dashes = false + slug = "apim" + min_length = 1 + max_length = 50 + scope = "global" + regex = "/^(?=.{1,50}$)[a-z][a-zA-Z0-9]+$/" + } + app_configuration = { + name = substr(join("-", compact([local.prefix, "appcg", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "appcg", local.suffix_unique])), 0, 50) + dashes = true + slug = "appcg" + min_length = 5 + max_length = 50 + scope = "resourceGroup" + regex = "/^(?=.{5,50}$)[a-zA-Z0-9_-]+$/" + } + role_assignment = { + name = substr(join("-", compact([local.prefix, "ra", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "ra", local.suffix_unique])), 0, 64) + dashes = true + slug = "ra" + min_length = 1 + max_length = 64 + scope = "assignment" + regex = "/^(?=.{1,64}$)[^%]+[^ %.]$/" + } + role_definition = { + name = substr(join("-", compact([local.prefix, "rd", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "rd", local.suffix_unique])), 0, 64) + dashes = true + slug = "rd" + min_length = 1 + max_length = 64 + scope = "definition" + regex = "/^(?=.{1,64}$)[^%]+[^ %.]$/" + } + automation_account = { + name = substr(join("-", compact([local.prefix, "aa", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "aa", local.suffix_unique])), 0, 50) + dashes = true + slug = "aa" + min_length = 6 + max_length = 50 + scope = "resourceGroup" + regex = "/^(?=.{6,50}$)[a-zA-Z][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + automation_certificate = { + name = substr(join("-", compact([local.prefix, "aacert", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "aacert", local.suffix_unique])), 0, 128) + dashes = true + slug = "aacert" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[^<>*%:.?\\+\\/]+[^<>*%:.?\\+\\/ ]$/" + } + automation_credential = { + name = substr(join("-", compact([local.prefix, "aacred", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "aacred", local.suffix_unique])), 0, 128) + dashes = true + slug = "aacred" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[^<>*%:.?\\+\\/]+[^<>*%:.?\\+\\/ ]$/" + } + automation_runbook = { + name = substr(join("-", compact([local.prefix, "aacred", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "aacred", local.suffix_unique])), 0, 63) + dashes = true + slug = "aacred" + min_length = 1 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z][a-zA-Z0-9-]+$/" + } + automation_schedule = { + name = substr(join("-", compact([local.prefix, "aasched", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "aasched", local.suffix_unique])), 0, 128) + dashes = true + slug = "aasched" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[^<>*%:.?\\+\\/]+[^<>*%:.?\\+\\/ ]$/" + } + automation_variable = { + name = substr(join("-", compact([local.prefix, "aavar", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "aavar", local.suffix_unique])), 0, 128) + dashes = true + slug = "aavar" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[^<>*%:.?\\+\\/]+[^<>*%:.?\\+\\/ ]$/" + } + batch_account = { + name = substr(join("", compact([local.prefix_safe, "ba", local.suffix_safe])), 0, 24) + name_unique = substr(join("", compact([local.prefix_safe, "ba", local.suffix_unique_safe])), 0, 24) + dashes = false + slug = "ba" + min_length = 3 + max_length = 24 + scope = "region" + regex = "/^(?=.{3,24}$)[a-z0-9]+$/" + } + batch_application = { + name = substr(join("-", compact([local.prefix, "baapp", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "baapp", local.suffix_unique])), 0, 64) + dashes = true + slug = "baapp" + min_length = 1 + max_length = 64 + scope = "parent" + regex = "/^(?=.{1,64}$)[a-zA-Z0-9_-]+$/" + } + batch_certificate = { + name = substr(join("-", compact([local.prefix, "bacert", local.suffix])), 0, 45) + name_unique = substr(join("-", compact([local.prefix, "bacert", local.suffix_unique])), 0, 45) + dashes = true + slug = "bacert" + min_length = 5 + max_length = 45 + scope = "parent" + regex = "/^(?=.{5,45}$)[a-zA-Z0-9_-]+$/" + } + batch_pool = { + name = substr(join("-", compact([local.prefix, "bapool", local.suffix])), 0, 24) + name_unique = substr(join("-", compact([local.prefix, "bapool", local.suffix_unique])), 0, 24) + dashes = true + slug = "bapool" + min_length = 3 + max_length = 24 + scope = "parent" + regex = "/^(?=.{1,64}$)[a-zA-Z0-9_-]+$/" + } + bot_web_app = { + name = substr(join("-", compact([local.prefix, "bot", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "bot", local.suffix_unique])), 0, 64) + dashes = true + slug = "bot" + min_length = 2 + max_length = 64 + scope = "global" + regex = "/^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$/" + } + bot_channel_Email = { + name = substr(join("-", compact([local.prefix, "botmail", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "botmail", local.suffix_unique])), 0, 64) + dashes = true + slug = "botmail" + min_length = 2 + max_length = 64 + scope = "parent" + regex = "/^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$/" + } + bot_channel_ms_teams = { + name = substr(join("-", compact([local.prefix, "botteams", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "botteams", local.suffix_unique])), 0, 64) + dashes = true + slug = "botteams" + min_length = 2 + max_length = 64 + scope = "parent" + regex = "/^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$/" + } + bot_channel_slack = { + name = substr(join("-", compact([local.prefix, "botslack", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "botslack", local.suffix_unique])), 0, 64) + dashes = true + slug = "botslack" + min_length = 2 + max_length = 64 + scope = "parent" + regex = "/^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$/" + } + bot_channel_directline = { + name = substr(join("-", compact([local.prefix, "botline", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "botline", local.suffix_unique])), 0, 64) + dashes = true + slug = "botline" + min_length = 2 + max_length = 64 + scope = "parent" + regex = "/^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$/" + } + bot_channels_registration = { + name = substr(join("-", compact([local.prefix, "botchan", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "botchan", local.suffix_unique])), 0, 64) + dashes = true + slug = "botchan" + min_length = 2 + max_length = 64 + scope = "parent" + regex = "/^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$/" + } + bot_connection = { + name = substr(join("-", compact([local.prefix, "botcon", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "botcon", local.suffix_unique])), 0, 64) + dashes = true + slug = "botcon" + min_length = 2 + max_length = 64 + scope = "parent" + regex = "/^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$/" + } + redis_cache = { + name = substr(join("-", compact([local.prefix, "redis", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "redis", local.suffix_unique])), 0, 63) + dashes = true + slug = "redis" + min_length = 1 + max_length = 63 + scope = "global" + regex = "/^(?=.{1,50}$)(?!.*--)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + redis_firewall_rule = { + name = substr(join("", compact([local.prefix_safe, "redisfw", local.suffix_safe])), 0, 256) + name_unique = substr(join("", compact([local.prefix_safe, "redisfw", local.suffix_unique_safe])), 0, 256) + dashes = false + slug = "redisfw" + min_length = 1 + max_length = 256 + scope = "parent" + regex = "/^(?=.{1,256}$)[a-zA-Z0-9]+$/" + } + cdn_profile = { + name = substr(join("-", compact([local.prefix, "cdnprof", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "cdnprof", local.suffix_unique])), 0, 260) + dashes = true + slug = "cdnprof" + min_length = 1 + max_length = 260 + scope = "resourceGroup" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + cdn_endpoint = { + name = substr(join("-", compact([local.prefix, "cdn", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "cdn", local.suffix_unique])), 0, 50) + dashes = true + slug = "cdn" + min_length = 1 + max_length = 50 + scope = "global" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + cognitive_account = { + name = substr(join("-", compact([local.prefix, "cog", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "cog", local.suffix_unique])), 0, 64) + dashes = true + slug = "cog" + min_length = 2 + max_length = 64 + scope = "resourceGroup" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][a-zA-Z0-9-]+$/" + } + availability_set = { + name = substr(join("-", compact([local.prefix, "avail", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "avail", local.suffix_unique])), 0, 80) + dashes = true + slug = "avail" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9_]$/" + } + disk_encryption_set = { + name = substr(join("-", compact([local.prefix, "des", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "des", local.suffix_unique])), 0, 80) + dashes = true + slug = "des" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9_]+$/" + } + image = { + name = substr(join("-", compact([local.prefix, "img", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "img", local.suffix_unique])), 0, 80) + dashes = true + slug = "img" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9_]$/" + } + linux_virtual_machine = { + name = substr(join("-", compact([local.prefix, "vm", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "vm", local.suffix_unique])), 0, 64) + dashes = true + slug = "vm" + min_length = 1 + max_length = 64 + scope = "resourceGroup" + regex = "/^(?=.{1,64}$)[^\\/\"\\[\\]:|<>+=;,?*@&_][^\\/\"\\[\\]:|<>+=;,?*@&]+[^\\/\"\\[\\]:|<>+=;,?*@&.-]$/" + } + linux_virtual_machine_scale_set = { + name = substr(join("-", compact([local.prefix, "vmss", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "vmss", local.suffix_unique])), 0, 64) + dashes = true + slug = "vmss" + min_length = 1 + max_length = 64 + scope = "resourceGroup" + regex = "/^(?=.{1,64}$)[^\\/\"\\[\\]:|<>+=;,?*@&_][^\\/\"\\[\\]:|<>+=;,?*@&]+[^\\/\"\\[\\]:|<>+=;,?*@&.-]$/" + } + managed_disk = { + name = substr(join("-", compact([local.prefix, "dsk", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "dsk", local.suffix_unique])), 0, 80) + dashes = true + slug = "dsk" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9_]+$/" + } + virtual_machine = { + name = substr(join("-", compact([local.prefix, "vm", local.suffix])), 0, 15) + name_unique = substr(join("-", compact([local.prefix, "vm", local.suffix_unique])), 0, 15) + dashes = true + slug = "vm" + min_length = 1 + max_length = 15 + scope = "resourceGroup" + regex = "/^(?=.{1,15}$)[^\\/\"\\[\\]:|<>+=;,?*@&_][^\\/\"\\[\\]:|<>+=;,?*@&]+[^\\/\"\\[\\]:|<>+=;,?*@&.-]$/" + } + virtual_machine_scale_set = { + name = substr(join("-", compact([local.prefix, "vmss", local.suffix])), 0, 15) + name_unique = substr(join("-", compact([local.prefix, "vmss", local.suffix_unique])), 0, 15) + dashes = true + slug = "vmss" + min_length = 1 + max_length = 15 + scope = "resourceGroup" + regex = "/^(?=.{1,15}$)[^\\/\"\\[\\]:|<>+=;,?*@&_][^\\/\"\\[\\]:|<>+=;,?*@&]+[^\\/\"\\[\\]:|<>+=;,?*@&.-]$/" + } + windows_virtual_machine = { + name = substr(join("-", compact([local.prefix, "vm", local.suffix])), 0, 15) + name_unique = substr(join("-", compact([local.prefix, "vm", local.suffix_unique])), 0, 15) + dashes = true + slug = "vm" + min_length = 1 + max_length = 15 + scope = "resourceGroup" + regex = "/^(?=.{1,15}$)[^\\/\"\\[\\]:|<>+=;,?*@&_][^\\/\"\\[\\]:|<>+=;,?*@&]+[^\\/\"\\[\\]:|<>+=;,?*@&.-]$/" + } + windows_virtual_machine_scale_set = { + name = substr(join("-", compact([local.prefix, "vmss", local.suffix])), 0, 15) + name_unique = substr(join("-", compact([local.prefix, "vmss", local.suffix_unique])), 0, 15) + dashes = true + slug = "vmss" + min_length = 1 + max_length = 15 + scope = "resourceGroup" + regex = "/^(?=.{1,15}$)[^\\/\"\\[\\]:|<>+=;,?*@&_][^\\/\"\\[\\]:|<>+=;,?*@&]+[^\\/\"\\[\\]:|<>+=;,?*@&.-]$/" + } + containerGroups = { + name = substr(join("-", compact([local.prefix, "cg", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "cg", local.suffix_unique])), 0, 63) + dashes = true + slug = "cg" + min_length = 1 + max_length = 63 + scope = "resourceGroup" + regex = "/^(?=.{1,63}$)(?!.*--)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + container_registry = { + name = substr(join("", compact([local.prefix_safe, "cr", local.suffix_safe])), 0, 63) + name_unique = substr(join("", compact([local.prefix_safe, "cr", local.suffix_unique_safe])), 0, 63) + dashes = false + slug = "cr" + min_length = 1 + max_length = 63 + scope = "resourceGroup" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9]+$/" + } + container_registry_webhook = { + name = substr(join("", compact([local.prefix_safe, "crwh", local.suffix_safe])), 0, 50) + name_unique = substr(join("", compact([local.prefix_safe, "crwh", local.suffix_unique_safe])), 0, 50) + dashes = false + slug = "crwh" + min_length = 1 + max_length = 50 + scope = "resourceGroup" + regex = "/^(?=.{5,50}$)[a-zA-Z0-9]+$/" + } + kubernetes_cluster = { + name = substr(join("-", compact([local.prefix, "aks", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "aks", local.suffix_unique])), 0, 63) + dashes = true + slug = "aks" + min_length = 1 + max_length = 63 + scope = "resourceGroup" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9]$/" + } + cosmosdb_account = { + name = substr(join("-", compact([local.prefix, "cosmos", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "cosmos", local.suffix_unique])), 0, 63) + dashes = true + slug = "cosmos" + min_length = 1 + max_length = 63 + scope = "resourceGroup" + regex = "/^(?=.{1,63}$)[a-z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9]$/" + } + custom_provider = { + name = substr(join("-", compact([local.prefix, "prov", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "prov", local.suffix_unique])), 0, 64) + dashes = true + slug = "prov" + min_length = 3 + max_length = 64 + scope = "resourceGroup" + regex = "/^(?=.{3,64}$)[^&%?\\/]+[^&%.?\\/ ]$/" + } + mariadb_server = { + name = substr(join("-", compact([local.prefix, "maria", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "maria", local.suffix_unique])), 0, 63) + dashes = true + slug = "maria" + min_length = 3 + max_length = 63 + scope = "global" + regex = "/^(?=.{3,63}$)[a-z0-9][a-zA-Z0-9-]+[a-z0-9]$/" + } + mariadb_firewall_rule = { + name = substr(join("-", compact([local.prefix, "mariafw", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "mariafw", local.suffix_unique])), 0, 128) + dashes = true + slug = "mariafw" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[a-zA-Z0-9-_]+$/" + } + mariadb_database = { + name = substr(join("-", compact([local.prefix, "mariadb", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "mariadb", local.suffix_unique])), 0, 63) + dashes = true + slug = "mariadb" + min_length = 1 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + mariadb_virtual_network_rule = { + name = substr(join("-", compact([local.prefix, "mariavn", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "mariavn", local.suffix_unique])), 0, 128) + dashes = true + slug = "mariavn" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[a-zA-Z0-9-_]+$/" + } + mysql_server = { + name = substr(join("-", compact([local.prefix, "mysql", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "mysql", local.suffix_unique])), 0, 63) + dashes = true + slug = "mysql" + min_length = 3 + max_length = 63 + scope = "global" + regex = "/^(?=.{3,63}$)[a-z0-9][a-zA-Z0-9-]+[a-z0-9]$/" + } + mysql_firewall_rule = { + name = substr(join("-", compact([local.prefix, "mysqlfw", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "mysqlfw", local.suffix_unique])), 0, 128) + dashes = true + slug = "mysqlfw" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[a-zA-Z0-9-_]+$/" + } + mysql_database = { + name = substr(join("-", compact([local.prefix, "mysqldb", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "mysqldb", local.suffix_unique])), 0, 63) + dashes = true + slug = "mysqldb" + min_length = 1 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + mysql_virtual_network_rule = { + name = substr(join("-", compact([local.prefix, "mysqlvn", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "mysqlvn", local.suffix_unique])), 0, 128) + dashes = true + slug = "mysqlvn" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[a-zA-Z0-9-_]+$/" + } + postgresql_server = { + name = substr(join("-", compact([local.prefix, "psql", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "psql", local.suffix_unique])), 0, 63) + dashes = true + slug = "psql" + min_length = 3 + max_length = 63 + scope = "global" + regex = "/^(?=.{3,63}$)[a-z0-9][a-zA-Z0-9-]+[a-z0-9]$/" + } + postgresql_firewall_rule = { + name = substr(join("-", compact([local.prefix, "psqlfw", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "psqlfw", local.suffix_unique])), 0, 128) + dashes = true + slug = "psqlfw" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[a-zA-Z0-9-_]+$/" + } + postgresql_database = { + name = substr(join("-", compact([local.prefix, "psqldb", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "psqldb", local.suffix_unique])), 0, 63) + dashes = true + slug = "psqldb" + min_length = 1 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + postgresql_virtual_network_rule = { + name = substr(join("-", compact([local.prefix, "psqlvn", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "psqlvn", local.suffix_unique])), 0, 128) + dashes = true + slug = "psqlvn" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[a-zA-Z0-9-_]+$/" + } + database_migration_project = { + name = substr(join("-", compact([local.prefix, "migr", local.suffix])), 0, 57) + name_unique = substr(join("-", compact([local.prefix, "migr", local.suffix_unique])), 0, 57) + dashes = true + slug = "migr" + min_length = 2 + max_length = 57 + scope = "parent" + regex = "/^(?=.{2,57}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+$/" + } + database_migration_service = { + name = substr(join("-", compact([local.prefix, "dms", local.suffix])), 0, 62) + name_unique = substr(join("-", compact([local.prefix, "dms", local.suffix_unique])), 0, 62) + dashes = true + slug = "dms" + min_length = 2 + max_length = 62 + scope = "resourceGroup" + regex = "/^(?=.{2,62}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+$/" + } + databricks_workspace = { + name = substr(join("-", compact([local.prefix, "dbw", local.suffix])), 0, 30) + name_unique = substr(join("-", compact([local.prefix, "dbw", local.suffix_unique])), 0, 30) + dashes = true + slug = "dbw" + min_length = 3 + max_length = 30 + scope = "resourceGroup" + regex = "/^(?=.{3,30}$)[a-zA-Z0-9-_]+$/" + } + kusto_cluster = { + name = substr(join("", compact([local.prefix_safe, "kc", local.suffix_safe])), 0, 22) + name_unique = substr(join("", compact([local.prefix_safe, "kc", local.suffix_unique_safe])), 0, 22) + dashes = false + slug = "kc" + min_length = 4 + max_length = 22 + scope = "global" + regex = "/^(?=.{4,22}$)[a-z][a-z0-9]+$/" + } + kusto_database = { + name = substr(join("-", compact([local.prefix, "kdb", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "kdb", local.suffix_unique])), 0, 260) + dashes = true + slug = "kdb" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9- .]+$/" + } + kusto_eventhub_data_connection = { + name = substr(join("-", compact([local.prefix, "kehc", local.suffix])), 0, 40) + name_unique = substr(join("-", compact([local.prefix, "kehc", local.suffix_unique])), 0, 40) + dashes = true + slug = "kehc" + min_length = 1 + max_length = 40 + scope = "parent" + regex = "/^(?=.{1,40}$)[a-zA-Z0-9- .]+$/" + } + data_factory = { + name = substr(join("-", compact([local.prefix, "adf", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "adf", local.suffix_unique])), 0, 63) + dashes = true + slug = "adf" + min_length = 3 + max_length = 63 + scope = "global" + regex = "/^(?=.{3,63}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + data_factory_dataset_mysql = { + name = substr(join("-", compact([local.prefix, "adfmysql", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfmysql", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfmysql" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+[a-zA-Z0-9]$/" + } + data_factory_dataset_postgresql = { + name = substr(join("-", compact([local.prefix, "adfpsql", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfpsql", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfpsql" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+[a-zA-Z0-9]$/" + } + data_factory_dataset_sql_server_table = { + name = substr(join("-", compact([local.prefix, "adfmssql", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfmssql", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfmssql" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+[a-zA-Z0-9]$/" + } + data_factory_integration_runtime_managed = { + name = substr(join("-", compact([local.prefix, "adfir", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "adfir", local.suffix_unique])), 0, 63) + dashes = true + slug = "adfir" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{3,63}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + data_factory_pipeline = { + name = substr(join("-", compact([local.prefix, "adfpl", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfpl", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfpl" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+[a-zA-Z0-9]$/" + } + data_factory_linked_service_data_lake_storage_gen2 = { + name = substr(join("-", compact([local.prefix, "adfsvst", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfsvst", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfsvst" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+$/" + } + data_factory_linked_service_key_vault = { + name = substr(join("-", compact([local.prefix, "adfsvkv", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfsvkv", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfsvkv" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+$/" + } + data_factory_linked_service_mysql = { + name = substr(join("-", compact([local.prefix, "adfsvmysql", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfsvmysql", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfsvmysql" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+$/" + } + data_factory_linked_service_postgresql = { + name = substr(join("-", compact([local.prefix, "adfsvpsql", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfsvpsql", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfsvpsql" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+$/" + } + data_factory_linked_service_sql_server = { + name = substr(join("-", compact([local.prefix, "adfsvmssql", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adfsvmssql", local.suffix_unique])), 0, 260) + dashes = true + slug = "adfsvmssql" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+$/" + } + data_factory_trigger_schedule = { + name = substr(join("-", compact([local.prefix, "adftg", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "adftg", local.suffix_unique])), 0, 260) + dashes = true + slug = "adftg" + min_length = 1 + max_length = 260 + scope = "parent" + regex = "/^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\+\\/]+$/" + } + data_lake_analytics_account = { + name = substr(join("", compact([local.prefix_safe, "dla", local.suffix_safe])), 0, 24) + name_unique = substr(join("", compact([local.prefix_safe, "dla", local.suffix_unique_safe])), 0, 24) + dashes = false + slug = "dla" + min_length = 3 + max_length = 24 + scope = "global" + regex = "/^(?=.{3,24}$)[a-z0-9]+$/" + } + data_lake_analytics_firewall_rule = { + name = substr(join("-", compact([local.prefix, "dlfw", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "dlfw", local.suffix_unique])), 0, 50) + dashes = true + slug = "dlfw" + min_length = 3 + max_length = 50 + scope = "parent" + regex = "/^(?=.{3,50}$)[a-z0-9-_]+$/" + } + data_lake_store = { + name = substr(join("", compact([local.prefix_safe, "dls", local.suffix_safe])), 0, 24) + name_unique = substr(join("", compact([local.prefix_safe, "dls", local.suffix_unique_safe])), 0, 24) + dashes = false + slug = "dls" + min_length = 3 + max_length = 24 + scope = "parent" + regex = "/^(?=.{3,24}$)[a-z0-9]+$/" + } + data_lake_store_firewall_rule = { + name = substr(join("-", compact([local.prefix, "dlsfw", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "dlsfw", local.suffix_unique])), 0, 50) + dashes = true + slug = "dlsfw" + min_length = 3 + max_length = 50 + scope = "parent" + regex = "/^(?=.{3,50}$)[a-zA-Z0-9-_]+$/" + } + dev_test_lab = { + name = substr(join("-", compact([local.prefix, "lab", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "lab", local.suffix_unique])), 0, 50) + dashes = true + slug = "lab" + min_length = 1 + max_length = 50 + scope = "resourceGroup" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9-_]+$/" + } + dev_test_linux_virtual_machine = { + name = substr(join("-", compact([local.prefix, "labvm", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "labvm", local.suffix_unique])), 0, 64) + dashes = true + slug = "labvm" + min_length = 1 + max_length = 64 + scope = "parent" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9-]+$/" + } + dev_test_windows_virtual_machine = { + name = substr(join("-", compact([local.prefix, "labvm", local.suffix])), 0, 15) + name_unique = substr(join("-", compact([local.prefix, "labvm", local.suffix_unique])), 0, 15) + dashes = true + slug = "labvm" + min_length = 1 + max_length = 15 + scope = "parent" + regex = "/^(?=.{1,15}$)[a-zA-Z0-9-]+$/" + } + frontdoor = { + name = substr(join("-", compact([local.prefix, "fd", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "fd", local.suffix_unique])), 0, 64) + dashes = true + slug = "fd" + min_length = 5 + max_length = 64 + scope = "global" + regex = "/^(?=.{5,64}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + frontdoor_firewall_policy = { + name = substr(join("-", compact([local.prefix, "fdfw", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "fdfw", local.suffix_unique])), 0, 80) + dashes = true + slug = "fdfw" + min_length = 1 + max_length = 80 + scope = "global" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + hdinsight_hadoop_cluster = { + name = substr(join("-", compact([local.prefix, "hadoop", local.suffix])), 0, 59) + name_unique = substr(join("-", compact([local.prefix, "hadoop", local.suffix_unique])), 0, 59) + dashes = true + slug = "hadoop" + min_length = 3 + max_length = 59 + scope = "global" + regex = "/^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + hdinsight_hbase_cluster = { + name = substr(join("-", compact([local.prefix, "hbase", local.suffix])), 0, 59) + name_unique = substr(join("-", compact([local.prefix, "hbase", local.suffix_unique])), 0, 59) + dashes = true + slug = "hbase" + min_length = 3 + max_length = 59 + scope = "global" + regex = "/^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + hdinsight_kafka_cluster = { + name = substr(join("-", compact([local.prefix, "kafka", local.suffix])), 0, 59) + name_unique = substr(join("-", compact([local.prefix, "kafka", local.suffix_unique])), 0, 59) + dashes = true + slug = "kafka" + min_length = 3 + max_length = 59 + scope = "global" + regex = "/^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + hdinsight_interactive_query_cluster = { + name = substr(join("-", compact([local.prefix, "iqr", local.suffix])), 0, 59) + name_unique = substr(join("-", compact([local.prefix, "iqr", local.suffix_unique])), 0, 59) + dashes = true + slug = "iqr" + min_length = 3 + max_length = 59 + scope = "global" + regex = "/^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + hdinsight_ml_services_cluster = { + name = substr(join("-", compact([local.prefix, "mls", local.suffix])), 0, 59) + name_unique = substr(join("-", compact([local.prefix, "mls", local.suffix_unique])), 0, 59) + dashes = true + slug = "mls" + min_length = 3 + max_length = 59 + scope = "global" + regex = "/^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + hdinsight_rserver_cluster = { + name = substr(join("-", compact([local.prefix, "rsv", local.suffix])), 0, 59) + name_unique = substr(join("-", compact([local.prefix, "rsv", local.suffix_unique])), 0, 59) + dashes = true + slug = "rsv" + min_length = 3 + max_length = 59 + scope = "global" + regex = "/^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + hdinsight_spark_cluster = { + name = substr(join("-", compact([local.prefix, "spark", local.suffix])), 0, 59) + name_unique = substr(join("-", compact([local.prefix, "spark", local.suffix_unique])), 0, 59) + dashes = true + slug = "spark" + min_length = 3 + max_length = 59 + scope = "global" + regex = "/^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + hdinsight_storm_cluster = { + name = substr(join("-", compact([local.prefix, "storm", local.suffix])), 0, 59) + name_unique = substr(join("-", compact([local.prefix, "storm", local.suffix_unique])), 0, 59) + dashes = true + slug = "storm" + min_length = 3 + max_length = 59 + scope = "global" + regex = "/^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + iotcentral_application = { + name = substr(join("-", compact([local.prefix, "iotapp", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "iotapp", local.suffix_unique])), 0, 63) + dashes = true + slug = "iotapp" + min_length = 2 + max_length = 63 + scope = "global" + regex = "/^(?=.{2,63}$)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + iothub = { + name = substr(join("-", compact([local.prefix, "iot", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "iot", local.suffix_unique])), 0, 50) + dashes = true + slug = "iot" + min_length = 3 + max_length = 50 + scope = "global" + regex = "/^(?=.{3,50}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-z0-9]$/" + } + iothub_consumer_group = { + name = substr(join("-", compact([local.prefix, "iotcg", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "iotcg", local.suffix_unique])), 0, 50) + dashes = true + slug = "iotcg" + min_length = 1 + max_length = 50 + scope = "parent" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9-._]+$/" + } + iothub_dps = { + name = substr(join("-", compact([local.prefix, "dps", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "dps", local.suffix_unique])), 0, 64) + dashes = true + slug = "dps" + min_length = 3 + max_length = 64 + scope = "resoureceGroup" + regex = "/^(?=.{3,64}$)[a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + iothub_dps_certificate = { + name = substr(join("-", compact([local.prefix, "dpscert", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "dpscert", local.suffix_unique])), 0, 64) + dashes = true + slug = "dpscert" + min_length = 1 + max_length = 64 + scope = "parent" + regex = "/^(?=.{3,64}$)[a-zA-Z0-9-._]+$/" + } + key_vault = { + name = substr(join("-", compact([local.prefix, "kv", local.suffix])), 0, 24) + name_unique = substr(join("-", compact([local.prefix, "kv", local.suffix_unique])), 0, 24) + dashes = true + slug = "kv" + min_length = 3 + max_length = 24 + scope = "global" + regex = "/^(?=.{3,24}$)(?!.*--)[a-zA-Z][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + key_vault_key = { + name = substr(join("-", compact([local.prefix, "kvk", local.suffix])), 0, 127) + name_unique = substr(join("-", compact([local.prefix, "kvk", local.suffix_unique])), 0, 127) + dashes = true + slug = "kvk" + min_length = 1 + max_length = 127 + scope = "parent" + regex = "/^(?=.{1,127}$)[a-zA-Z0-9-]+$/" + } + key_vault_secret = { + name = substr(join("-", compact([local.prefix, "kvs", local.suffix])), 0, 127) + name_unique = substr(join("-", compact([local.prefix, "kvs", local.suffix_unique])), 0, 127) + dashes = true + slug = "kvs" + min_length = 1 + max_length = 127 + scope = "parent" + regex = "/^(?=.{1,127}$)[a-zA-Z0-9-]+$/" + } + key_vault_certificate = { + name = substr(join("-", compact([local.prefix, "kvc", local.suffix])), 0, 127) + name_unique = substr(join("-", compact([local.prefix, "kvc", local.suffix_unique])), 0, 127) + dashes = true + slug = "kvc" + min_length = 1 + max_length = 127 + scope = "parent" + regex = "/^(?=.{1,127}$)[a-zA-Z0-9-]+$/" + } + lb = { + name = substr(join("-", compact([local.prefix, "lb", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "lb", local.suffix_unique])), 0, 80) + dashes = true + slug = "lb" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + lb_nat_rule = { + name = substr(join("-", compact([local.prefix, "lbnatrl", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "lbnatrl", local.suffix_unique])), 0, 80) + dashes = true + slug = "lbnatrl" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + public_ip = { + name = substr(join("-", compact([local.prefix, "pip", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "pip", local.suffix_unique])), 0, 80) + dashes = true + slug = "pip" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + public_ip_prefix = { + name = substr(join("-", compact([local.prefix, "pippf", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "pippf", local.suffix_unique])), 0, 80) + dashes = true + slug = "pippf" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + route = { + name = substr(join("-", compact([local.prefix, "rt", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "rt", local.suffix_unique])), 0, 80) + dashes = true + slug = "rt" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + route_table = { + name = substr(join("-", compact([local.prefix, "route", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "route", local.suffix_unique])), 0, 80) + dashes = true + slug = "route" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + subnet = { + name = substr(join("-", compact([local.prefix, "snet", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "snet", local.suffix_unique])), 0, 80) + dashes = true + slug = "snet" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + traffic_manager_profile = { + name = substr(join("-", compact([local.prefix, "traf", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "traf", local.suffix_unique])), 0, 63) + dashes = true + slug = "traf" + min_length = 1 + max_length = 63 + scope = "global" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9][a-zA-Z0-9-.]+[a-zA-Z0-9_]$/" + } + virtual_wan = { + name = substr(join("-", compact([local.prefix, "vwan", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "vwan", local.suffix_unique])), 0, 80) + dashes = true + slug = "vwan" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + virtual_network = { + name = substr(join("-", compact([local.prefix, "vnet", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "vnet", local.suffix_unique])), 0, 64) + dashes = true + slug = "vnet" + min_length = 2 + max_length = 64 + scope = "resourceGroup" + regex = "/^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + virtual_network_gateway = { + name = substr(join("-", compact([local.prefix, "vgw", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "vgw", local.suffix_unique])), 0, 80) + dashes = true + slug = "vgw" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + virtual_network_peering = { + name = substr(join("-", compact([local.prefix, "vpeer", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "vpeer", local.suffix_unique])), 0, 80) + dashes = true + slug = "vpeer" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + network_interface = { + name = substr(join("-", compact([local.prefix, "nic", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "nic", local.suffix_unique])), 0, 80) + dashes = true + slug = "nic" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + firewall = { + name = substr(join("-", compact([local.prefix, "fw", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "fw", local.suffix_unique])), 0, 80) + dashes = true + slug = "fw" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + eventhub = { + name = substr(join("-", compact([local.prefix, "evh", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "evh", local.suffix_unique])), 0, 50) + dashes = true + slug = "evh" + min_length = 1 + max_length = 50 + scope = "parent" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$/" + } + eventhub_namespace = { + name = substr(join("-", compact([local.prefix, "ehn", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "ehn", local.suffix_unique])), 0, 50) + dashes = true + slug = "ehn" + min_length = 1 + max_length = 50 + scope = "global" + regex = "/^(?=.{1,50}$)[a-zA-Z][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + eventhub_authorization_rule = { + name = substr(join("-", compact([local.prefix, "ehar", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "ehar", local.suffix_unique])), 0, 50) + dashes = true + slug = "ehar" + min_length = 1 + max_length = 50 + scope = "parent" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$/" + } + eventhub_namespace_authorization_rule = { + name = substr(join("-", compact([local.prefix, "ehnar", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "ehnar", local.suffix_unique])), 0, 50) + dashes = true + slug = "ehnar" + min_length = 1 + max_length = 50 + scope = "parent" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$/" + } + eventhub_namespace_disaster_recovery_config = { + name = substr(join("-", compact([local.prefix, "ehdr", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "ehdr", local.suffix_unique])), 0, 50) + dashes = true + slug = "ehdr" + min_length = 1 + max_length = 50 + scope = "parent" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$/" + } + eventhub_consumer_group = { + name = substr(join("-", compact([local.prefix, "ehcg", local.suffix])), 0, 50) + name_unique = substr(join("-", compact([local.prefix, "ehcg", local.suffix_unique])), 0, 50) + dashes = true + slug = "ehcg" + min_length = 1 + max_length = 50 + scope = "parent" + regex = "/^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$/" + } + stream_analytics_job = { + name = substr(join("-", compact([local.prefix, "asa", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asa", local.suffix_unique])), 0, 63) + dashes = true + slug = "asa" + min_length = 3 + max_length = 63 + scope = "resourceGroup" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_function_javascript_udf = { + name = substr(join("-", compact([local.prefix, "asafunc", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asafunc", local.suffix_unique])), 0, 63) + dashes = true + slug = "asafunc" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_output_blob = { + name = substr(join("-", compact([local.prefix, "asaoblob", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asaoblob", local.suffix_unique])), 0, 63) + dashes = true + slug = "asaoblob" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_output_mssql = { + name = substr(join("-", compact([local.prefix, "asaomssql", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asaomssql", local.suffix_unique])), 0, 63) + dashes = true + slug = "asaomssql" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_output_eventhub = { + name = substr(join("-", compact([local.prefix, "asaoeh", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asaoeh", local.suffix_unique])), 0, 63) + dashes = true + slug = "asaoeh" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_output_servicebus_queue = { + name = substr(join("-", compact([local.prefix, "asaosbq", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asaosbq", local.suffix_unique])), 0, 63) + dashes = true + slug = "asaosbq" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_output_servicebus_topic = { + name = substr(join("-", compact([local.prefix, "asaosbt", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asaosbt", local.suffix_unique])), 0, 63) + dashes = true + slug = "asaosbt" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_reference_input_blob = { + name = substr(join("-", compact([local.prefix, "asarblob", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asarblob", local.suffix_unique])), 0, 63) + dashes = true + slug = "asarblob" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_stream_input_blob = { + name = substr(join("-", compact([local.prefix, "asaiblob", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asaiblob", local.suffix_unique])), 0, 63) + dashes = true + slug = "asaiblob" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_stream_input_eventhub = { + name = substr(join("-", compact([local.prefix, "asaieh", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asaieh", local.suffix_unique])), 0, 63) + dashes = true + slug = "asaieh" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + stream_analytics_stream_input_iothub = { + name = substr(join("-", compact([local.prefix, "asaiiot", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "asaiiot", local.suffix_unique])), 0, 63) + dashes = true + slug = "asaiiot" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{1,63}$)[a-zA-Z0-9-_]+$/" + } + shared_image_gallery = { + name = substr(join("", compact([local.prefix_safe, "sig", local.suffix_safe])), 0, 80) + name_unique = substr(join("", compact([local.prefix_safe, "sig", local.suffix_unique_safe])), 0, 80) + dashes = false + slug = "sig" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9.]+[a-zA-Z0-9]$/" + } + shared_image = { + name = substr(join("-", compact([local.prefix, "si", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "si", local.suffix_unique])), 0, 80) + dashes = true + slug = "si" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$/" + } + snapshots = { + name = substr(join("-", compact([local.prefix, "snap", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "snap", local.suffix_unique])), 0, 80) + dashes = true + slug = "snap" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + storage_account = { + name = substr(join("", compact([local.prefix_safe, "st", local.suffix_safe])), 0, 24) + name_unique = substr(join("", compact([local.prefix_safe, "st", local.suffix_unique_safe])), 0, 24) + dashes = false + slug = "st" + min_length = 3 + max_length = 24 + scope = "global" + regex = "/^(?=.{3,24}$)[a-z0-9]+$/" + } + storage_container = { + name = substr(join("-", compact([local.prefix, "stct", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "stct", local.suffix_unique])), 0, 63) + dashes = true + slug = "stct" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+$/" + } + storage_data_lake_gen2_filesystem = { + name = substr(join("-", compact([local.prefix, "stdl", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "stdl", local.suffix_unique])), 0, 63) + dashes = true + slug = "stdl" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + storage_queue = { + name = substr(join("-", compact([local.prefix, "stq", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "stq", local.suffix_unique])), 0, 63) + dashes = true + slug = "stq" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + storage_table = { + name = substr(join("-", compact([local.prefix, "stt", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "stt", local.suffix_unique])), 0, 63) + dashes = true + slug = "stt" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + storage_share = { + name = substr(join("-", compact([local.prefix, "sts", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "sts", local.suffix_unique])), 0, 63) + dashes = true + slug = "sts" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + storage_share_directory = { + name = substr(join("-", compact([local.prefix, "sts", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "sts", local.suffix_unique])), 0, 63) + dashes = true + slug = "sts" + min_length = 3 + max_length = 63 + scope = "parent" + regex = "/^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + machine_learning_workspace = { + name = substr(join("-", compact([local.prefix, "mlw", local.suffix])), 0, 260) + name_unique = substr(join("-", compact([local.prefix, "mlw", local.suffix_unique])), 0, 260) + dashes = true + slug = "mlw" + min_length = 1 + max_length = 260 + scope = "resourceGroup" + regex = "/^(?=.{1,260}$)[^<>*%:.?\\+\\/]+[^<>*%:.?\\+\\/ ]$/" + } + storage_blob = { + name = substr(join("-", compact([local.prefix, "blob", local.suffix])), 0, 1024) + name_unique = substr(join("-", compact([local.prefix, "blob", local.suffix_unique])), 0, 1024) + dashes = true + slug = "blob" + min_length = 1 + max_length = 1024 + scope = "parent" + regex = "/^(?=.{1,1024}$)[^\\s\\/$#&]+$/" + } + bastion_host = { + name = substr(join("-", compact([local.prefix, "snap", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "snap", local.suffix_unique])), 0, 80) + dashes = true + slug = "snap" + min_length = 1 + max_length = 80 + scope = "parent" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + local_network_gateway = { + name = substr(join("-", compact([local.prefix, "lgw", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "lgw", local.suffix_unique])), 0, 80) + dashes = true + slug = "lgw" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + application_gateway = { + name = substr(join("-", compact([local.prefix, "agw", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "agw", local.suffix_unique])), 0, 80) + dashes = true + slug = "agw" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + express_route_gateway = { + name = substr(join("-", compact([local.prefix, "ergw", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "ergw", local.suffix_unique])), 0, 80) + dashes = true + slug = "ergw" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + express_route_circuit = { + name = substr(join("-", compact([local.prefix, "erc", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "erc", local.suffix_unique])), 0, 80) + dashes = true + slug = "erc" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + point_to_site_vpn_gateway = { + name = substr(join("-", compact([local.prefix, "vpngw", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "vpngw", local.suffix_unique])), 0, 80) + dashes = true + slug = "vpngw" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } + template_deployment = { + name = substr(join("-", compact([local.prefix, "deploy", local.suffix])), 0, 64) + name_unique = substr(join("-", compact([local.prefix, "deploy", local.suffix_unique])), 0, 64) + dashes = true + slug = "deploy" + min_length = 1 + max_length = 64 + scope = "resourceGroup" + regex = "/^(?=.{1,64}$)[a-zA-Z0-9-._\\(\\)]+$/" + } + sql_server = { + name = substr(join("-", compact([local.prefix, "sql", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "sql", local.suffix_unique])), 0, 63) + dashes = true + slug = "sql" + min_length = 1 + max_length = 63 + scope = "global" + regex = "/^(?=.{1,63}$)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + mssql_server = { + name = substr(join("-", compact([local.prefix, "sql", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "sql", local.suffix_unique])), 0, 63) + dashes = true + slug = "sql" + min_length = 1 + max_length = 63 + scope = "global" + regex = "/^(?=.{1,63}$)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + mssql_database = { + name = substr(join("-", compact([local.prefix, "sqldb", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "sqldb", local.suffix_unique])), 0, 128) + dashes = true + slug = "sqldb" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[^<>*%:.?\\+\\/]+[^<>*%:.?\\+\\/ ]$/" + } + sql_elasticpool = { + name = substr(join("-", compact([local.prefix, "sqlep", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "sqlep", local.suffix_unique])), 0, 128) + dashes = true + slug = "sqlep" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[^<>*%:.?\\+\\/]+[^<>*%:.?\\+\\/ ]$/" + } + mssql_elasticpool = { + name = substr(join("-", compact([local.prefix, "sqlep", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "sqlep", local.suffix_unique])), 0, 128) + dashes = true + slug = "sqlep" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[^<>*%:.?\\+\\/]+[^<>*%:.?\\+\\/ ]$/" + } + sql_failover_group = { + name = substr(join("-", compact([local.prefix, "sqlfg", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "sqlfg", local.suffix_unique])), 0, 63) + dashes = true + slug = "sqlfg" + min_length = 1 + max_length = 63 + scope = "global" + regex = "/^(?=.{1,63}$)[a-z0-9][a-z0-9-]+[a-z0-9]$/" + } + sql_firewall_rule = { + name = substr(join("-", compact([local.prefix, "sqlfw", local.suffix])), 0, 128) + name_unique = substr(join("-", compact([local.prefix, "sqlfw", local.suffix_unique])), 0, 128) + dashes = true + slug = "sqlfw" + min_length = 1 + max_length = 128 + scope = "parent" + regex = "/^(?=.{1,128}$)[^<>*%:?\\+\\/]+[^<>*%:.?\\+\\/]$/" + } + log_analytics_workspace = { + name = substr(join("-", compact([local.prefix, "log", local.suffix])), 0, 63) + name_unique = substr(join("-", compact([local.prefix, "log", local.suffix_unique])), 0, 63) + dashes = true + slug = "log" + min_length = 4 + max_length = 63 + scope = "parent" + regex = "/^(?=.{4,63}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$/" + } + service_fabric_cluster = { + name = substr(join("-", compact([local.prefix, "sf", local.suffix])), 0, 23) + name_unique = substr(join("-", compact([local.prefix, "sf", local.suffix_unique])), 0, 23) + dashes = true + slug = "sf" + min_length = 4 + max_length = 23 + scope = "region" + regex = "/^(?=.{4,23}$)[a-z][a-z0-9-]+[a-z0-9]$/" + } + maps_account = { + name = substr(join("-", compact([local.prefix, "map", local.suffix])), 0, 98) + name_unique = substr(join("-", compact([local.prefix, "map", local.suffix_unique])), 0, 98) + dashes = true + slug = "map" + min_length = 1 + max_length = 98 + scope = "resourceGroup" + regex = "/^(?=.{1,98}$)[a-zA-Z0-9][a-zA-Z0-9-._]+$/" + } + network_watcher = { + name = substr(join("-", compact([local.prefix, "nw", local.suffix])), 0, 80) + name_unique = substr(join("-", compact([local.prefix, "nw", local.suffix_unique])), 0, 80) + dashes = true + slug = "nw" + min_length = 1 + max_length = 80 + scope = "resourceGroup" + regex = "/^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$/" + } } } - - - diff --git a/outputs.tf b/outputs.tf index cbff036..7991817 100644 --- a/outputs.tf +++ b/outputs.tf @@ -2,884 +2,644 @@ output "unique-seed" { value = coalesce(var.unique-seed, local.random_safe_generation) } - -// General - -output "resource_group" { - value = { - name = substr(join("-", compact([local.prefix, local.az.resource_group, local.suffix])), 0, 90) - name_unique = substr(join("-", compact([local.prefix, local.az.resource_group, local.suffix_unique])), 0, 90) - dashes = true - slug = local.az.resource_group - min_length = 1 - max_length = 90 - scope = "subscription" - } -} - -output "policy" { - value = { - name = join("-", compact([local.prefix, local.az.policy, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.policy, local.suffix_unique])) - dashes = true - slug = local.az.policy - min_length = 1 - max_length = 64 - scope = "subscription" - } -} - -output "api_management" { - value = { - name = join("-", compact([local.prefix, local.az.api_management, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.api_management, local.suffix_unique])) - dashes = true - slug = local.az.api_management - min_length = 1 - max_length = 50 - scope = "global" - } -} - - -// Network - -output "virtual_network" { - value = { - name = join("-", compact([local.prefix, local.az.virtual_network, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.virtual_network, local.suffix_unique])) - dashes = true - slug = local.az.virtual_network - min_length = 2 - max_length = 64 - scope = "resourceGroup" - } -} - -output "subnet" { - value = { - name = join("-", compact([local.prefix, local.az.subnet, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.subnet, local.suffix_unique])) - dashes = true - slug = local.az.subnet - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "network_interface" { - value = { - name = join("-", compact([local.prefix, local.az.network_interface, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.network_interface, local.suffix_unique])) - dashes = true - slug = local.az.network_interface - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "public_ip" { - value = { - name = join("-", compact([local.prefix, local.az.public_ip, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.public_ip, local.suffix_unique])) - dashes = true - slug = local.az.public_ip - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "load_balancer_internal" { - value = { - name = join("-", compact([local.prefix, local.az.load_balancer_internal, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.load_balancer_internal, local.suffix_unique])) - dashes = true - slug = local.az.load_balancer_internal - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "load_balancer_external" { - value = { - name = join("-", compact([local.prefix, local.az.load_balancer_external, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.load_balancer_external, local.suffix_unique])) - dashes = true - slug = local.az.load_balancer_external - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "network_security_group" { - value = { - name = join("-", compact([local.prefix, local.az.network_security_group, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.network_security_group, local.suffix_unique])) - dashes = true - slug = local.az.network_security_group - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "application_security_group" { - value = { - name = join("-", compact([local.prefix, local.az.application_security_group, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.application_security_group, local.suffix_unique])) - dashes = true - slug = local.az.application_security_group - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "local_network_gateway" { - value = { - name = join("-", compact([local.prefix, local.az.local_network_gateway, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.local_network_gateway, local.suffix_unique])) - dashes = true - slug = local.az.local_network_gateway - } -} - -output "virtual_network_gateway" { - value = { - name = join("-", compact([local.prefix, local.az.virtual_network_gateway, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.virtual_network_gateway, local.suffix_unique])) - dashes = true - slug = local.az.virtual_network_gateway - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "vpn_connection" { - value = { - name = join("-", compact([local.prefix, local.az.vpn_connection, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.vpn_connection, local.suffix_unique])) - dashes = true - slug = local.az.vpn_connection - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "application_gateway" { - value = { - name = join("-", compact([local.prefix, local.az.application_gateway, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.application_gateway, local.suffix_unique])) - dashes = true - slug = local.az.application_gateway - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "traffic_manager_profile" { - value = { - name = join("-", compact([local.prefix, local.az.traffic_manager_profile, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.traffic_manager_profile, local.suffix_unique])) - dashes = true - slug = local.az.traffic_manager_profile - min_length = 1 - max_length = 63 - scope = "global" - } -} - -output "private_endpoint" { - value = { - name = join("-", compact([local.prefix, local.az.private_endpoint, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.private_endpoint, local.suffix_unique])) - dashes = true - slug = local.az.private_endpoint - } -} - -output "private_service_connection" { - value = { - name = join("-", compact([local.prefix, local.az.private_service_connection, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.private_service_connection, local.suffix_unique])) - dashes = true - slug = local.az.private_service_connection - } -} - -output "firewall" { - value = { - name = join("-", compact([local.prefix, local.az.firewall, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.firewall, local.suffix_unique])) - dashes = true - slug = local.az.firewall - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "firewall_ip_configuration" { - value = { - name = join("-", compact([local.prefix, local.az.firewall_ip_configuration, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.firewall_ip_configuration, local.suffix_unique])) - dashes = true - slug = local.az.firewall_ip_configuration - } -} - -// Compute and Web - -output "virtual_machine" { - value = { - name = substr(join("", compact([local.prefix_safe, local.az.virtual_machine, local.suffix_safe])), 0, 15) - name_unique = substr(join("", compact([local.prefix_safe, local.az.virtual_machine, local.suffix_unique_safe])), 0, 15) - dashes = false - slug = local.az.virtual_machine - min_length = 1 - max_length = 15 - scope = "resourceGroup" - } -} - -output "virtual_machine_linux" { - value = { - name = substr(join("", compact([local.prefix, local.az.virtual_machine, local.suffix])), 0, 64) - name_unique = substr(join("", compact([local.prefix, local.az.virtual_machine, local.suffix_unique])), 0, 64) - dashes = false - slug = local.az.virtual_machine - min_length = 1 - max_length = 64 - scope = "resourceGroup" - } -} - -output "virtual_machine_scale_set" { - value = { - name = substr(join("", compact([local.prefix_safe, local.az.virtual_machine_scale_set, local.suffix_safe])), 0, 15) - name_unique = substr(join("", compact([local.prefix_safe, local.az.virtual_machine_scale_set, local.suffix_unique_safe])), 0, 15) - dashes = false - slug = local.az.virtual_machine_scale_set - min_length = 1 - max_length = 15 - scope = "resourceGroup" - } -} - -output "virtual_machine_scale_set_linux" { - value = { - name = substr(join("", compact([local.prefix, local.az.virtual_machine_scale_set, local.suffix])), 0, 64) - name_unique = substr(join("", compact([local.prefix, local.az.virtual_machine_scale_set, local.suffix_unique])), 0, 64) - dashes = false - slug = local.az.virtual_machine_scale_set - min_length = 1 - max_length = 64 - scope = "resourceGroup" - } -} - -output "availability_set" { - value = { - name = join("-", compact([local.prefix, local.az.availability_set, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.availability_set, local.suffix_unique])) - dashes = true - slug = local.az.availability_set - min_length = 1 - max_length = 80 - scope = "resourceGroup" - } -} - -output "vm_storage_account" { - value = { - name = substr(join("", compact([local.prefix, local.az.traffic_manager_profile, local.suffix])), 0, 24) - name_unique = substr(join("", compact([local.prefix, local.az.traffic_manager_profile, local.suffix_unique])), 0, 24) - dashes = true - slug = local.az.traffic_manager_profile - min_length = 3 - max_length = 24 - scope = "global" - } -} - -output "azure_arc_connected_machine" { - value = { - name = join("-", compact([local.prefix, local.az.azure_arc_connected_machine, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_arc_connected_machine, local.suffix_unique])) - dashes = true - slug = local.az.azure_arc_connected_machine - } -} - -output "container_instance" { - value = { - name = join("-", compact([local.prefix, local.az.container_instance, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.container_instance, local.suffix_unique])) - dashes = true - slug = local.az.container_instance - min_length = 1 - max_length = 63 - scope = "resourceGroup" - } -} - -output "aks_cluster" { - value = { - name = join("-", compact([local.prefix, local.az.aks_cluster, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.aks_cluster, local.suffix_unique])) - dashes = true - slug = local.az.aks_cluster - min_length = 1 - max_length = 63 - scope = "resourceGroup" - } -} - -output "service_fabric" { - value = { - name = join("-", compact([local.prefix, local.az.service_fabric, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.service_fabric, local.suffix_unique])) - dashes = true - slug = local.az.service_fabric - min_length = 4 - max_length = 23 - scope = "region" - } -} - -output "app_service_environment" { - value = { - name = join("-", compact([local.prefix, local.az.app_service_environment, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.app_service_environment, local.suffix_unique])) - dashes = true - slug = local.az.app_service_environment - } -} - -output "app_service_plan" { - value = { - name = join("-", compact([local.prefix, local.az.app_service_plan, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.app_service_plan, local.suffix_unique])) - dashes = true - slug = local.az.app_service_plan - min_length = 1 - max_length = 40 - scope = "resourceGroup" - } -} - -output "web_app" { - value = { - name = join("-", compact([local.prefix, local.az.web_app, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.web_app, local.suffix_unique])) - dashes = true - slug = local.az.web_app - min_length = 2 - max_length = 60 - scope = "global" - } -} - -output "function_app" { - value = { - name = join("-", compact([local.prefix, local.az.function_app, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.function_app, local.suffix_unique])) - dashes = true - slug = local.az.function_app - min_length = 2 - max_length = 60 - scope = "global" - } -} - -output "cloud_service" { - value = { - name = join("-", compact([local.prefix, local.az.cloud_service, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.cloud_service, local.suffix_unique])) - dashes = true - slug = local.az.cloud_service - } -} - -output "notification_hubs" { - value = { - name = join("-", compact([local.prefix, local.az.notification_hubs, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.notification_hubs, local.suffix_unique])) - dashes = true - slug = local.az.notification_hubs - min_length = 1 - max_length = 260 - scope = "namespace" - } -} - -output "notification_hubs_namespace" { - value = { - name = join("-", compact([local.prefix, local.az.notification_hubs_namespace, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.notification_hubs_namespace, local.suffix_unique])) - dashes = true - slug = local.az.notification_hubs_namespace - min_length = 6 - max_length = 50 - scope = "global" - } -} - -// Databases - -output "sql_server" { - value = { - name = join("-", compact([local.prefix, local.az.azure_sql_database_server, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_sql_database_server, local.suffix_unique])) - dashes = true - slug = local.az.azure_sql_database_server - min_length = 1 - max_length = 63 - scope = "global" - } -} - -output "sql_database" { - value = { - name = join("-", compact([local.prefix, local.az.azure_sql_database, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_sql_database, local.suffix_unique])) - dashes = true - slug = local.az.azure_sql_database - min_length = 1 - max_length = 128 - scope = "server" - } -} - -output "cosmos_db" { - value = { - name = join("-", compact([local.prefix, local.az.cosmos_db, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.cosmos_db, local.suffix_unique])) - dashes = true - slug = local.az.cosmos_db - min_length = 3 - max_length = 44 - scope = "global" - } -} - -output "redis_cache" { - value = { - name = join("-", compact([local.prefix, local.az.azure_cache_redis, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_cache_redis, local.suffix_unique])) - dashes = true - slug = local.az.azure_cache_redis - min_length = 1 - max_length = 63 - scope = "global" - } -} - -output "mysql" { - value = { - name = join("-", compact([local.prefix, local.az.mysql_database, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.mysql_database, local.suffix_unique])) - dashes = true - slug = local.az.mysql_database - min_length = 3 - max_length = 63 - scope = "global" - } -} - -output "postgre" { - value = { - name = join("-", compact([local.prefix, local.az.postgre_database, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.postgre_database, local.suffix_unique])) - dashes = true - slug = local.az.postgre_database - min_length = 3 - max_length = 63 - scope = "global" - } -} - -output "data_warehouse" { - value = { - name = join("-", compact([local.prefix, local.az.azure_data_warehouse, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_data_warehouse, local.suffix_unique])) - dashes = true - slug = local.az.azure_data_warehouse - } -} - -output "synapse" { - value = { - name = join("-", compact([local.prefix, local.az.azure_synapse_analytics, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_synapse_analytics, local.suffix_unique])) - dashes = true - slug = local.az.azure_synapse_analytics - } -} - -output "sql_server_strech_database" { - value = { - name = join("-", compact([local.prefix, local.az.sql_server_strech_database, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.sql_server_strech_database, local.suffix_unique])) - dashes = true - slug = local.az.sql_server_strech_database - } -} - -// Storage - -output "storage_account" { - value = { - name = substr(join("", compact([local.prefix_safe, local.az.storage_account, local.suffix_safe])), 0, 24) - name_unique = substr(join("", compact([local.prefix_safe, local.az.storage_account, local.suffix_unique_safe])), 0, 24) - dashes = false - slug = local.az.storage_account - min_length = 3 - max_length = 24 - } -} - -output "storage_managed_encryption_key" { - value = { - name = substr(join("", compact([local.prefix_safe, local.az.storage_managed_encryption_key, local.suffix_safe])), 0, 24) - name_unique = substr(join("", compact([local.prefix_safe, local.az.storage_managed_encryption_key, local.suffix_unique_safe])), 0, 24) - dashes = true - slug = local.az.storage_managed_encryption_key - } -} - -output "storagesimple" { - value = { - name = substr(join("", compact([local.prefix_safe, local.az.azure_storsimple, local.suffix_safe])), 0, 24) - name_unique = substr(join("", compact([local.prefix_safe, local.az.azure_storsimple, local.suffix_unique_safe])), 0, 24) - dashes = false - slug = local.az.azure_storsimple - } -} - -// AI + Machine Learning - -output "cognitive_search" { - value = { - name = join("-", compact([local.prefix, local.az.azure_cognitive_search, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_cognitive_search, local.suffix_unique])) - dashes = true - slug = local.az.azure_cognitive_search - } -} - -output "cognitive_services" { - value = { - name = join("-", compact([local.prefix, local.az.azure_cognitive_services, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_cognitive_services, local.suffix_unique])) - dashes = true - slug = local.az.azure_cognitive_services - } -} - -output "machine_learning_workspace" { - value = { - name = join("-", compact([local.prefix, local.az.azure_machine_learning_workspace, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_machine_learning_workspace, local.suffix_unique])) - dashes = true - slug = local.az.azure_machine_learning_workspace - } -} - -// Analytics and IoT - output "analysis_services_server" { - value = { - name = join("-", compact([local.prefix, local.az.azure_analysis_services_server, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_analysis_services_server, local.suffix_unique])) - dashes = true - slug = local.az.azure_analysis_services_server - } + value = local.az.analysis_services_server } -output "databricks_workspace" { - value = { - name = join("-", compact([local.prefix, local.az.azure_databricks_workspace, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_databricks_workspace, local.suffix_unique])) - dashes = true - slug = local.az.azure_databricks_workspace - } +output "api_managment_service" { + value = local.az.api_managment_service } -output "stream_analytics" { - value = { - name = join("-", compact([local.prefix, local.az.azure_stream_analytics, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_stream_analytics, local.suffix_unique])) - dashes = true - slug = local.az.azure_stream_analytics - } +output "app_configuration" { + value = local.az.app_configuration } -output "data_factory" { - value = { - name = join("-", compact([local.prefix, local.az.azure_data_factory, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_data_factory, local.suffix_unique])) - dashes = true - slug = local.az.azure_data_factory - } +output "role_assignment" { + value = local.az.role_assignment } -output "data_lake_store_account" { - value = { - name = substr(join("", compact([local.prefix_safe, local.az.data_lake_store_account, local.suffix_safe])), 0, 24) - name_unique = substr(join("", compact([local.prefix_safe, local.az.data_lake_store_account, local.suffix_unique_safe])), 0, 24) - dashes = false - slug = local.az.data_lake_store_account - } -} - -output "data_lake_analytics_account" { - value = { - name = substr(join("", compact([local.prefix_safe, local.az.data_lake_analytics_account, local.suffix_safe])), 0, 24) - name_unique = substr(join("", compact([local.prefix_safe, local.az.data_lake_analytics_account, local.suffix_unique_safe])), 0, 24) - dashes = false - slug = local.az.data_lake_analytics_account - } -} - -output "data_lake_file_system" { - value = { - name = substr(join("", compact([local.prefix_safe, local.az.data_lake_file_system, local.suffix_safe])), 0, 24) - name_unique = substr(join("", compact([local.prefix_safe, local.az.data_lake_file_system, local.suffix_unique_safe])), 0, 24) - dashes = false - slug = local.az.data_lake_file_system - } -} - -output "event_hub" { - value = { - name = join("-", compact([local.prefix, local.az.event_hub, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.event_hub, local.suffix_unique])) - dashes = true - slug = local.az.event_hub - } -} - -output "event_hub_namespace" { - value = { - name = join("-", compact([local.prefix, local.az.event_hub_namespace, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.event_hub_namespace, local.suffix_unique])) - dashes = true - slug = local.az.event_hub_namespace - } -} - -output "event_hub_namespace_authorization_rule" { - value = { - name = join("-", compact([local.prefix, local.az.event_hub_namespace_authorization_rule, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.event_hub_namespace_authorization_rule, local.suffix_unique])) - dashes = true - slug = local.az.event_hub_namespace_authorization_rule - } -} - -output "event_hub_authorization_rule" { - value = { - name = join("-", compact([local.prefix, local.az.event_hub_authorization_rule, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.event_hub_authorization_rule, local.suffix_unique])) - dashes = true - slug = local.az.event_hub_authorization_rule - } -} - -output "hdinsights_hadoop_cluster" { - value = { - name = join("-", compact([local.prefix, local.az.hdinsights_hadoop_cluster, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.hdinsights_hadoop_cluster, local.suffix_unique])) - dashes = true - slug = local.az.hdinsights_hadoop_cluster - } -} - -output "hdinsights_hbase_cluster" { - value = { - name = join("-", compact([local.prefix, local.az.hdinsights_hbase_cluster, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.hdinsights_hbase_cluster, local.suffix_unique])) - dashes = true - slug = local.az.hdinsights_hbase_cluster - } -} - -output "hdinsights_kafka_cluster" { - value = { - name = join("-", compact([local.prefix, local.az.hdinsights_kafka_cluster, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.hdinsights_kafka_cluster, local.suffix_unique])) - dashes = true - slug = local.az.hdinsights_kafka_cluster - } -} - -output "hdinsights_spark_cluster" { - value = { - name = join("-", compact([local.prefix, local.az.hdinsights_spark_cluster, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.hdinsights_spark_cluster, local.suffix_unique])) - dashes = true - slug = local.az.hdinsights_spark_cluster - } -} - -output "hdinsights_storm_cluster" { - value = { - name = join("-", compact([local.prefix, local.az.hdinsights_storm_cluster, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.hdinsights_storm_cluster, local.suffix_unique])) - dashes = true - slug = local.az.hdinsights_storm_cluster - } -} - -output "hdinsights_ml_services_cluster" { - value = { - name = join("-", compact([local.prefix, local.az.hdinsights_ml_services_cluster, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.hdinsights_ml_services_cluster, local.suffix_unique])) - dashes = true - slug = local.az.hdinsights_ml_services_cluster - } -} - -output "iot_hub" { - value = { - name = join("-", compact([local.prefix, local.az.iot_hub, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.iot_hub, local.suffix_unique])) - dashes = true - slug = local.az.iot_hub - } -} - -// Integration - -output "logic_apps" { - value = { - name = join("-", compact([local.prefix, local.az.logic_apps, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.logic_apps, local.suffix_unique])) - dashes = true - slug = local.az.logic_apps - } -} - -output "service_bus" { - value = { - name = join("-", compact([local.prefix, local.az.service_bus, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.service_bus, local.suffix_unique])) - dashes = true - slug = local.az.service_bus - } -} - -output "service_bus_queue" { - value = { - name = join("-", compact([local.prefix, local.az.service_bus_queue, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.service_bus_queue, local.suffix_unique])) - dashes = true - slug = local.az.service_bus_queue - } -} - -output "service_bus_topic" { - value = { - name = join("-", compact([local.prefix, local.az.service_bus_topic, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.service_bus_topic, local.suffix_unique])) - dashes = true - slug = local.az.service_bus_topic - } +output "role_definition" { + value = local.az.role_definition } output "automation_account" { - value = { - name = join("-", compact([local.prefix, local.az.automation_account, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.automation_account, local.suffix_unique])) - dashes = true - slug = local.az.automation_account - } + value = local.az.automation_account } -// Managment and governance +output "automation_certificate" { + value = local.az.automation_certificate +} -output "blueprint" { - value = { - name = join("-", compact([local.prefix, local.az.blueprint, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.blueprint, local.suffix_unique])) - dashes = true - slug = local.az.blueprint - } +output "automation_credential" { + value = local.az.automation_credential +} + +output "automation_runbook" { + value = local.az.automation_runbook +} + +output "automation_schedule" { + value = local.az.automation_schedule +} + +output "automation_variable" { + value = local.az.automation_variable +} + +output "batch_account" { + value = local.az.batch_account +} + +output "batch_application" { + value = local.az.batch_application +} + +output "batch_certificate" { + value = local.az.batch_certificate +} + +output "batch_pool" { + value = local.az.batch_pool +} + +output "bot_web_app" { + value = local.az.bot_web_app +} + +output "bot_channel_Email" { + value = local.az.bot_channel_Email +} + +output "bot_channel_ms_teams" { + value = local.az.bot_channel_ms_teams +} + +output "bot_channel_slack" { + value = local.az.bot_channel_slack +} + +output "bot_channel_directline" { + value = local.az.bot_channel_directline +} + +output "bot_channels_registration" { + value = local.az.bot_channels_registration +} + +output "bot_connection" { + value = local.az.bot_connection +} + +output "redis_cache" { + value = local.az.redis_cache +} + +output "redis_firewall_rule" { + value = local.az.redis_firewall_rule +} + +output "cdn_profile" { + value = local.az.cdn_profile +} + +output "cdn_endpoint" { + value = local.az.cdn_endpoint +} + +output "cognitive_account" { + value = local.az.cognitive_account +} + +output "availability_set" { + value = local.az.availability_set +} + +output "disk_encryption_set" { + value = local.az.disk_encryption_set +} + +output "image" { + value = local.az.image +} + +output "linux_virtual_machine" { + value = local.az.linux_virtual_machine +} + +output "linux_virtual_machine_scale_set" { + value = local.az.linux_virtual_machine_scale_set +} + +output "managed_disk" { + value = local.az.managed_disk +} + +output "virtual_machine" { + value = local.az.virtual_machine +} + +output "virtual_machine_scale_set" { + value = local.az.virtual_machine_scale_set +} + +output "windows_virtual_machine" { + value = local.az.windows_virtual_machine +} + +output "windows_virtual_machine_scale_set" { + value = local.az.windows_virtual_machine_scale_set +} + +output "containerGroups" { + value = local.az.containerGroups +} + +output "container_registry" { + value = local.az.container_registry +} + +output "container_registry_webhook" { + value = local.az.container_registry_webhook +} + +output "kubernetes_cluster" { + value = local.az.kubernetes_cluster +} + +output "cosmosdb_account" { + value = local.az.cosmosdb_account +} + +output "custom_provider" { + value = local.az.custom_provider +} + +output "mariadb_server" { + value = local.az.mariadb_server +} + +output "mariadb_firewall_rule" { + value = local.az.mariadb_firewall_rule +} + +output "mariadb_database" { + value = local.az.mariadb_database +} + +output "mariadb_virtual_network_rule" { + value = local.az.mariadb_virtual_network_rule +} + +output "mysql_server" { + value = local.az.mysql_server +} + +output "mysql_firewall_rule" { + value = local.az.mysql_firewall_rule +} + +output "mysql_database" { + value = local.az.mysql_database +} + +output "mysql_virtual_network_rule" { + value = local.az.mysql_virtual_network_rule +} + +output "postgresql_server" { + value = local.az.postgresql_server +} + +output "postgresql_firewall_rule" { + value = local.az.postgresql_firewall_rule +} + +output "postgresql_database" { + value = local.az.postgresql_database +} + +output "postgresql_virtual_network_rule" { + value = local.az.postgresql_virtual_network_rule +} + +output "database_migration_project" { + value = local.az.database_migration_project +} + +output "database_migration_service" { + value = local.az.database_migration_service +} + +output "databricks_workspace" { + value = local.az.databricks_workspace +} + +output "kusto_cluster" { + value = local.az.kusto_cluster +} + +output "kusto_database" { + value = local.az.kusto_database +} + +output "kusto_eventhub_data_connection" { + value = local.az.kusto_eventhub_data_connection +} + +output "data_factory" { + value = local.az.data_factory +} + +output "data_factory_dataset_mysql" { + value = local.az.data_factory_dataset_mysql +} + +output "data_factory_dataset_postgresql" { + value = local.az.data_factory_dataset_postgresql +} + +output "data_factory_dataset_sql_server_table" { + value = local.az.data_factory_dataset_sql_server_table +} + +output "data_factory_integration_runtime_managed" { + value = local.az.data_factory_integration_runtime_managed +} + +output "data_factory_pipeline" { + value = local.az.data_factory_pipeline +} + +output "data_factory_linked_service_data_lake_storage_gen2" { + value = local.az.data_factory_linked_service_data_lake_storage_gen2 +} + +output "data_factory_linked_service_key_vault" { + value = local.az.data_factory_linked_service_key_vault +} + +output "data_factory_linked_service_mysql" { + value = local.az.data_factory_linked_service_mysql +} + +output "data_factory_linked_service_postgresql" { + value = local.az.data_factory_linked_service_postgresql +} + +output "data_factory_linked_service_sql_server" { + value = local.az.data_factory_linked_service_sql_server +} + +output "data_factory_trigger_schedule" { + value = local.az.data_factory_trigger_schedule +} + +output "data_lake_analytics_account" { + value = local.az.data_lake_analytics_account +} + +output "data_lake_analytics_firewall_rule" { + value = local.az.data_lake_analytics_firewall_rule +} + +output "data_lake_store" { + value = local.az.data_lake_store +} + +output "data_lake_store_firewall_rule" { + value = local.az.data_lake_store_firewall_rule +} + +output "dev_test_lab" { + value = local.az.dev_test_lab +} + +output "dev_test_linux_virtual_machine" { + value = local.az.dev_test_linux_virtual_machine +} + +output "dev_test_windows_virtual_machine" { + value = local.az.dev_test_windows_virtual_machine +} + +output "frontdoor" { + value = local.az.frontdoor +} + +output "frontdoor_firewall_policy" { + value = local.az.frontdoor_firewall_policy +} + +output "hdinsight_hadoop_cluster" { + value = local.az.hdinsight_hadoop_cluster +} + +output "hdinsight_hbase_cluster" { + value = local.az.hdinsight_hbase_cluster +} + +output "hdinsight_kafka_cluster" { + value = local.az.hdinsight_kafka_cluster +} + +output "hdinsight_interactive_query_cluster" { + value = local.az.hdinsight_interactive_query_cluster +} + +output "hdinsight_ml_services_cluster" { + value = local.az.hdinsight_ml_services_cluster +} + +output "hdinsight_rserver_cluster" { + value = local.az.hdinsight_rserver_cluster +} + +output "hdinsight_spark_cluster" { + value = local.az.hdinsight_spark_cluster +} + +output "hdinsight_storm_cluster" { + value = local.az.hdinsight_storm_cluster +} + +output "iotcentral_application" { + value = local.az.iotcentral_application +} + +output "iothub" { + value = local.az.iothub +} + +output "iothub_consumer_group" { + value = local.az.iothub_consumer_group +} + +output "iothub_dps" { + value = local.az.iothub_dps +} + +output "iothub_dps_certificate" { + value = local.az.iothub_dps_certificate } output "key_vault" { - value = { - name = substr(join("-", compact([local.prefix, local.az.key_vault, local.suffix])), 0, 24) - name_unique = substr(join("-", compact([local.prefix, local.az.key_vault, local.suffix_unique])), 0, 24) - dashes = true - slug = local.az.key_vault - min_length = 2 - max_length = 24 - scope = "global" - } + value = local.az.key_vault } output "key_vault_key" { - value = { - name = join("-", compact([local.prefix, local.az.key_vault_key, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.key_vault_key, local.suffix_unique])) - dashes = true - slug = local.az.key_vault_key - } + value = local.az.key_vault_key +} + +output "key_vault_secret" { + value = local.az.key_vault_secret +} + +output "key_vault_certificate" { + value = local.az.key_vault_certificate +} + +output "lb" { + value = local.az.lb +} + +output "lb_nat_rule" { + value = local.az.lb_nat_rule +} + +output "public_ip" { + value = local.az.public_ip +} + +output "public_ip_prefix" { + value = local.az.public_ip_prefix +} + +output "route" { + value = local.az.route +} + +output "route_table" { + value = local.az.route_table +} + +output "subnet" { + value = local.az.subnet +} + +output "traffic_manager_profile" { + value = local.az.traffic_manager_profile +} + +output "virtual_wan" { + value = local.az.virtual_wan +} + +output "virtual_network" { + value = local.az.virtual_network +} + +output "virtual_network_gateway" { + value = local.az.virtual_network_gateway +} + +output "virtual_network_peering" { + value = local.az.virtual_network_peering +} + +output "network_interface" { + value = local.az.network_interface +} + +output "firewall" { + value = local.az.firewall +} + +output "eventhub" { + value = local.az.eventhub +} + +output "eventhub_namespace" { + value = local.az.eventhub_namespace +} + +output "eventhub_authorization_rule" { + value = local.az.eventhub_authorization_rule +} + +output "eventhub_namespace_authorization_rule" { + value = local.az.eventhub_namespace_authorization_rule +} + +output "eventhub_namespace_disaster_recovery_config" { + value = local.az.eventhub_namespace_disaster_recovery_config +} + +output "eventhub_consumer_group" { + value = local.az.eventhub_consumer_group +} + +output "stream_analytics_job" { + value = local.az.stream_analytics_job +} + +output "stream_analytics_function_javascript_udf" { + value = local.az.stream_analytics_function_javascript_udf +} + +output "stream_analytics_output_blob" { + value = local.az.stream_analytics_output_blob +} + +output "stream_analytics_output_mssql" { + value = local.az.stream_analytics_output_mssql +} + +output "stream_analytics_output_eventhub" { + value = local.az.stream_analytics_output_eventhub +} + +output "stream_analytics_output_servicebus_queue" { + value = local.az.stream_analytics_output_servicebus_queue +} + +output "stream_analytics_output_servicebus_topic" { + value = local.az.stream_analytics_output_servicebus_topic +} + +output "stream_analytics_reference_input_blob" { + value = local.az.stream_analytics_reference_input_blob +} + +output "stream_analytics_stream_input_blob" { + value = local.az.stream_analytics_stream_input_blob +} + +output "stream_analytics_stream_input_eventhub" { + value = local.az.stream_analytics_stream_input_eventhub +} + +output "stream_analytics_stream_input_iothub" { + value = local.az.stream_analytics_stream_input_iothub +} + +output "shared_image_gallery" { + value = local.az.shared_image_gallery +} + +output "shared_image" { + value = local.az.shared_image +} + +output "snapshots" { + value = local.az.snapshots +} + +output "storage_account" { + value = local.az.storage_account +} + +output "storage_container" { + value = local.az.storage_container +} + +output "storage_data_lake_gen2_filesystem" { + value = local.az.storage_data_lake_gen2_filesystem +} + +output "storage_queue" { + value = local.az.storage_queue +} + +output "storage_table" { + value = local.az.storage_table +} + +output "storage_share" { + value = local.az.storage_share +} + +output "storage_share_directory" { + value = local.az.storage_share_directory +} + +output "machine_learning_workspace" { + value = local.az.machine_learning_workspace +} + +output "storage_blob" { + value = local.az.storage_blob +} + +output "bastion_host" { + value = local.az.bastion_host +} + +output "local_network_gateway" { + value = local.az.local_network_gateway +} + +output "application_gateway" { + value = local.az.application_gateway +} + +output "express_route_gateway" { + value = local.az.express_route_gateway +} + +output "express_route_circuit" { + value = local.az.express_route_circuit +} + +output "point_to_site_vpn_gateway" { + value = local.az.point_to_site_vpn_gateway +} + +output "template_deployment" { + value = local.az.template_deployment +} + +output "sql_server" { + value = local.az.sql_server +} + +output "mssql_server" { + value = local.az.mssql_server +} + +output "mssql_database" { + value = local.az.mssql_database +} + +output "sql_elasticpool" { + value = local.az.sql_elasticpool +} + +output "mssql_elasticpool" { + value = local.az.mssql_elasticpool +} + +output "sql_failover_group" { + value = local.az.sql_failover_group +} + +output "sql_firewall_rule" { + value = local.az.sql_firewall_rule } output "log_analytics_workspace" { - value = { - name = join("-", compact([local.prefix, local.az.log_analytics_workspace, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.log_analytics_workspace, local.suffix_unique])) - dashes = true - slug = local.az.log_analytics_workspace - } + value = local.az.log_analytics_workspace } -output "application_insights" { - value = { - name = join("-", compact([local.prefix, local.az.application_insights, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.application_insights, local.suffix_unique])) - dashes = true - slug = local.az.application_insights - } +output "service_fabric_cluster" { + value = local.az.service_fabric_cluster } -output "recovery_services_vault" { - value = { - name = join("-", compact([local.prefix, local.az.recovery_services_vault, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.recovery_services_vault, local.suffix_unique])) - dashes = true - slug = local.az.recovery_services_vault - } +output "maps_account" { + value = local.az.maps_account } -//Migration - -output "migrate_project" { - value = { - name = join("-", compact([local.prefix, local.az.azure_migrate_project, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.azure_migrate_project, local.suffix_unique])) - dashes = true - slug = local.az.azure_migrate_project - } +output "network_watcher" { + value = local.az.network_watcher } -output "database_migration_service_instance" { - value = { - name = join("-", compact([local.prefix, local.az.database_migration_service_instance, local.suffix])) - name_unique = join("-", compact([local.prefix, local.az.database_migration_service_instance, local.suffix_unique])) - dashes = true - slug = local.az.database_migration_service_instance - } -} + diff --git a/resorceDefinition.jsonc b/resorceDefinition.jsonc deleted file mode 100644 index 6334fa6..0000000 --- a/resorceDefinition.jsonc +++ /dev/null @@ -1,18 +0,0 @@ -[ - { - "name": "key_vault_vault", - "min_length": 3, - "max_length": 24, - "regex": "^(?=.{3,24}$)(?!.*--)[a-zA-Z][a-zA-Z0-9\\-]+$", - "scope": "global", - "slug": "kv" - }, - { - "name": "key_vault_secret", - "min_length": 1, - "max_length": 127, - "regex": "^(?=.{1,127}$)[a-zA-Z0-9\\-]+$", - "scope": "parent", - "slug": "kvk" - } -] \ No newline at end of file diff --git a/resourceDefinition.jsonc b/resourceDefinition.jsonc new file mode 100644 index 0000000..908965d --- /dev/null +++ b/resourceDefinition.jsonc @@ -0,0 +1,1774 @@ +[ + // Getting naming restrictions from https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftanalysisservices + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftanalysisservices + { + "name": "analysis_services_server", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)[a-z][a-z0-9]+$", + "scope": "resourceGroup", + "slug": "as", + "dashes": false + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftapimanagement + { + "name": "api_managment_service", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-z][a-zA-Z0-9]+$", + "scope": "global", + "slug": "apim", + "dashes": false + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftappconfiguration + { + "name": "app_configuration", + "length": { + "min": 5, + "max": 50 + }, + "regex": "^(?=.{5,50}$)[a-zA-Z0-9_-]+$", + "scope": "resourceGroup", + "slug": "appcg", // Not in the specs + "dashes": true + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftauthorization + { + "name": "role_assignment", + "length": { + "min": 1, + "max": 64 + }, + "regex": "^(?=.{1,64}$)[^%]+[^ %.]$", + "scope": "assignment", + "slug": "ra", // Not in the specs + "dashes": true + }, + { + "name": "role_definition", + "length": { + "min": 1, + "max": 64 + }, + "regex": "^(?=.{1,64}$)[^%]+[^ %.]$", + "scope": "definition", + "slug": "rd", // Not in the specs + "dashes": true + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftautomation + { + "name": "automation_account", + "length": { + "min": 6, + "max": 50 + }, + "regex": "^(?=.{6,50}$)[a-zA-Z][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "resourceGroup", + "slug": "aa", // Not in the specs + "dashes": true + }, + { + "name": "automation_certificate", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[^<>*%:.?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/ ]$", + "scope": "parent", + "slug": "aacert", // Not in the specs + "dashes": true + }, + { + "name": "automation_credential", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[^<>*%:.?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/ ]$", + "scope": "parent", + "slug": "aacred", // Not in the specs + "dashes": true + }, + { + "name": "automation_runbook", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z][a-zA-Z0-9-]+$", + "scope": "parent", + "slug": "aacred", // Not in the specs + "dashes": true + }, + { + "name": "automation_schedule", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[^<>*%:.?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/ ]$", + "scope": "parent", + "slug": "aasched", // Not in the specs + "dashes": true + }, + { + "name": "automation_variable", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[^<>*%:.?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/ ]$", + "scope": "parent", + "slug": "aavar", // Not in the specs + "dashes": true + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftbatch + { + "name": "batch_account", + "length": { + "min": 3, + "max": 24 + }, + "regex": "^(?=.{3,24}$)[a-z0-9]+$", + "scope": "region", + "slug": "ba", // Not in the specs + "dashes": false + }, + { + "name": "batch_application", + "length": { + "min": 1, + "max": 64 + }, + "regex": "^(?=.{1,64}$)[a-zA-Z0-9_-]+$", + "scope": "parent", + "slug": "baapp", // Not in the specs + "dashes": true + }, + { + "name": "batch_certificate", + "length": { + "min": 5, + "max": 45 + }, + "regex": "^(?=.{5,45}$)[a-zA-Z0-9_-]+$", + "scope": "parent", + "slug": "bacert", // Not in the specs + "dashes": true + }, + { + "name": "batch_pool", + "length": { + "min": 3, + "max": 24 + }, + "regex": "^(?=.{1,64}$)[a-zA-Z0-9_-]+$", + "scope": "parent", + "slug": "bapool", // Not in the specs + "dashes": true + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftbotservice + { + "name": "bot_web_app", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$", + "scope": "global", + "slug": "bot", // Not in the specs + "dashes": true + }, + { + "name": "bot_channel_Email", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$", + "scope": "parent", + "slug": "botmail", // Not in the specs + "dashes": true + }, + { + "name": "bot_channel_ms_teams", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$", + "scope": "parent", + "slug": "botteams", // Not in the specs + "dashes": true + }, + { + "name": "bot_channel_slack", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$", + "scope": "parent", + "slug": "botslack", // Not in the specs + "dashes": true + }, + { + "name": "bot_channel_directline", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$", + "scope": "parent", + "slug": "botline", // Not in the specs + "dashes": true + }, + { + "name": "bot_channels_registration", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$", + "scope": "parent", + "slug": "botchan", // Not in the specs + "dashes": true + }, + { + "name": "bot_connection", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9_-.]+$", + "scope": "parent", + "slug": "botcon", // Not in the specs + "dashes": true + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftcache + { + "name": "redis_cache", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,50}$)(?!.*--)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "redis", + "dashes": true + }, + { + "name": "redis_firewall_rule", + "length": { + "min": 1, + "max": 256 + }, + "regex": "^(?=.{1,256}$)[a-zA-Z0-9]+$", + "scope": "parent", + "slug": "redisfw", // Not in the specs + "dashes": false + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftcdn + { + "name": "cdn_profile", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "resourceGroup", + "slug": "cdnprof", // Not in the specs + "dashes": true + }, + { + "name": "cdn_endpoint", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "cdn", // Not in the specs + "dashes": true + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftcognitiveservices + { + "name": "cognitive_account", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][a-zA-Z0-9-]+$", + "scope": "resourceGroup", + "slug": "cog", + "dashes": true + }, + // https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/resource-name-rules#microsoftcompute + { + "name": "availability_set", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "avail", + "dashes": true + }, + { + "name": "disk_encryption_set", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9_]+$", + "scope": "resourceGroup", + "slug": "des", // Not in the spec + "dashes": true + }, + { + "name": "image", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "img", //Not in the spec + "dashes": true + }, + { + "name": "linux_virtual_machine", + "length": { + "min": 1, + "max": 64 + }, + "regex": "^(?=.{1,64}$)[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&_][^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&]+[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&.-]$", + "scope": "resourceGroup", + "slug": "vm", + "dashes": true + }, + { + "name": "linux_virtual_machine_scale_set", + "length": { + "min": 1, + "max": 64 + }, + "regex": "^(?=.{1,64}$)[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&_][^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&]+[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&.-]$", + "scope": "resourceGroup", + "slug": "vmss", + "dashes": true + }, + { + "name": "managed_disk", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9_]+$", + "scope": "resourceGroup", + "slug": "dsk", + "dashes": true + }, + { + "name": "virtual_machine", + "length": { + "min": 1, + "max": 15 + }, + "regex": "^(?=.{1,15}$)[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&_][^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&]+[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&.-]$", + "scope": "resourceGroup", + "slug": "vm", + "dashes": true + }, + { + "name": "virtual_machine_scale_set", + "length": { + "min": 1, + "max": 15 + }, + "regex": "^(?=.{1,15}$)[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&_][^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&]+[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&.-]$", + "scope": "resourceGroup", + "slug": "vmss", + "dashes": true + }, + { + "name": "windows_virtual_machine", + "length": { + "min": 1, + "max": 15 + }, + "regex": "^(?=.{1,15}$)[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&_][^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&]+[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&.-]$", + "scope": "resourceGroup", + "slug": "vm", + "dashes": true + }, + { + "name": "windows_virtual_machine_scale_set", + "length": { + "min": 1, + "max": 15 + }, + "regex": "^(?=.{1,15}$)[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&_][^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&]+[^\\\\/\\\"\\\\[\\\\]:|<>+=;,?*@&.-]$", + "scope": "resourceGroup", + "slug": "vmss", + "dashes": true + }, + { + "name": "containerGroups", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)(?!.*--)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "resourceGroup", + "slug": "cg", //Not in the spec + "dashes": true + }, + { + "name": "container_registry", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9]+$", + "scope": "resourceGroup", + "slug": "cr", //Not in the spec + "dashes": false + }, + { + "name": "container_registry_webhook", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{5,50}$)[a-zA-Z0-9]+$", + "scope": "resourceGroup", + "slug": "crwh", //Not in the spec + "dashes": false + }, + { + "name": "kubernetes_cluster", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9]$", + "scope": "resourceGroup", + "slug": "aks", + "dashes": true + }, + { + "name": "cosmosdb_account", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-z0-9][a-zA-Z0-9-_.]+[a-zA-Z0-9]$", + "scope": "resourceGroup", + "slug": "cosmos", + "dashes": true + }, + { + "name": "custom_provider", + "length": { + "min": 3, + "max": 64 + }, + "regex": "^(?=.{3,64}$)[^&%?\\\\/]+[^&%.?\\\\/ ]$", + "scope": "resourceGroup", + "slug": "prov", //Not in the spec + "dashes": true + }, + { + "name": "mariadb_server", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)[a-z0-9][a-zA-Z0-9-]+[a-z0-9]$", + "scope": "global", + "slug": "maria", //Not in the spec + "dashes": true + }, + { + "name": "mariadb_firewall_rule", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "mariafw", //Not in the spec + "dashes": true + }, + { + "name": "mariadb_database", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "mariadb", //Not in the spec + "dashes": true + }, + { + "name": "mariadb_virtual_network_rule", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "mariavn", //Not in the spec + "dashes": true + }, + { + "name": "mysql_server", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)[a-z0-9][a-zA-Z0-9-]+[a-z0-9]$", + "scope": "global", + "slug": "mysql", + "dashes": true + }, + { + "name": "mysql_firewall_rule", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "mysqlfw", //Not in the spec + "dashes": true + }, + { + "name": "mysql_database", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "mysqldb", //Not in the spec + "dashes": true + }, + { + "name": "mysql_virtual_network_rule", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "mysqlvn", //Not in the spec + "dashes": true + }, + { + "name": "postgresql_server", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)[a-z0-9][a-zA-Z0-9-]+[a-z0-9]$", + "scope": "global", + "slug": "psql", + "dashes": true + }, + { + "name": "postgresql_firewall_rule", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "psqlfw", //Not in the spec + "dashes": true + }, + { + "name": "postgresql_database", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "psqldb", //Not in the spec + "dashes": true + }, + { + "name": "postgresql_virtual_network_rule", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "psqlvn", //Not in the spec + "dashes": true + }, + { + "name": "database_migration_project", + "length": { + "min": 2, + "max": 57 + }, + "regex": "^(?=.{2,57}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+$", + "scope": "parent", + "slug": "migr", + "dashes": true + }, + { + "name": "database_migration_service", + "length": { + "min": 2, + "max": 62 + }, + "regex": "^(?=.{2,62}$)[a-zA-Z0-9][a-zA-Z0-9-_.]+$", + "scope": "resourceGroup", + "slug": "dms", + "dashes": true + }, + { + "name": "databricks_workspace", + "length": { + "min": 3, + "max": 30 + }, + "regex": "^(?=.{3,30}$)[a-zA-Z0-9-_]+$", + "scope": "resourceGroup", + "slug": "dbw", + "dashes": true + }, + { + "name": "kusto_cluster", + "length": { + "min": 4, + "max": 22 + }, + "regex": "^(?=.{4,22}$)[a-z][a-z0-9]+$", + "scope": "global", + "slug": "kc", // Not in the spec + "dashes": false + }, + { + "name": "kusto_database", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9- .]+$", + "scope": "parent", + "slug": "kdb", // Not in the spec + "dashes": true + }, + { + "name": "kusto_eventhub_data_connection", + "length": { + "min": 1, + "max": 40 + }, + "regex": "^(?=.{1,40}$)[a-zA-Z0-9- .]+$", + "scope": "parent", + "slug": "kehc", // Not in the spec + "dashes": true + }, + { + "name": "data_factory", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "adf", + "dashes": true + }, + { + "name": "data_factory_dataset_mysql", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "adfmysql", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_dataset_postgresql", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "adfpsql", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_dataset_sql_server_table", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "adfmssql", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_integration_runtime_managed", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "adfir", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_pipeline", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "adfpl", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_linked_service_data_lake_storage_gen2", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+$", + "scope": "parent", + "slug": "adfsvst", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_linked_service_key_vault", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+$", + "scope": "parent", + "slug": "adfsvkv", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_linked_service_mysql", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+$", + "scope": "parent", + "slug": "adfsvmysql", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_linked_service_postgresql", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+$", + "scope": "parent", + "slug": "adfsvpsql", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_linked_service_sql_server", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+$", + "scope": "parent", + "slug": "adfsvmssql", // Not in the spec + "dashes": true + }, + { + "name": "data_factory_trigger_schedule", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[a-zA-Z0-9][^<>*%:.?\\\\+\\\\/]+$", + "scope": "parent", + "slug": "adftg", // Not in the spec + "dashes": true + }, + { + "name": "data_lake_analytics_account", + "length": { + "min": 3, + "max": 24 + }, + "regex": "^(?=.{3,24}$)[a-z0-9]+$", + "scope": "global", + "slug": "dla", + "dashes": false + }, + { + "name": "data_lake_analytics_firewall_rule", + "length": { + "min": 3, + "max": 50 + }, + "regex": "^(?=.{3,50}$)[a-z0-9-_]+$", + "scope": "parent", + "slug": "dlfw", // Not in the spec + "dashes": true + }, + { + "name": "data_lake_store", + "length": { + "min": 3, + "max": 24 + }, + "regex": "^(?=.{3,24}$)[a-z0-9]+$", + "scope": "parent", + "slug": "dls", + "dashes": false + }, + { + "name": "data_lake_store_firewall_rule", + "length": { + "min": 3, + "max": 50 + }, + "regex": "^(?=.{3,50}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "dlsfw", + "dashes": true + }, + { + "name": "dev_test_lab", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9-_]+$", + "scope": "resourceGroup", + "slug": "lab", + "dashes": true + }, + { + "name": "dev_test_linux_virtual_machine", + "length": { + "min": 1, + "max": 64 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9-]+$", + "scope": "parent", + "slug": "labvm", // Not in the specs + "dashes": true + }, + { + "name": "dev_test_windows_virtual_machine", + "length": { + "min": 1, + "max": 15 + }, + "regex": "^(?=.{1,15}$)[a-zA-Z0-9-]+$", + "scope": "parent", + "slug": "labvm", // Not in the specs + "dashes": true + }, + { + "name": "frontdoor", + "length": { + "min": 5, + "max": 64 + }, + "regex": "^(?=.{5,64}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "fd", // Not in the spec + "dashes": true + }, + { + "name": "frontdoor_firewall_policy", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "global", + "slug": "fdfw", // Not in the spec + "dashes": true + }, + { + "name": "hdinsight_hadoop_cluster", + "length": { + "min": 3, + "max": 59 + }, + "regex": "^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "hadoop", + "dashes": true + }, + { + "name": "hdinsight_hbase_cluster", + "length": { + "min": 3, + "max": 59 + }, + "regex": "^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "hbase", + "dashes": true + }, + { + "name": "hdinsight_kafka_cluster", + "length": { + "min": 3, + "max": 59 + }, + "regex": "^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "kafka", + "dashes": true + }, + { + "name": "hdinsight_interactive_query_cluster", + "length": { + "min": 3, + "max": 59 + }, + "regex": "^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "iqr", // Not in the spec + "dashes": true + }, + { + "name": "hdinsight_ml_services_cluster", + "length": { + "min": 3, + "max": 59 + }, + "regex": "^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "mls", + "dashes": true + }, + { + "name": "hdinsight_rserver_cluster", + "length": { + "min": 3, + "max": 59 + }, + "regex": "^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "rsv", // Not in the spec + "dashes": true + }, + { + "name": "hdinsight_spark_cluster", + "length": { + "min": 3, + "max": 59 + }, + "regex": "^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "spark", + "dashes": true + }, + { + "name": "hdinsight_storm_cluster", + "length": { + "min": 3, + "max": 59 + }, + "regex": "^(?=.{3,59}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "storm", + "dashes": true + }, + { + "name": "iotcentral_application", + "length": { + "min": 2, + "max": 63 + }, + "regex": "^(?=.{2,63}$)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "global", + "slug": "iotapp", // Not in the specc + "dashes": true + }, + { + "name": "iothub", + "length": { + "min": 3, + "max": 50 + }, + "regex": "^(?=.{3,50}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-z0-9]$", + "scope": "global", + "slug": "iot", + "dashes": true + }, + { + "name": "iothub_consumer_group", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9-._]+$", + "scope": "parent", + "slug": "iotcg", // Not in the specc + "dashes": true + }, + { + "name": "iothub_dps", + "length": { + "min": 3, + "max": 64 + }, + "regex": "^(?=.{3,64}$)[a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "resoureceGroup", + "slug": "dps", // Not in the specc + "dashes": true + }, + { + "name": "iothub_dps_certificate", + "length": { + "min": 1, + "max": 64 + }, + "regex": "^(?=.{3,64}$)[a-zA-Z0-9-._]+$", + "scope": "parent", + "slug": "dpscert", // Not in the specc + "dashes": true + }, + { + "name": "key_vault", + "length": { + "min": 3, + "max": 24 + }, + "regex": "^(?=.{3,24}$)(?!.*--)[a-zA-Z][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "kv", + "dashes": true + }, + { + "name": "key_vault_key", + "length": { + "min": 1, + "max": 127 + }, + "regex": "^(?=.{1,127}$)[a-zA-Z0-9-]+$", + "scope": "parent", + "slug": "kvk", + "dashes": true + }, + { + "name": "key_vault_secret", + "length": { + "min": 1, + "max": 127 + }, + "regex": "^(?=.{1,127}$)[a-zA-Z0-9-]+$", + "scope": "parent", + "slug": "kvs", // Not in the spec + "dashes": true + }, + { + "name": "key_vault_certificate", + "length": { + "min": 1, + "max": 127 + }, + "regex": "^(?=.{1,127}$)[a-zA-Z0-9-]+$", + "scope": "parent", + "slug": "kvc", // Not in the spec + "dashes": true + }, + { + "name": "lb", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "lb", // Not in the spec + "dashes": true + }, + { + "name": "lb_nat_rule", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "lbnatrl", // Not in the spec + "dashes": true + }, + { + "name": "public_ip", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "pip", + "dashes": true + }, + { + "name": "public_ip_prefix", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "pippf", // Not in the spec + "dashes": true + }, + { + "name": "route", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "rt", // Not in the spec + "dashes": true + }, + { + "name": "route_table", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "route", + "dashes": true + }, + { + "name": "subnet", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "snet", + "dashes": true + }, + { + "name": "traffic_manager_profile", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9][a-zA-Z0-9-.]+[a-zA-Z0-9_]$", + "scope": "global", + "slug": "traf", + "dashes": true + }, + { + "name": "virtual_wan", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "vwan", + "dashes": true + }, + { + "name": "virtual_network", + "length": { + "min": 2, + "max": 64 + }, + "regex": "^(?=.{2,64}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "vnet", + "dashes": true + }, + { + "name": "virtual_network_gateway", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "vgw", + "dashes": true + }, + { + "name": "virtual_network_peering", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "vpeer", // Not in the spec + "dashes": true + }, + { + "name": "network_interface", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "nic", + "dashes": true + }, + { + "name": "firewall", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "fw", + "dashes": true + }, + { + "name": "eventhub", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "evh", + "dashes": true + }, + { + "name": "eventhub_namespace", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "global", + "slug": "ehn", // Not in the spec + "dashes": true + }, + { + "name": "eventhub_authorization_rule", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "ehar", // Not in the spec + "dashes": true + }, + { + "name": "eventhub_namespace_authorization_rule", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "ehnar", // Not in the spec + "dashes": true + }, + { + "name": "eventhub_namespace_disaster_recovery_config", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "ehdr", // Not in the spec + "dashes": true + }, + { + "name": "eventhub_consumer_group", + "length": { + "min": 1, + "max": 50 + }, + "regex": "^(?=.{1,50}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "ehcg", // Not in the spec + "dashes": true + }, + { + "name": "stream_analytics_job", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "resourceGroup", + "slug": "asa", + "dashes": true + }, + { + "name": "stream_analytics_function_javascript_udf", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asafunc", + "dashes": true + }, + { + "name": "stream_analytics_output_blob", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asaoblob", + "dashes": true + }, + { + "name": "stream_analytics_output_mssql", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asaomssql", + "dashes": true + }, + { + "name": "stream_analytics_output_eventhub", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asaoeh", + "dashes": true + }, + { + "name": "stream_analytics_output_servicebus_queue", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asaosbq", + "dashes": true + }, + { + "name": "stream_analytics_output_servicebus_topic", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asaosbt", + "dashes": true + }, + { + "name": "stream_analytics_reference_input_blob", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asarblob", + "dashes": true + }, + { + "name": "stream_analytics_stream_input_blob", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asaiblob", + "dashes": true + }, + { + "name": "stream_analytics_stream_input_eventhub", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asaieh", + "dashes": true + }, + { + "name": "stream_analytics_stream_input_iothub", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-zA-Z0-9-_]+$", + "scope": "parent", + "slug": "asaiiot", + "dashes": true + }, + { + "name": "shared_image_gallery", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9.]+[a-zA-Z0-9]$", + "scope": "resourceGroup", + "slug": "sig", + "dashes": false + }, + { + "name": "shared_image", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "si", + "dashes": true + }, + { + "name": "snapshots", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "snap", + "dashes": true + }, + { + "name": "storage_account", + "length": { + "min": 3, + "max": 24 + }, + "regex": "^(?=.{3,24}$)[a-z0-9]+$", + "scope": "global", + "slug": "st", + "dashes": false + }, + { + "name": "storage_container", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+$", + "scope": "parent", + "slug": "stct", + "dashes": true + }, + { + "name": "storage_data_lake_gen2_filesystem", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "parent", + "slug": "stdl", + "dashes": true + }, + { + "name": "storage_queue", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "parent", + "slug": "stq", + "dashes": true + }, + { + "name": "storage_table", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "parent", + "slug": "stt", + "dashes": true + }, + { + "name": "storage_share", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "parent", + "slug": "sts", + "dashes": true + }, + { + "name": "storage_share_directory", + "length": { + "min": 3, + "max": 63 + }, + "regex": "^(?=.{3,63}$)(?!.*--)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "parent", + "slug": "sts", + "dashes": true + }, + { + "name": "machine_learning_workspace", + "length": { + "min": 1, + "max": 260 + }, + "regex": "^(?=.{1,260}$)[^<>*%:.?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/ ]$", + "scope": "resourceGroup", + "slug": "mlw", + "dashes": true + }, + { + "name": "storage_blob", + "length": { + "min": 1, + "max": 1024 + }, + "regex": "^(?=.{1,1024}$)[^\\\\s\\\\/$#&]+$", + "scope": "parent", + "slug": "blob", + "dashes": true + }, + { + "name": "bastion_host", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "parent", + "slug": "snap", + "dashes": true + }, + { + "name": "local_network_gateway", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "lgw", + "dashes": true + }, + { + "name": "application_gateway", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "agw", + "dashes": true + }, + { + "name": "express_route_gateway", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "ergw", // Not in the spec + "dashes": true + }, + { + "name": "express_route_circuit", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "erc", // Not in the spec + "dashes": true + }, + { + "name": "point_to_site_vpn_gateway", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "vpngw", // Not in the spec + "dashes": true + }, + { + "name": "template_deployment", + "length": { + "min": 1, + "max": 64 + }, + "regex": "^(?=.{1,64}$)[a-zA-Z0-9-._\\\\(\\\\)]+$", + "scope": "resourceGroup", + "slug": "deploy", // Not in the spec + "dashes": true + }, + { + "name": "sql_server", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "global", + "slug": "sql", + "dashes": true + }, + { + "name": "mssql_server", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "global", + "slug": "sql", + "dashes": true + }, + { + "name": "mssql_database", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[^<>*%:.?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/ ]$", + "scope": "parent", + "slug": "sqldb", // Not in the specs + "dashes": true + }, + { + "name": "sql_elasticpool", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[^<>*%:.?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/ ]$", + "scope": "parent", + "slug": "sqlep", // Not in the specs + "dashes": true + }, + { + "name": "mssql_elasticpool", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[^<>*%:.?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/ ]$", + "scope": "parent", + "slug": "sqlep", // Not in the specs + "dashes": true + }, + { + "name": "sql_failover_group", + "length": { + "min": 1, + "max": 63 + }, + "regex": "^(?=.{1,63}$)[a-z0-9][a-z0-9-]+[a-z0-9]$", + "scope": "global", + "slug": "sqlfg", // Not in the specs + "dashes": true + }, + { + "name": "sql_firewall_rule", + "length": { + "min": 1, + "max": 128 + }, + "regex": "^(?=.{1,128}$)[^<>*%:?\\\\+\\\\/]+[^<>*%:.?\\\\+\\\\/]$", + "scope": "parent", + "slug": "sqlfw", // Not in the specs + "dashes": true + }, + { + "name": "log_analytics_workspace", + "length": { + "min": 4, + "max": 63 + }, + "regex": "^(?=.{4,63}$)[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]$", + "scope": "parent", + "slug": "log", // Not in the specs + "dashes": true + }, + { + "name": "service_fabric_cluster", + "length": { + "min": 4, + "max": 23 + }, + "regex": "^(?=.{4,23}$)[a-z][a-z0-9-]+[a-z0-9]$", + "scope": "region", + "slug": "sf", // Not in the specs + "dashes": true + }, + { + "name": "maps_account", + "length": { + "min": 1, + "max": 98 + }, + "regex": "^(?=.{1,98}$)[a-zA-Z0-9][a-zA-Z0-9-._]+$", + "scope": "resourceGroup", + "slug": "map", // Not in the specs + "dashes": true + }, + { + "name": "network_watcher", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9-._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "nw", // Not in the spec + "dashes": true + } +] \ No newline at end of file diff --git a/resourceDefinition_guess.jsonc b/resourceDefinition_guess.jsonc new file mode 100644 index 0000000..aa1b57f --- /dev/null +++ b/resourceDefinition_guess.jsonc @@ -0,0 +1,14 @@ +[ + { + "name": "private_endpoint", + "length": { + "min": 1, + "max": 80 + }, + "regex": "^(?=.{1,80}$)[a-zA-Z0-9][a-zA-Z0-9\\-\\._]+[a-zA-Z0-9_]$", + "scope": "resourceGroup", + "slug": "pe", // Not in the specs + "dashes": true + }, + {} +] \ No newline at end of file diff --git a/templates/main.tmpl b/templates/main.tmpl new file mode 100644 index 0000000..719c3f7 --- /dev/null +++ b/templates/main.tmpl @@ -0,0 +1,54 @@ +{{- define "resources" -}} + {{- .Name }} = { + name = substr(join("{{if .Dashes}}-{{ end }}", compact([local.prefix{{if not .Dashes}}_safe{{ end }}, "{{ .Slug }}", local.suffix{{if not .Dashes}}_safe{{ end }}])), 0, {{ .Length.Max }}) + name_unique = substr(join("{{if .Dashes}}-{{ end }}", compact([local.prefix{{if not .Dashes}}_safe{{ end }}, "{{ .Slug }}", local.suffix_unique{{if not .Dashes}}_safe{{ end }}])), 0, {{ .Length.Max }}) + dashes = {{ .Dashes }} + slug = "{{ .Slug }}" + min_length = {{ .Length.Min }} + max_length = {{ .Length.Max }} + scope = "{{ .Scope }}" + regex = "/{{ .Regex }}/" + } +{{- end -}} + + +{{- define "main" -}} +provider "random" { + version = "~>2.2" +} + +resource "random_string" "main" { + length = 60 + special = false + upper = false + number = var.unique-include-numbers +} + +resource "random_string" "first_letter" { + length = 1 + special = false + upper = false + number = false +} + + + +locals { + // adding a first letter to guarantee that you always start with a letter + random_safe_generation = join("", [random_string.first_letter.result, random_string.main.result]) + random = substr(coalesce(var.unique-seed, local.random_safe_generation), 0, var.unique-length) + prefix = join("-", var.prefix) + prefix_safe = lower(join("", var.prefix)) + suffix = join("-", var.suffix) + suffix_unique = join("-", concat(var.suffix, [local.random])) + suffix_safe = lower(join("", var.suffix)) + suffix_unique_safe = lower(join("", concat(var.suffix, [local.random]))) + // Names based in the recomendations of + // https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/ready/azure-best-practices/naming-and-tagging + az = { + {{- range . }} + {{ template "resources" .}} + {{- end }} + } +} +{{ end }} \ No newline at end of file diff --git a/templates/outputs.tmpl b/templates/outputs.tmpl new file mode 100644 index 0000000..be7a8e2 --- /dev/null +++ b/templates/outputs.tmpl @@ -0,0 +1,16 @@ +{{ define "output" }} +output "{{ .Name }}" { + value = local.az.{{ .Name }} +} +{{ end }} + +{{ define "outputs" }} +output "unique-seed" { + value = coalesce(var.unique-seed, local.random_safe_generation) +} + +{{- range . }} + {{- template "output" .}} +{{- end }} + +{{ end }} \ No newline at end of file diff --git a/variables.tf b/variables.tf index f721689..3c2a301 100644 --- a/variables.tf +++ b/variables.tf @@ -11,16 +11,19 @@ variable "suffix" { } variable "unique-seed" { - type = string - default = "" + description = "Custom value for the randon charecters to be used" + type = string + default = "" } variable "unique-length" { - type = number - default = 4 + description = "Max length of the uniquiness suffix to be added" + type = number + default = 4 } variable "unique-include-numbers" { - type = bool - default = true + description = "If you want to iunclude numbers in the unique generation" + type = bool + default = true }