├── .devcontainer └── devcontainer.json ├── .github ├── actions │ ├── run-terraform-docs │ │ └── action.yml │ └── run-terraform-sec │ │ └── action.yml └── workflows │ ├── aks-cluster.yml │ ├── analysis-services-server.yml │ ├── application-insights.yml │ ├── bastion-host.yml │ ├── batch-services-account.yml │ ├── cognitive-search.yml │ ├── cognitive-services-account.yml │ ├── cognitive-services-deployment.yml │ ├── container-registry.yml │ ├── cosmosdb-account.yml │ ├── cosmosdb-cassandra-keyspace.yml │ ├── cosmosdb-gremlin-database.yml │ ├── cosmosdb-mongo-database.yml │ ├── cosmosdb-sql-database.yml │ ├── cosmosdb-table.yml │ ├── data-factory.yml │ ├── data-share-account.yml │ ├── data-share.yml │ ├── databricks-access-connector.yml │ ├── databricks.yml │ ├── event-grid-domain.yml │ ├── event-grid-topic.yml │ ├── event-hubs-namespace.yml │ ├── event-hubs.yml │ ├── fabric-capacity.yml │ ├── firewall.yml │ ├── hdinsight-hadoop.yml │ ├── hdinsight-hbase.yml │ ├── hdinsight-interactive.yml │ ├── hdinsight-kafka.yml │ ├── hdinsight-spark.yml │ ├── key-vault.yml │ ├── kusto-cluster.yml │ ├── kusto-database.yml │ ├── linux-function-app.yml │ ├── load-balancer.yml │ ├── log-analytics-cluster.yml │ ├── log-analytics-workspace.yml │ ├── machine-learning-compute-cluster.yml │ ├── machine-learning-compute-instance.yml │ ├── machine-learning-inference-cluster.yml │ ├── machine-learning-synapse-spark.yml │ ├── machine-learning-workspace.yml │ ├── mysql-database.yml │ ├── network-security-group.yml │ ├── network-security-rule.yml │ ├── postgresql-database.yml │ ├── powerbi-embedded.yml │ ├── private-dns-zone.yml │ ├── private-endpoint.yml │ ├── purview.yml │ ├── redis-cache.yml │ ├── redis-enterprise.yml │ ├── resource-group.yml │ ├── route-table.yml │ ├── route.yml │ ├── self-hosted-integration-runtime.yml │ ├── service-bus-namespace.yml │ ├── service-bus-queue.yml │ ├── service-bus-subscription.yml │ ├── service-bus-topic.yml │ ├── service-plan.yml │ ├── sql-database-server.yml │ ├── sql-database.yml │ ├── sql-managed-instance.yml │ ├── storage-account.yml │ ├── stream-analytics-job.yml │ ├── subnet-network-security-group-association.yml │ ├── subnet-route-table-association.yml │ ├── subnet.yml │ ├── synapse-kusto-pool.yml │ ├── synapse-private-link-hub.yml │ ├── synapse-spark-pool.yml │ ├── synapse-sql-pool.yml │ ├── synapse-workspace.yml │ ├── user-assigned-identity.yml │ ├── virtual-machine.yml │ ├── virtual-network-peering.yml │ └── virtual-network.yml ├── .gitignore ├── CODE_OF_CONDUCT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── SUPPORT.md └── terraform ├── aks-cluster ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── aks.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── analysis-services-server ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── analysis_services_server.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── application-insights ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── application_insights.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── bastion-host ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── bastion_host.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── batch-services └── batch-services-account │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── batch_services_account.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── cognitive-search ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── cognitive_search.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── cognitive-services ├── cognitive-account │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── cognitive_account.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── cognitive-deployment │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── cognitive_deployment.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── container-registry ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── container_registry.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── cosmosdb ├── cosmosdb-account │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── cosmosdb_account.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── cosmosdb-cassandra-keyspace │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── cosmosdb_cassandra_keyspace.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── cosmosdb-gremlin-database │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── cosmosdb_gremlin_database.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── cosmosdb-mongo-database │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── cosmosdb_mongo_database.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── cosmosdb-sql-database │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── cosmosdb_sql_database.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── cosmosdb-table │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── cosmosdb_table.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── data-explorer ├── kusto-cluster │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── kusto_cluster.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── kusto-database │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── kusto_database.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── data-factory ├── data-factory │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── data_factory.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── self-hosted-integration-runtime │ ├── README.md │ ├── gatewayInstall.ps1 │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── self_hosted_integration_runtime.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── data-share ├── data-share-account │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── data_share_account.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── data-share │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── data_share.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── databricks ├── access-connector │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── databricks_access_connector.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── databricks-workspace │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── providers.tf │ ├── test │ ├── databricks.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── event-grid ├── event-grid-domain │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── event_grid_domain.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── event-grid-topic │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── event_grid_topic.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── event-hubs ├── event-hubs-namespace │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── event_hubs_namespace.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── event-hubs │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── event_hubs.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── fabric └── fabric-capacity │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── providers.tf │ ├── test │ ├── fabric_capacity.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ └── variables.tf │ └── variables.tf ├── firewall ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── firewall.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── function-app └── linux-function-app │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── linux_function_app.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── hdinsight ├── hdinsight-hadoop │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── hdinsight_hadoop.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── hdinsight-hbase │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── hdinsight_hbase.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── hdinsight-interactive │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── hdinsight_interactive.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── hdinsight-kafka │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── hdinsight_kafka.tf │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── hdinsight-spark │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── hdinsight_spark.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── key-vault ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── key_vault.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── load-balancer ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── load_balancer.tf │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── log-analytics ├── log-analytics-cluster │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── log_analytics_cluster.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── log-analytics-workspace │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── locals.tf │ ├── log_analytics_workspace.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── machine-learning ├── machine-learning-compute-cluster │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── machine_learning_compute_cluster.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── machine-learning-compute-instance │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── machine_learning_compute_instance.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── machine-learning-inference-cluster │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── machine_learning_inference_cluster.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── machine-learning-synapse-spark │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── machine_learning_synapse_spark.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── machine-learning-workspace │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── locals.tf │ ├── machine_learning_workspace.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── mysql-database ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── mysql_database.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── network-security-group ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── network_security_group.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── network-security-rule ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── network_security_rule.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── postgresql-database ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── postgresql_database.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── powerbi-embedded ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── powerbi_embedded.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── private-dns-zone ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── private_dns_zone.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── private-endpoint ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── private_endpoint.tf │ ├── providers.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── purview ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── purview.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── redis-cache ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── redis_cache.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── redis-enterprise ├── README.md ├── locals.tf ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── redis_cache.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── resource-group ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── resource_group.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── route-table ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── route_table.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── route ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── route.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── service-bus ├── service-bus-namespace │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── service_bus_namespace.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── service-bus-queue │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── service_bus_queue.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── service-bus-subscription │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── service_bus_subscription.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── service-bus-topic │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── service_bus_topic.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── service-plan ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── service_plan.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── sql-database-server ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── sql_database_server.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── sql-database ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── sql_database.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── sql-managed-instance ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── sql_managed_instance.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── storage-account ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── storage_account.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── stream-analytics └── stream-analytics-job │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── stream_analytics_job.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── subnet-network-security-group-association ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── subnet_network_security_group_association.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── subnet-route-table-association ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── subnet_route_table_association.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── subnet ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── subnet.tf │ ├── unit_test.go │ └── variables.tf └── variables.tf ├── synapse ├── synapse-kusto-pool │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── providers.tf │ ├── test │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── synapse_kusto_pool.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── synapse-private-link-hub │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── synapse_private_link_hub.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── synapse-spark-pool │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── synapse_spark_pool.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf ├── synapse-sql-pool │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ │ ├── locals.tf │ │ ├── outputs.tf │ │ ├── providers.tf │ │ ├── synapse_sql_pool.tf │ │ ├── unit_test.go │ │ └── variables.tf │ └── variables.tf └── synapse-workspace │ ├── README.md │ ├── main.tf │ ├── outputs.tf │ ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── synapse_workspace.tf │ ├── unit_test.go │ └── variables.tf │ └── variables.tf ├── user-assigned-identity ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ ├── user_assigned_identity.tf │ └── variables.tf └── variables.tf ├── virtual-machine ├── README.md ├── main.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ ├── variables.tf │ └── virtual_machine.tf └── variables.tf ├── virtual-network-peering ├── README.md ├── maint.tf ├── outputs.tf ├── test │ ├── locals.tf │ ├── outputs.tf │ ├── providers.tf │ ├── unit_test.go │ ├── variables.tf │ └── virtual_network_peering.tf └── variables.tf └── virtual-network ├── README.md ├── main.tf ├── outputs.tf ├── test ├── locals.tf ├── outputs.tf ├── providers.tf ├── unit_test.go ├── variables.tf └── virtual_network.tf └── variables.tf /.github/actions/run-terraform-docs/action.yml: -------------------------------------------------------------------------------- 1 | name: Run Terraform Docs 2 | description: -- 3 | 4 | runs: 5 | using: "composite" 6 | steps: 7 | - uses: actions/checkout@v3 8 | with: 9 | ref: ${{ github.event.pull_request.head.ref }} 10 | repository: ${{ github.event.pull_request.head.repo.full_name }} 11 | 12 | - name: Render terraform docs and push changes back to PR 13 | uses: terraform-docs/gh-actions@main 14 | with: 15 | working-dir: "${{ env.terraform_workingdir }}" 16 | output-file: README.md 17 | output-method: inject 18 | git-push: "true" 19 | args: --hide providers --hide requirements --hide modules --sort=false -------------------------------------------------------------------------------- /.github/actions/run-terraform-sec/action.yml: -------------------------------------------------------------------------------- 1 | name: Run tfsec 2 | description: -- 3 | 4 | runs: 5 | using: "composite" 6 | steps: 7 | - name: Run tfsec with reviewdog output 8 | uses: reviewdog/action-tfsec@master 9 | with: 10 | github_token: ${{ env.GH_TOKEN }} 11 | working_directory: "${{ env.terraform_workingdir }}" # Change working directory 12 | level: info # Get more output from reviewdog 13 | reporter: github-pr-review # Change reviewdog reporter 14 | filter_mode: nofilter # Check all files, not just the diff 15 | fail_on_error: false # Fail action if errors are found 16 | flags: -tee # Add debug flag to reviewdog 17 | tfsec_flags: "" # Optional -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Terraform specific 2 | 3 | .terraform 4 | 5 | .terraform.lock.hcl 6 | terraform.tfstate 7 | terraform.tfstate.backup 8 | .terraform.tfstate.lock.info 9 | terraform.tfvars 10 | 11 | tests/ 12 | app-service/ 13 | stream-analytics-cluster/ -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Microsoft Open Source Code of Conduct 2 | 3 | This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). 4 | 5 | Resources: 6 | 7 | - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/) 8 | - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) 9 | - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns 10 | -------------------------------------------------------------------------------- /terraform/aks-cluster/test/aks.tf: -------------------------------------------------------------------------------- 1 | module "aks" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | dns_prefix = "azdatalbsaks" 7 | default_node_pool = { 8 | name = "default" 9 | node_count = 3 10 | vm_size = "Standard_D2_v2" 11 | } 12 | tags = {} 13 | } 14 | 15 | # Module dependencies 16 | 17 | module "local_rg" { 18 | source = "../../resource-group" 19 | basename = random_string.postfix.result 20 | location = var.location 21 | tags = local.tags 22 | } -------------------------------------------------------------------------------- /terraform/aks-cluster/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "aks-cluster" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/aks-cluster/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.aks.id 3 | } 4 | 5 | output "name" { 6 | value = module.aks.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.aks.resource_group_name 11 | } 12 | 13 | output "all" { 14 | value = module.aks.all 15 | sensitive = true 16 | } -------------------------------------------------------------------------------- /terraform/aks-cluster/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "aks.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/aks-cluster/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/analysis-services-server/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/analysis_services_server 2 | # https://docs.microsoft.com/en-us/azure/analysis-services/analysis-services-vnet-gateway 3 | 4 | resource "azurerm_analysis_services_server" "adl_as" { 5 | name = "as${var.basename}" 6 | location = var.location 7 | resource_group_name = var.resource_group_name 8 | sku = var.sku 9 | admin_users = var.admin_users 10 | enable_power_bi_service = var.enable_power_bi_service 11 | tags = var.tags 12 | 13 | count = var.module_enabled ? 1 : 0 14 | } -------------------------------------------------------------------------------- /terraform/analysis-services-server/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_analysis_services_server.adl_as) > 0 ? 4 | azurerm_analysis_services_server.adl_as[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Analysis Services Server." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_analysis_services_server.adl_as) > 0 ? 12 | azurerm_analysis_services_server.adl_as[0].name : "" 13 | ) 14 | description = "The name of the Analysis Services Server." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_analysis_services_server.adl_as) > 0 ? 20 | azurerm_analysis_services_server.adl_as[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Analysis Services Server exists." 23 | } -------------------------------------------------------------------------------- /terraform/analysis-services-server/test/analysis_services_server.tf: -------------------------------------------------------------------------------- 1 | module "analysis_services_server" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Module dependencies 10 | 11 | module "local_rg" { 12 | source = "../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/analysis-services-server/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "analytis-services-server" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/analysis-services-server/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.analysis_services_server.id 3 | } 4 | 5 | output "name" { 6 | value = module.analysis_services_server.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.analysis_services_server.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/analysis-services-server/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "analysisservicesserver.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/analysis-services-server/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/application-insights/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/application_insights 2 | 3 | resource "azurerm_application_insights" "adl_appi" { 4 | name = "appi-${var.basename}" 5 | location = var.location 6 | resource_group_name = var.resource_group_name 7 | application_type = var.application_type 8 | internet_ingestion_enabled = var.internet_ingestion_enabled 9 | internet_query_enabled = var.internet_query_enabled 10 | tags = var.tags 11 | 12 | count = var.module_enabled ? 1 : 0 13 | } -------------------------------------------------------------------------------- /terraform/application-insights/test/application_insights.tf: -------------------------------------------------------------------------------- 1 | module "application_insights" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Module dependencies 10 | 11 | module "local_rg" { 12 | source = "../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/application-insights/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "application-insights" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/application-insights/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.application_insights.id 3 | } 4 | 5 | output "instrumentation_key" { 6 | value = module.application_insights.instrumentation_key 7 | sensitive = true 8 | } 9 | 10 | output "name" { 11 | value = module.application_insights.name 12 | } 13 | 14 | output "resource_group_name" { 15 | value = module.application_insights.resource_group_name 16 | } -------------------------------------------------------------------------------- /terraform/application-insights/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/bastion-host/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_bastion_host.adl_bas) > 0 ? 4 | azurerm_bastion_host.adl_bas[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Bastion Host." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_bastion_host.adl_bas) > 0 ? 12 | azurerm_bastion_host.adl_bas[0].name : "" 13 | ) 14 | description = "The name of the Bastion Host." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_bastion_host.adl_bas) > 0 ? 20 | azurerm_bastion_host.adl_bas[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Bastion Host exists." 23 | } -------------------------------------------------------------------------------- /terraform/bastion-host/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "bastion-host" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | snet_name = "AzureBastionSubnet" 9 | 10 | vnet_name = "vnet-adl-modules-test" 11 | } -------------------------------------------------------------------------------- /terraform/bastion-host/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.bastion.id 3 | } 4 | 5 | output "name" { 6 | value = module.bastion.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.bastion.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/bastion-host/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "bastionhost.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/bastion-host/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/batch-services/batch-services-account/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "batch-services/account" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_batch = "privatelink.batchservices.azure.com" 9 | dns_st_blob = "privatelink.blob.core.windows.net" 10 | } 11 | -------------------------------------------------------------------------------- /terraform/batch-services/batch-services-account/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.batch_services_account.id 3 | } 4 | 5 | output "name" { 6 | value = module.batch_services_account.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.batch_services_account.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/batch-services/batch-services-account/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "batchservicesaccount.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/batch-services/batch-services-account/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "firewall_virtual_network_subnet_ids" { 13 | type = list(string) 14 | description = "A list of virtual network subnet ids to secure the storage account." 15 | default = [] 16 | } 17 | -------------------------------------------------------------------------------- /terraform/cognitive-search/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_search_service.adl_srch) > 0 ? 4 | azurerm_search_service.adl_srch[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Cognitive Search." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_search_service.adl_srch) > 0 ? 12 | azurerm_search_service.adl_srch[0].name : "" 13 | ) 14 | description = "The name of the Cognitive Search." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_search_service.adl_srch) > 0 ? 20 | azurerm_search_service.adl_srch[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Cognitive Search exists." 23 | } -------------------------------------------------------------------------------- /terraform/cognitive-search/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cognitive-search" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_cs_search = "privatelink.search.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/cognitive-search/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cognitive_search.id 3 | } 4 | 5 | output "name" { 6 | value = module.cognitive_search.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.cognitive_search.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/cognitive-search/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cognitivesearch.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cognitive-search/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-account/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_cognitive_account.adl_cog_acc) > 0 ? 4 | azurerm_cognitive_account.adl_cog_acc[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Cognitive Services." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_cognitive_account.adl_cog_acc) > 0 ? 12 | azurerm_cognitive_account.adl_cog_acc[0].name : "" 13 | ) 14 | description = "The name of the Cognitive Services." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_cognitive_account.adl_cog_acc) > 0 ? 20 | azurerm_cognitive_account.adl_cog_acc[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Cognitive Services exists." 23 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-account/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cognitive-account" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_cog = "privatelink.cognitiveservices.azure.com" 9 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-account/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cognitive_account.id 3 | } 4 | 5 | output "name" { 6 | value = module.cognitive_account.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.cognitive_account.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-account/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cognitiveaccount.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-account/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-deployment/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/cognitive_deployment 2 | 3 | resource "azurerm_cognitive_deployment" "adl_cog_dpl" { 4 | name = "cog-dpl-${var.basename}" 5 | cognitive_account_id = var.cognitive_account_id 6 | model { 7 | format = var.model_format 8 | name = var.model_name 9 | version = var.model_version 10 | } 11 | scale { 12 | type = var.scale_type 13 | } 14 | rai_policy_name = var.rai_policy_name 15 | 16 | count = var.module_enabled ? 1 : 0 17 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-deployment/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_cognitive_deployment.adl_cog_dpl) > 0 ? 4 | azurerm_cognitive_deployment.adl_cog_dpl[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Cognitive Deployment." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_cognitive_deployment.adl_cog_dpl) > 0 ? 12 | azurerm_cognitive_deployment.adl_cog_dpl[0].name : "" 13 | ) 14 | description = "The name of the Cognitive Deployment." 15 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-deployment/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cognitive-deployment" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_cog = "privatelink.cognitiveservices.azure.com" 9 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-deployment/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cognitive_deployment.id 3 | } 4 | 5 | output "name" { 6 | value = module.cognitive_deployment.name 7 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-deployment/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cognitivedeployment.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cognitive-services/cognitive-deployment/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West Europe" 10 | } -------------------------------------------------------------------------------- /terraform/container-registry/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_container_registry.adl_cr) > 0 ? 4 | azurerm_container_registry.adl_cr[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Container Registry." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_container_registry.adl_cr) > 0 ? 12 | azurerm_container_registry.adl_cr[0].name : "" 13 | ) 14 | description = "The name of the Container Registry." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_container_registry.adl_cr) > 0 ? 20 | azurerm_container_registry.adl_cr[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Container Registry exists." 23 | } -------------------------------------------------------------------------------- /terraform/container-registry/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "container-registry" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_cr = "privatelink.azurecr.io" 9 | } -------------------------------------------------------------------------------- /terraform/container-registry/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.container_registry.id 3 | } 4 | 5 | output "name" { 6 | value = module.container_registry.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.container_registry.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/container-registry/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "containerregistry.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/container-registry/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-account/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_cosmosdb_account.adl_cosmos) > 0 ? 4 | azurerm_cosmosdb_account.adl_cosmos[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of CosmosDB account." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_cosmosdb_account.adl_cosmos) > 0 ? 12 | azurerm_cosmosdb_account.adl_cosmos[0].name : "" 13 | ) 14 | description = "The name of the CosmosDB account." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_cosmosdb_account.adl_cosmos) > 0 ? 20 | azurerm_cosmosdb_account.adl_cosmos[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the CosmosDB account exists." 23 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-account/test/cosmosdb_account.tf: -------------------------------------------------------------------------------- 1 | module "cosmosdb_account" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | kind = var.kind 7 | enable_capabilities = var.enable_capabilities 8 | tags = {} 9 | } 10 | 11 | # Module dependencies 12 | 13 | module "local_rg" { 14 | source = "../../../resource-group" 15 | basename = random_string.postfix.result 16 | location = var.location 17 | tags = local.tags 18 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-account/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cosmosdb-account" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-account/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cosmosdb_account.id 3 | } 4 | 5 | output "name" { 6 | value = module.cosmosdb_account.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.cosmosdb_account.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-account/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cosmosdbaccount.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-account/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West US" 10 | } 11 | 12 | variable "kind" { 13 | type = string 14 | description = "Specifies the Kind of CosmosDB to create." 15 | default = "GlobalDocumentDB" 16 | } 17 | 18 | variable "enable_capabilities" { 19 | type = list(string) 20 | description = "Configures the capabilities to enable for the Cosmos DB account." 21 | default = ["DisableRateLimitingResponses", "EnableAggregationPipeline"] 22 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-cassandra-keyspace/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cosmosdb-cassandra-keyspace" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_cosmos_cassandra = "privatelink.cassandra.cosmos.azure.com" 9 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-cassandra-keyspace/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cosmosdb_cassandra_keyspace.id 3 | } 4 | 5 | output "name" { 6 | value = module.cosmosdb_cassandra_keyspace.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.cosmosdb_cassandra_keyspace.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-cassandra-keyspace/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cosmosdbcassandrakeyspace.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-cassandra-keyspace/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West US" 10 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-gremlin-database/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cosmosdb-gremlin-database" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | snet_name = "snet-adl-modules-test-default" 9 | vnet_name = "vnet-adl-modules-test-we" 10 | dns_cosmos_gremlin = "privatelink.gremlin.cosmos.azure.com" 11 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-gremlin-database/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cosmosdb_gremlin_database.id 3 | } 4 | 5 | output "name" { 6 | value = module.cosmosdb_gremlin_database.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.cosmosdb_gremlin_database.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-gremlin-database/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cosmosdbgremlindatabase.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-gremlin-database/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West US" 10 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-mongo-database/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cosmosdb-mongo-database" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_cosmos_mongo = "privatelink.mongo.cosmos.azure.com" 9 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-mongo-database/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cosmosdb_mongo_database.id 3 | } 4 | 5 | output "name" { 6 | value = module.cosmosdb_mongo_database.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.cosmosdb_mongo_database.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-mongo-database/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cosmosdbmongodatabase.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-mongo-database/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West US" 10 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-sql-database/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cosmosdb-sql-database" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | snet_name = "snet-adl-modules-test-default" 9 | 10 | vnet_name = "vnet-adl-modules-test-we" 11 | 12 | dns_cosmos_sql = "privatelink.documents.azure.com" 13 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-sql-database/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cosmosdb_sql_database.id 3 | } 4 | 5 | output "name" { 6 | value = module.cosmosdb_sql_database.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.cosmosdb_sql_database.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-sql-database/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cosmosdbsqldatabase.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-sql-database/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West US" 10 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-table/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_cosmosdb_table.adl_cosmos_table) > 0 ? 4 | azurerm_cosmosdb_table.adl_cosmos_table[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of CosmosDB table." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_cosmosdb_table.adl_cosmos_table) > 0 ? 12 | azurerm_cosmosdb_table.adl_cosmos_table[0].name : "" 13 | ) 14 | description = "The name of the CosmosDB table." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_cosmosdb_table.adl_cosmos_table) > 0 ? 20 | azurerm_cosmosdb_table.adl_cosmos_table[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the CosmosDB table exists." 23 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-table/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "cosmosdb-table" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_cosmos_table = "privatelink.table.cosmos.azure.com" 9 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-table/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.cosmosdb_table.id 3 | } 4 | 5 | output "name" { 6 | value = module.cosmosdb_table.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.cosmosdb_table.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-table/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "cosmosdbtable.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/cosmosdb/cosmosdb-table/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West US" 10 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-cluster/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_kusto_cluster.adl_dec) > 0 ? 4 | azurerm_kusto_cluster.adl_dec[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Azure Data Explorer Cluster." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_kusto_cluster.adl_dec) > 0 ? 12 | azurerm_kusto_cluster.adl_dec[0].name : "" 13 | ) 14 | description = "The name of the Azure Data Explorer Cluster." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_kusto_cluster.adl_dec) > 0 ? 20 | azurerm_kusto_cluster.adl_dec[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Azure Data Explorer Cluster exists." 23 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-cluster/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "kusto-cluster" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_dec_cluster = "privatelink.northeurope.kusto.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-cluster/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.kusto_cluster.id 3 | } 4 | 5 | output "name" { 6 | value = module.kusto_cluster.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.kusto_cluster.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-cluster/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "kustocluster.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-cluster/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-database/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/kusto_database 2 | 3 | resource "azurerm_kusto_database" "adl_dedb" { 4 | name = "dedb-${var.basename}" 5 | resource_group_name = var.resource_group_name 6 | location = var.location 7 | cluster_name = var.cluster_name 8 | hot_cache_period = var.hot_cache_period 9 | soft_delete_period = var.soft_delete_period 10 | 11 | count = var.module_enabled ? 1 : 0 12 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-database/outputs.tf: -------------------------------------------------------------------------------- 1 | output "name" { 2 | value = ( 3 | length(azurerm_kusto_database.adl_dedb) > 0 ? 4 | azurerm_kusto_database.adl_dedb[0].name : "" 5 | ) 6 | description = "The name of the Azure Data Explorer database." 7 | } 8 | 9 | output "resource_group_name" { 10 | value = ( 11 | length(azurerm_kusto_database.adl_dedb) > 0 ? 12 | azurerm_kusto_database.adl_dedb[0].resource_group_name : "" 13 | ) 14 | description = "Resource Group where the Azure Data Explorer database exists." 15 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-database/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "kusto-database" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_dec_cluster = "privatelink.northeurope.kusto.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-database/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "name" { 2 | value = module.kusto_database.name 3 | } 4 | 5 | output "resource_group_name" { 6 | value = module.kusto_database.resource_group_name 7 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-database/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "kustodatabase.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/data-explorer/kusto-database/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/data-factory/data-factory/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_data_factory.adl_adf) > 0 ? 4 | azurerm_data_factory.adl_adf[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Azure Data Factory." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_data_factory.adl_adf) > 0 ? 12 | azurerm_data_factory.adl_adf[0].name : "" 13 | ) 14 | description = "The name of the Azure Data Factory." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_data_factory.adl_adf) > 0 ? 20 | azurerm_data_factory.adl_adf[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Azure Data Factory exists." 23 | } -------------------------------------------------------------------------------- /terraform/data-factory/data-factory/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "data-factory" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_adf_df = "privatelink.datafactory.azure.net" 9 | dns_adf_portal = "privatelink.adf.azure.com" 10 | } -------------------------------------------------------------------------------- /terraform/data-factory/data-factory/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.data_factory.id 3 | } 4 | 5 | output "name" { 6 | value = module.data_factory.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.data_factory.resource_group_name 11 | } 12 | -------------------------------------------------------------------------------- /terraform/data-factory/data-factory/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "datafactory.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/data-factory/data-factory/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/data-factory/self-hosted-integration-runtime/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "self-hosted-integration-runtime" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_adf_df = "privatelink.datafactory.azure.net" 9 | dns_adf_portal = "privatelink.adf.azure.com" 10 | dns_st_blob = "privatelink.blob.core.windows.net" 11 | } -------------------------------------------------------------------------------- /terraform/data-factory/self-hosted-integration-runtime/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.self_hosted_integration_runtime.id 3 | } 4 | 5 | output "name" { 6 | value = module.self_hosted_integration_runtime.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.self_hosted_integration_runtime.resource_group_name 11 | } 12 | 13 | output "primary_authorization_key" { 14 | value = module.self_hosted_integration_runtime.primary_authorization_key 15 | sensitive = true 16 | } -------------------------------------------------------------------------------- /terraform/data-factory/self-hosted-integration-runtime/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "selfhostedintegrationruntime.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | provider "azurerm" { 17 | features {} 18 | } -------------------------------------------------------------------------------- /terraform/data-factory/self-hosted-integration-runtime/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "firewall_virtual_network_subnet_ids" { 13 | type = list(string) 14 | description = "A list of virtual network subnet ids to secure the storage account." 15 | default = [] 16 | } 17 | -------------------------------------------------------------------------------- /terraform/data-share/data-share-account/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/data_share_account 2 | 3 | resource "azurerm_data_share_account" "adl_dsa" { 4 | name = "dsa-${var.basename}" 5 | location = var.location 6 | resource_group_name = var.resource_group_name 7 | identity { 8 | type = "SystemAssigned" 9 | } 10 | tags = var.tags 11 | 12 | count = var.module_enabled ? 1 : 0 13 | } 14 | -------------------------------------------------------------------------------- /terraform/data-share/data-share-account/test/data_share_account.tf: -------------------------------------------------------------------------------- 1 | module "data_share_account" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/data-share/data-share-account/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "data-share-account" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/data-share/data-share-account/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.data_share_account.id 3 | } 4 | 5 | output "name" { 6 | value = module.data_share_account.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.data_share_account.resource_group_name 11 | } 12 | 13 | output "identity" { 14 | value = module.data_share_account.identity 15 | } -------------------------------------------------------------------------------- /terraform/data-share/data-share-account/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "datashareaccount.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } 20 | -------------------------------------------------------------------------------- /terraform/data-share/data-share-account/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/data-share/data-share/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_data_share.adl_ds) > 0 ? 4 | azurerm_data_share.adl_ds[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Data Share." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_data_share.adl_ds) > 0 ? 12 | azurerm_data_share.adl_ds[0].name : "" 13 | ) 14 | description = "The name of the Data Share." 15 | } -------------------------------------------------------------------------------- /terraform/data-share/data-share/test/data_share.tf: -------------------------------------------------------------------------------- 1 | module "data_share" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | account_id = module.local_data_share_account.id 5 | snapshot_schedule = var.snapshot_schedule 6 | } 7 | 8 | # Module dependencies 9 | 10 | module "local_data_share_account" { 11 | source = "../../data-share-account" 12 | basename = random_string.postfix.result 13 | resource_group_name = module.local_rg.name 14 | location = var.location 15 | tags = {} 16 | } 17 | 18 | module "local_rg" { 19 | source = "../../../resource-group" 20 | basename = random_string.postfix.result 21 | location = var.location 22 | tags = local.tags 23 | } 24 | -------------------------------------------------------------------------------- /terraform/data-share/data-share/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "data-share" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/data-share/data-share/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.data_share.id 3 | } 4 | 5 | output "name" { 6 | value = module.data_share.name 7 | } -------------------------------------------------------------------------------- /terraform/data-share/data-share/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "datashare.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } 20 | -------------------------------------------------------------------------------- /terraform/data-share/data-share/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "snapshot_schedule" { 13 | type = map( 14 | object( 15 | { 16 | name = optional(string) 17 | recurrence = optional(string) 18 | start_time = optional(string) 19 | } 20 | ) 21 | ) 22 | default = { 23 | snap_sched = { 24 | name = "example-ss" 25 | recurrence = "Day" 26 | start_time = "2020-04-17T04:47:52.9614956Z" 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /terraform/databricks/access-connector/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_databricks_access_connector.adl_adb_access_connector) > 0 ? 4 | azurerm_databricks_access_connector.adl_adb_access_connector[0].id : null 5 | ) 6 | description = "The ID of the Databricks Access Connector in the Azure management plane." 7 | } 8 | 9 | output "identity" { 10 | value = ( 11 | length(azurerm_databricks_access_connector.adl_adb_access_connector) > 0 ? 12 | azurerm_databricks_access_connector.adl_adb_access_connector[0].identity : null 13 | ) 14 | description = "A list of identity blocks containing the system-assigned managed identities." 15 | } -------------------------------------------------------------------------------- /terraform/databricks/access-connector/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "databricks-workspace" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | } -------------------------------------------------------------------------------- /terraform/databricks/access-connector/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "ua_id" { 2 | value = module.access_connector_system_identity.id 3 | } 4 | 5 | output "ua_identity" { 6 | value = module.access_connector_system_identity.identity 7 | } 8 | 9 | output "sa_id" { 10 | value = module.access_connector_user_identity.id 11 | } 12 | 13 | output "sa_identity" { 14 | value = module.access_connector_user_identity.identity 15 | } 16 | -------------------------------------------------------------------------------- /terraform/databricks/access-connector/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "databricks.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | databricks = { 15 | source = "databricks/databricks" 16 | version = "= 1.10.1" 17 | } 18 | } 19 | } 20 | 21 | provider "azurerm" { 22 | features {} 23 | } -------------------------------------------------------------------------------- /terraform/databricks/access-connector/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/databricks/databricks-workspace/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | databricks = { 4 | source = "databricks/databricks" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/databricks/databricks-workspace/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "databricks-workspace" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_databricks = "privatelink.azuredatabricks.net" 9 | dns_dbfs_dfs = "privatelink.dfs.core.windows.net" 10 | dns_key_vault = "privatelink.vaultcore.azure.net" 11 | } -------------------------------------------------------------------------------- /terraform/databricks/databricks-workspace/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.databricks.id 3 | } 4 | 5 | output "workspace_url" { 6 | value = module.databricks.workspace_url 7 | } 8 | 9 | output "name" { 10 | value = module.databricks.name 11 | } 12 | 13 | output "resource_group_name" { 14 | value = module.databricks.resource_group_name 15 | } 16 | 17 | output "cmk_id" { 18 | value = azurerm_databricks_workspace_root_dbfs_customer_managed_key.adl_adb_ws_cmk.id 19 | } -------------------------------------------------------------------------------- /terraform/databricks/databricks-workspace/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "databricks.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | databricks = { 15 | source = "databricks/databricks" 16 | version = "= 1.38.0" 17 | } 18 | } 19 | } 20 | 21 | provider "azurerm" { 22 | features {} 23 | } -------------------------------------------------------------------------------- /terraform/databricks/databricks-workspace/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-domain/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_eventgrid_domain.adl_evgd) > 0 ? 4 | azurerm_eventgrid_domain.adl_evgd[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Event Grid domain." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_eventgrid_domain.adl_evgd) > 0 ? 12 | azurerm_eventgrid_domain.adl_evgd[0].name : "" 13 | ) 14 | description = "The name of the Event Grid domain." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_eventgrid_domain.adl_evgd) > 0 ? 20 | azurerm_eventgrid_domain.adl_evgd[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Event Grid domain exists." 23 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-domain/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "event-grid-domain" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_ev_domain = "privatelink.eventgrid.azure.net" 9 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-domain/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.event_grid_domain.id 3 | } 4 | 5 | output "name" { 6 | value = module.event_grid_domain.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.event_grid_domain.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-domain/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "eventgriddomain.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-domain/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-topic/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_eventgrid_topic.adl_evgt) > 0 ? 4 | azurerm_eventgrid_topic.adl_evgt[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Event Grid topic." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_eventgrid_topic.adl_evgt) > 0 ? 12 | azurerm_eventgrid_topic.adl_evgt[0].name : "" 13 | ) 14 | description = "The name of the Event Grid topic." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_eventgrid_topic.adl_evgt) > 0 ? 20 | azurerm_eventgrid_topic.adl_evgt[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Event Grid topic exists." 23 | } 24 | -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-topic/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "event-grid-topic" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_ev_topic = "privatelink.eventgrid.azure.net" 9 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-topic/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.event_grid_topic.id 3 | } 4 | 5 | output "name" { 6 | value = module.event_grid_topic.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.event_grid_topic.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-topic/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "eventgridtopic.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/event-grid/event-grid-topic/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs-namespace/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_eventhub_namespace.adl_evhns) > 0 ? 4 | azurerm_eventhub_namespace.adl_evhns[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Event Hub namespace." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_eventhub_namespace.adl_evhns) > 0 ? 12 | azurerm_eventhub_namespace.adl_evhns[0].name : "" 13 | ) 14 | description = "The name of the Event Hub namespace." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_eventhub_namespace.adl_evhns) > 0 ? 20 | azurerm_eventhub_namespace.adl_evhns[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Event Hub namespace exists." 23 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs-namespace/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "event-hubs-namespace" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_ev_namespace = "privatelink.servicebus.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs-namespace/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.event_hubs_namespace.id 3 | } 4 | 5 | output "name" { 6 | value = module.event_hubs_namespace.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.event_hubs_namespace.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs-namespace/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "eventhubsnamespace.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs-namespace/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs/test/event_hubs.tf: -------------------------------------------------------------------------------- 1 | module "event_hubs" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | namespace_name = module.event_hubs_namespace.name 6 | } 7 | 8 | # Module dependencies 9 | 10 | module "event_hubs_namespace" { 11 | source = "../../event-hubs-namespace" 12 | basename = random_string.postfix.result 13 | resource_group_name = module.local_rg.name 14 | location = var.location 15 | is_private_endpoint = false 16 | tags = {} 17 | } 18 | 19 | module "local_rg" { 20 | source = "../../../resource-group" 21 | basename = random_string.postfix.result 22 | location = var.location 23 | tags = local.tags 24 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "event-hubs" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_ev_namespace = "privatelink.servicebus.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.event_hubs.id 3 | } 4 | 5 | output "name" { 6 | value = module.event_hubs.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.event_hubs.resource_group_name 11 | } 12 | 13 | output "primary_connection_string" { 14 | value = module.event_hubs.primary_connection_string 15 | sensitive = true 16 | } 17 | 18 | output "secondary_connection_string" { 19 | value = module.event_hubs.secondary_connection_string 20 | sensitive = true 21 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "eventhubs.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/event-hubs/event-hubs/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/fabric/fabric-capacity/main.tf: -------------------------------------------------------------------------------- 1 | resource "azapi_resource" "fab_capacity" { 2 | type = "Microsoft.Fabric/capacities@2022-07-01-preview" 3 | name = "fab${var.basename}" 4 | parent_id = var.resource_group_id 5 | location = var.location 6 | schema_validation_enabled = false 7 | 8 | body = jsonencode({ 9 | properties = { 10 | administration = { 11 | members = [ 12 | var.admin_email 13 | ] 14 | } 15 | } 16 | sku = { 17 | name = var.sku, 18 | tier = "Fabric" 19 | } 20 | }) 21 | tags = var.tags 22 | 23 | count = var.module_enabled ? 1 : 0 24 | } -------------------------------------------------------------------------------- /terraform/fabric/fabric-capacity/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azapi_resource.fab_capacity) > 0 ? 4 | azapi_resource.fab_capacity[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Fabric Capacity." 7 | } -------------------------------------------------------------------------------- /terraform/fabric/fabric-capacity/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | azapi = { 4 | source = "Azure/azapi" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/fabric/fabric-capacity/test/fabric_capacity.tf: -------------------------------------------------------------------------------- 1 | module "fabric_capacity" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_id = module.local_rg.id 5 | location = var.location 6 | sku = var.sku 7 | admin_email = var.admin_email 8 | tags = {} 9 | } 10 | 11 | # Modules dependencies 12 | 13 | module "local_rg" { 14 | source = "../../../resource-group" 15 | basename = random_string.postfix.result 16 | location = var.location 17 | tags = local.tags 18 | } -------------------------------------------------------------------------------- /terraform/fabric/fabric-capacity/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "fabric-capacity" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/fabric/fabric-capacity/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.fabric_capacity.id 3 | } -------------------------------------------------------------------------------- /terraform/fabric/fabric-capacity/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | # backend "azurerm" { 3 | # resource_group_name = "rg-adl-terraform-state" 4 | # storage_account_name = "stadlterraformstate" 5 | # container_name = "default" 6 | # key = "fabriccapacity.terraform.tfstate" 7 | # } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.53.0" 13 | } 14 | azapi = { 15 | source = "azure/azapi" 16 | } 17 | } 18 | } 19 | 20 | provider "azurerm" { 21 | features {} 22 | } 23 | 24 | provider "azapi" { 25 | } -------------------------------------------------------------------------------- /terraform/fabric/fabric-capacity/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "sku" { 13 | type = string 14 | default = "F2" 15 | } 16 | 17 | variable "admin_email" { 18 | type = string 19 | default = "<>" 20 | } 21 | -------------------------------------------------------------------------------- /terraform/firewall/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_firewall.adl_afw) > 0 ? 4 | azurerm_firewall.adl_afw[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Azure Firewall." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_firewall.adl_afw) > 0 ? 12 | azurerm_firewall.adl_afw[0].name : "" 13 | ) 14 | description = "The name of the Azure Firewall." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_firewall.adl_afw) > 0 ? 20 | azurerm_firewall.adl_afw[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Azure Firewall exists." 23 | } -------------------------------------------------------------------------------- /terraform/firewall/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "firewall" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/firewall/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.firewall.id 3 | } 4 | 5 | output "name" { 6 | value = module.firewall.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.firewall.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/firewall/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "firewall.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/firewall/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/function-app/linux-function-app/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_linux_function_app.adl_func_linux) > 0 ? 4 | azurerm_linux_function_app.adl_func_linux[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Linux Function." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_linux_function_app.adl_func_linux) > 0 ? 12 | azurerm_linux_function_app.adl_func_linux[0].name : "" 13 | ) 14 | description = "The name of the Linux Function." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_linux_function_app.adl_func_linux) > 0 ? 20 | azurerm_linux_function_app.adl_func_linux[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Linux Function exists." 23 | } -------------------------------------------------------------------------------- /terraform/function-app/linux-function-app/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "linux-function-app" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/function-app/linux-function-app/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.linux_function_app.id 3 | } 4 | 5 | output "name" { 6 | value = module.linux_function_app.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.linux_function_app.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/function-app/linux-function-app/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "linuxfunctionapp.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/function-app/linux-function-app/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "sku_name" { 13 | type = string 14 | default = "standard" 15 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hadoop/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = azurerm_hdinsight_hadoop_cluster.adl_hdi_hadoop.id 3 | description = "Resource identifier of the instance of HDInsight Haddop." 4 | } 5 | 6 | output "name" { 7 | value = azurerm_hdinsight_hadoop_cluster.adl_hdi_hadoop.name 8 | description = "The name of the HDInsight Haddop." 9 | } 10 | 11 | output "resource_group_name" { 12 | value = azurerm_hdinsight_hadoop_cluster.adl_hdi_hadoop.resource_group_name 13 | description = "Resource Group where the HDInsight Haddop exists." 14 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hadoop/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "hdinsight-hadoop" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hadoop/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.hdinsight_hadoop.id 3 | } 4 | 5 | output "name" { 6 | value = module.hdinsight_hadoop.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.hdinsight_hadoop.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hadoop/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "hdinsighthadoop.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hadoop/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "Central US" 10 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hbase/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = azurerm_hdinsight_hbase_cluster.adl_hdi_hbase.id 3 | description = "Resource identifier of the instance of HDInsight HBase." 4 | } 5 | 6 | output "name" { 7 | value = azurerm_hdinsight_hbase_cluster.adl_hdi_hbase.name 8 | description = "The name of the HDInsight HBase." 9 | } 10 | 11 | output "resource_group_name" { 12 | value = azurerm_hdinsight_hbase_cluster.adl_hdi_hbase.resource_group_name 13 | description = "Resource Group where the HDInsight HBase exists." 14 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hbase/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "hdinsight-hbase" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hbase/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.hdinsight_hbase.id 3 | } 4 | 5 | output "name" { 6 | value = module.hdinsight_hbase.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.hdinsight_hbase.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-hbase/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "hdinsighthbase.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-interactive/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = azurerm_hdinsight_interactive_query_cluster.adl_hdi_interactive.id 3 | description = "Resource identifier of the instance of HDInsight Interactive." 4 | } 5 | 6 | output "name" { 7 | value = azurerm_hdinsight_interactive_query_cluster.adl_hdi_interactive.name 8 | description = "The name of the HDInsight Interactive." 9 | } 10 | 11 | output "resource_group_name" { 12 | value = azurerm_hdinsight_interactive_query_cluster.adl_hdi_interactive.resource_group_name 13 | description = "Resource Group where the HDInsight Interactive exists." 14 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-interactive/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "hdinsight-interactive" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-interactive/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.hdinsight_interactive.id 3 | } 4 | 5 | output "name" { 6 | value = module.hdinsight_interactive.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.hdinsight_interactive.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-interactive/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "hdinsightinteractive.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features { 19 | resource_group { 20 | prevent_deletion_if_contains_resources = false 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-kafka/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = azurerm_hdinsight_kafka_cluster.adl_hdi_kafka.id 3 | description = "Resource identifier of the instance of HDInsight Kafka." 4 | } 5 | 6 | output "name" { 7 | value = azurerm_hdinsight_kafka_cluster.adl_hdi_kafka.name 8 | description = "The name of the HDInsight Kafka." 9 | } 10 | 11 | output "resource_group_name" { 12 | value = azurerm_hdinsight_kafka_cluster.adl_hdi_kafka.resource_group_name 13 | description = "Resource Group where the HDInsight Kafka exists." 14 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-kafka/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "hdinsight-kafka" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-kafka/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.hdinsight_kafka.id 3 | } 4 | 5 | output "name" { 6 | value = module.hdinsight_kafka.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.hdinsight_kafka.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-kafka/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "hdinsightkafka.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-spark/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = azurerm_hdinsight_spark_cluster.adl_hdi_spark.id 3 | description = "Resource identifier of the instance of HDInsight Spark." 4 | } 5 | 6 | output "name" { 7 | value = azurerm_hdinsight_spark_cluster.adl_hdi_spark.name 8 | description = "The name of the HDInsight Spark." 9 | } 10 | 11 | output "resource_group_name" { 12 | value = azurerm_hdinsight_spark_cluster.adl_hdi_spark.resource_group_name 13 | description = "Resource Group where the HDInsight Spark exists." 14 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-spark/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "hdinsight-spark" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-spark/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.hdinsight_spark.id 3 | } 4 | 5 | output "name" { 6 | value = module.hdinsight_spark.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.hdinsight_spark.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/hdinsight/hdinsight-spark/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "hdinsightspark.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/key-vault/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_key_vault.adl_kv) > 0 ? 4 | azurerm_key_vault.adl_kv[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Azure Key Vault." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_key_vault.adl_kv) > 0 ? 12 | azurerm_key_vault.adl_kv[0].name : "" 13 | ) 14 | description = "The name of the Azure Key Vault." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_key_vault.adl_kv) > 0 ? 20 | azurerm_key_vault.adl_kv[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Azure Key Vault exists." 23 | } -------------------------------------------------------------------------------- /terraform/key-vault/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "key-vault" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_kv_vault = "privatelink.vaultcore.azure.net" 9 | } -------------------------------------------------------------------------------- /terraform/key-vault/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.key_vault.id 3 | } 4 | 5 | output "name" { 6 | value = module.key_vault.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.key_vault.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/key-vault/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "keyvault.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/key-vault/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "sku_name" { 13 | type = string 14 | default = "standard" 15 | } -------------------------------------------------------------------------------- /terraform/load-balancer/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_lb.adl_lb) > 0 ? 4 | azurerm_lb.adl_lb[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Azure Load Balancer." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_lb.adl_lb) > 0 ? 12 | azurerm_lb.adl_lb[0].name : "" 13 | ) 14 | description = "The name of the Azure Load Balancer." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_lb.adl_lb) > 0 ? 20 | azurerm_lb.adl_lb[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Azure Load Balancer exists." 23 | } -------------------------------------------------------------------------------- /terraform/load-balancer/test/load_balancer.tf: -------------------------------------------------------------------------------- 1 | module "load_balancer" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | 7 | tags = {} 8 | } 9 | 10 | # Modules dependencies 11 | 12 | module "local_rg" { 13 | source = "../../resource-group" 14 | basename = random_string.postfix.result 15 | location = var.location 16 | tags = local.tags 17 | } -------------------------------------------------------------------------------- /terraform/load-balancer/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "load-balancer" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/load-balancer/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.load_balancer.id 3 | } 4 | 5 | output "name" { 6 | value = module.load_balancer.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.load_balancer.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/load-balancer/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "loadbalancer.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/load-balancer/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-cluster/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/log_analytics_cluster 2 | 3 | resource "azurerm_log_analytics_cluster" "adl_logc" { 4 | name = "logc-${var.basename}" 5 | resource_group_name = var.resource_group_name 6 | location = var.location 7 | size_gb = var.size_gb 8 | identity { 9 | type = "SystemAssigned" 10 | } 11 | tags = var.tags 12 | 13 | count = var.module_enabled ? 1 : 0 14 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-cluster/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_log_analytics_cluster.adl_logc) > 0 ? 4 | azurerm_log_analytics_cluster.adl_logc[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Log Analytics cluster." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_log_analytics_cluster.adl_logc) > 0 ? 12 | azurerm_log_analytics_cluster.adl_logc[0].name : "" 13 | ) 14 | description = "The name of the Log Analytics cluster." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_log_analytics_cluster.adl_logc) > 0 ? 20 | azurerm_log_analytics_cluster.adl_logc[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Log Analytics cluster exists." 23 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-cluster/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "log-analytics-cluster" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-cluster/test/log_analytics_cluster.tf: -------------------------------------------------------------------------------- 1 | module "log_analytics_cluster" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-cluster/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.log_analytics_cluster.id 3 | } 4 | 5 | output "name" { 6 | value = module.log_analytics_cluster.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.log_analytics_cluster.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-cluster/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "loganalyticscluster.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-cluster/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West Europe" 10 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-workspace/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/log_analytics_workspace 2 | 3 | resource "azurerm_log_analytics_workspace" "adl_log" { 4 | name = "log-${var.basename}" 5 | location = var.location 6 | resource_group_name = var.resource_group_name 7 | sku = var.sku 8 | retention_in_days = var.retention_in_days 9 | daily_quota_gb = var.daily_quota_gb 10 | internet_ingestion_enabled = var.internet_ingestion_enabled 11 | internet_query_enabled = var.internet_query_enabled 12 | tags = var.tags 13 | 14 | count = var.module_enabled ? 1 : 0 15 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-workspace/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "log-analytics-workspace" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-workspace/test/log_analytics_workspace.tf: -------------------------------------------------------------------------------- 1 | module "log_analytics_workspace" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-workspace/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.log_analytics_workspace.id 3 | } 4 | 5 | output "name" { 6 | value = module.log_analytics_workspace.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.log_analytics_workspace.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-workspace/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "loganalyticsworkspace.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/log-analytics/log-analytics-workspace/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-cluster/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_machine_learning_compute_cluster.adl_mlw_compute_cluster) > 0 ? 4 | azurerm_machine_learning_compute_cluster.adl_mlw_compute_cluster[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Machine Learning Compute Cluster." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_machine_learning_compute_cluster.adl_mlw_compute_cluster) > 0 ? 12 | azurerm_machine_learning_compute_cluster.adl_mlw_compute_cluster[0].name : "" 13 | ) 14 | description = "The name of the Machine Learning Compute Cluster." 15 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-cluster/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "machine-learning-compute-cluster" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-cluster/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.machine_learning_compute_cluster.id 3 | } 4 | 5 | output "name" { 6 | value = module.machine_learning_compute_cluster.name 7 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-cluster/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "resource_group_name" { 13 | type = string 14 | validation { 15 | condition = can(regex("^[-\\w\\.\\(\\)]{1,90}$", var.resource_group_name)) && can(regex("[-\\w\\(\\)]+$", var.resource_group_name)) 16 | error_message = "Resource group names must be between 1 and 90 characters and can only include alphanumeric, underscore, parentheses, hyphen, period (except at end)." 17 | } 18 | default = "rg-adl-modules-test-01" 19 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-instance/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/machine_learning_compute_instance 2 | 3 | resource "azurerm_machine_learning_compute_instance" "adl_mlw_compute_instance" { 4 | name = "mlwci${var.basename}" 5 | location = var.location 6 | machine_learning_workspace_id = var.machine_learning_workspace_id 7 | virtual_machine_size = var.virtual_machine_size 8 | authorization_type = var.authorization_type 9 | subnet_resource_id = var.subnet_id 10 | 11 | count = var.module_enabled ? 1 : 0 12 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-instance/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_machine_learning_compute_instance.adl_mlw_compute_instance) > 0 ? 4 | azurerm_machine_learning_compute_instance.adl_mlw_compute_instance[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Machine Learning Compute Instance." 7 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-instance/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "machine-learning-compute-instance" 5 | Toolkit = "Terraform" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-instance/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.machine_learning_compute_instance.id 3 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-compute-instance/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "resource_group_name" { 13 | type = string 14 | validation { 15 | condition = can(regex("^[-\\w\\.\\(\\)]{1,90}$", var.resource_group_name)) && can(regex("[-\\w\\(\\)]+$", var.resource_group_name)) 16 | error_message = "Resource group names must be between 1 and 90 characters and can only include alphanumeric, underscore, parentheses, hyphen, period (except at end)." 17 | } 18 | default = "rg-adl-modules-test-01" 19 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-inference-cluster/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/machine_learning_inference_cluster 2 | 3 | resource "azurerm_machine_learning_inference_cluster" "adl_mlw_inference_cluster" { 4 | name = "mlwic${var.basename}" 5 | location = var.location 6 | cluster_purpose = var.cluster_purpose 7 | kubernetes_cluster_id = var.kubernetes_cluster_id 8 | machine_learning_workspace_id = var.machine_learning_workspace_id 9 | tags = var.tags 10 | 11 | count = var.module_enabled ? 1 : 0 12 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-inference-cluster/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_machine_learning_inference_cluster.adl_mlw_inference_cluster) > 0 ? 4 | azurerm_machine_learning_inference_cluster.adl_mlw_inference_cluster[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Machine Learning Inference Cluster." 7 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-inference-cluster/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "machine-learning-inference-cluster" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-inference-cluster/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.machine_learning_inference_cluster.id 3 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-inference-cluster/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "resource_group_name" { 13 | type = string 14 | validation { 15 | condition = can(regex("^[-\\w\\.\\(\\)]{1,90}$", var.resource_group_name)) && can(regex("[-\\w\\(\\)]+$", var.resource_group_name)) 16 | error_message = "Resource group names must be between 1 and 90 characters and can only include alphanumeric, underscore, parentheses, hyphen, period (except at end)." 17 | } 18 | default = "rg-adl-modules-test-01" 19 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-synapse-spark/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/machine_learning_synapse_spark 2 | 3 | resource "azurerm_machine_learning_synapse_spark" "adl_mlw_synapse_spark" { 4 | name = "mlwss${var.basename}" 5 | machine_learning_workspace_id = var.machine_learning_workspace_id 6 | location = var.location 7 | synapse_spark_pool_id = var.synapse_spark_pool_id 8 | identity { 9 | type = "SystemAssigned" 10 | } 11 | 12 | count = var.module_enabled ? 1 : 0 13 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-synapse-spark/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_machine_learning_synapse_spark.adl_mlw_synapse_spark) > 0 ? 4 | azurerm_machine_learning_synapse_spark.adl_mlw_synapse_spark[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Machine Learning Synapse Spark Pool." 7 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-synapse-spark/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "machine-learning-synapse-spark" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-synapse-spark/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.machine_learning_synapse_spark.id 3 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-synapse-spark/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "synadmin_username" { 13 | type = string 14 | default = "sqladminuser" 15 | } 16 | 17 | variable "synadmin_password" { 18 | type = string 19 | default = "ThisIsNotVerySecure!" 20 | sensitive = true 21 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-workspace/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "machine-learning-workspace" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_mlw_api = "privatelink.api.azureml.ms" 9 | 10 | dns_mlw_notebooks = "privatelink.notebooks.azure.net" 11 | } -------------------------------------------------------------------------------- /terraform/machine-learning/machine-learning-workspace/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.machine_learning_workspace.id 3 | } 4 | 5 | output "name" { 6 | value = module.machine_learning_workspace.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.machine_learning_workspace.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/mysql-database/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "mysql-database" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_mysql_server = "privatelink.mysql.database.azure.com" 9 | } -------------------------------------------------------------------------------- /terraform/mysql-database/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.mysql_database.id 3 | } 4 | 5 | output "database_name" { 6 | value = module.mysql_database.database_name 7 | } 8 | 9 | output "server_name" { 10 | value = module.mysql_database.server_name 11 | } 12 | 13 | output "resource_group_name" { 14 | value = module.mysql_database.resource_group_name 15 | } -------------------------------------------------------------------------------- /terraform/mysql-database/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "mysqldatabase.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/mysql-database/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/network-security-group/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/network_security_group 2 | 3 | resource "azurerm_network_security_group" "adl_nsg" { 4 | name = "nsg-${var.basename}" 5 | location = var.location 6 | resource_group_name = var.resource_group_name 7 | tags = var.tags 8 | 9 | count = var.module_enabled ? 1 : 0 10 | } -------------------------------------------------------------------------------- /terraform/network-security-group/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_network_security_group.adl_nsg) > 0 ? 4 | azurerm_network_security_group.adl_nsg[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Network Security Group." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_network_security_group.adl_nsg) > 0 ? 12 | azurerm_network_security_group.adl_nsg[0].name : "" 13 | ) 14 | description = "The name of the Network Security Group." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_network_security_group.adl_nsg) > 0 ? 20 | azurerm_network_security_group.adl_nsg[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Network Security Group exists." 23 | } -------------------------------------------------------------------------------- /terraform/network-security-group/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "network-security-group" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/network-security-group/test/network_security_group.tf: -------------------------------------------------------------------------------- 1 | module "network_security_group" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/network-security-group/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.network_security_group.id 3 | } 4 | 5 | output "name" { 6 | value = module.network_security_group.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.network_security_group.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/network-security-group/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "networksecuritygroup.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/network-security-group/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/network-security-rule/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_network_security_rule.adl_nsgsr) > 0 ? 4 | azurerm_network_security_rule.adl_nsgsr[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Network Security rule." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_network_security_rule.adl_nsgsr) > 0 ? 12 | azurerm_network_security_rule.adl_nsgsr[0].name : "" 13 | ) 14 | description = "The name of the Network Security rule." 15 | } -------------------------------------------------------------------------------- /terraform/network-security-rule/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "network-security-rule" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/network-security-rule/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.network_security_rule.id 3 | } 4 | 5 | output "name" { 6 | value = module.network_security_rule.name 7 | } -------------------------------------------------------------------------------- /terraform/network-security-rule/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "networksecurityrule.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/network-security-rule/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/postgresql-database/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "postgresql-database" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_psql_server = "privatelink.postgres.database.azure.com" 9 | } -------------------------------------------------------------------------------- /terraform/postgresql-database/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.postgresql_database.id 3 | } 4 | 5 | output "database_name" { 6 | value = module.postgresql_database.database_name 7 | } 8 | 9 | output "server_name" { 10 | value = module.postgresql_database.server_name 11 | } 12 | 13 | output "resource_group_name" { 14 | value = module.postgresql_database.resource_group_name 15 | } -------------------------------------------------------------------------------- /terraform/postgresql-database/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "postgresqldatabase.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features { 19 | resource_group { 20 | prevent_deletion_if_contains_resources = false 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /terraform/postgresql-database/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/powerbi-embedded/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/powerbi_embedded 2 | 3 | resource "azurerm_powerbi_embedded" "adl_pbi" { 4 | name = "pbi${var.basename}" 5 | location = var.location 6 | resource_group_name = var.resource_group_name 7 | sku_name = var.sku_name 8 | administrators = var.administrators 9 | mode = var.mode 10 | tags = var.tags 11 | 12 | count = var.module_enabled ? 1 : 0 13 | } -------------------------------------------------------------------------------- /terraform/powerbi-embedded/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_powerbi_embedded.adl_pbi) > 0 ? 4 | azurerm_powerbi_embedded.adl_pbi[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Power BI Embedded." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_powerbi_embedded.adl_pbi) > 0 ? 12 | azurerm_powerbi_embedded.adl_pbi[0].name : "" 13 | ) 14 | description = "The name of the Power BI Embedded." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_powerbi_embedded.adl_pbi) > 0 ? 20 | azurerm_powerbi_embedded.adl_pbi[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Power BI Embedded exists." 23 | } -------------------------------------------------------------------------------- /terraform/powerbi-embedded/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "powerbi-embedded" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/powerbi-embedded/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.powerbi_embedded.id 3 | } 4 | 5 | output "name" { 6 | value = module.powerbi_embedded.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.powerbi_embedded.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/powerbi-embedded/test/powerbi_embedded.tf: -------------------------------------------------------------------------------- 1 | module "powerbi_embedded" { 2 | source = "../" 3 | 4 | basename = random_string.postfix.result 5 | resource_group_name = module.local_rg.name 6 | location = var.location 7 | 8 | administrators = ["<>"] 9 | 10 | tags = {} 11 | } 12 | 13 | # Modules dependencies 14 | 15 | module "local_rg" { 16 | source = "../../resource-group" 17 | 18 | basename = random_string.postfix.result 19 | location = var.location 20 | 21 | tags = local.tags 22 | } 23 | -------------------------------------------------------------------------------- /terraform/powerbi-embedded/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "powerbiembedded.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/powerbi-embedded/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/private-dns-zone/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_dns_zone 2 | 3 | resource "azurerm_private_dns_zone" "adl_pdnsz" { 4 | for_each = var.dns_zones 5 | name = each.value 6 | resource_group_name = var.resource_group_name 7 | tags = var.tags 8 | } 9 | 10 | resource "azurerm_private_dns_zone_virtual_network_link" "vnet-link-ex" { 11 | for_each = azurerm_private_dns_zone.adl_pdnsz 12 | name = "${each.value.name}-vnetlink" 13 | resource_group_name = var.resource_group_name 14 | private_dns_zone_name = each.value.name 15 | virtual_network_id = var.vnet_id 16 | depends_on = [ 17 | azurerm_private_dns_zone.adl_pdnsz 18 | ] 19 | } -------------------------------------------------------------------------------- /terraform/private-dns-zone/outputs.tf: -------------------------------------------------------------------------------- 1 | output "list" { 2 | value = azurerm_private_dns_zone.adl_pdnsz 3 | description = "All attributes of the instance of Private DNS Zone." 4 | } -------------------------------------------------------------------------------- /terraform/private-dns-zone/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "private-dns-zone" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/private-dns-zone/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "list" { 2 | value = module.private_dns_zones 3 | } -------------------------------------------------------------------------------- /terraform/private-dns-zone/test/private_dns_zone.tf: -------------------------------------------------------------------------------- 1 | module "private_dns_zones" { 2 | source = "../" 3 | resource_group_name = module.local_rg.name 4 | dns_zones = var.dns_zones 5 | vnet_id = module.local_vnet.id 6 | tags = {} 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } 17 | 18 | module "local_vnet" { 19 | source = "../../virtual-network" 20 | resource_group_name = module.local_rg.name 21 | basename = random_string.postfix.result 22 | location = var.location 23 | address_space = ["10.0.0.0/16"] 24 | } -------------------------------------------------------------------------------- /terraform/private-dns-zone/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "privatednszone.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/private-dns-zone/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "dns_zones" { 13 | type = set(string) 14 | description = "List of Private DNS Zones utilized by Azure Private Link resources." 15 | default = [ 16 | "privatelink.queue.core.windows.net" 17 | ] 18 | } -------------------------------------------------------------------------------- /terraform/private-endpoint/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_private_endpoint.adl_pe) > 0 ? 4 | azurerm_private_endpoint.adl_pe[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Private Endpoint." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_private_endpoint.adl_pe) > 0 ? 12 | azurerm_private_endpoint.adl_pe[0].name : "" 13 | ) 14 | description = "The name of the Private Endpoint." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_private_endpoint.adl_pe) > 0 ? 20 | azurerm_private_endpoint.adl_pe[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Private Endpoint." 23 | } -------------------------------------------------------------------------------- /terraform/private-endpoint/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "private-endpoint" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_kv_vault = "privatelink.vaultcore.azure.net" 9 | } -------------------------------------------------------------------------------- /terraform/private-endpoint/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.private_endpoint.id 3 | } 4 | 5 | output "name" { 6 | value = module.private_endpoint.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.private_endpoint.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/private-endpoint/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "privateendpoint.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } 20 | -------------------------------------------------------------------------------- /terraform/private-endpoint/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/purview/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_purview_account.adl_pview) > 0 ? 4 | azurerm_purview_account.adl_pview[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Purview." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_purview_account.adl_pview) > 0 ? 12 | azurerm_purview_account.adl_pview[0].name : "" 13 | ) 14 | description = "The name of the Purview." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_purview_account.adl_pview) > 0 ? 20 | azurerm_purview_account.adl_pview[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Purview exists." 23 | } -------------------------------------------------------------------------------- /terraform/purview/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "purview" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_pview_portal = "privatelink.purview.azure.com" 9 | 10 | dns_pview_account = "privatelink.purviewstudio.azure.com" 11 | } -------------------------------------------------------------------------------- /terraform/purview/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.purview.id 3 | } 4 | 5 | output "name" { 6 | value = module.purview.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.purview.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/purview/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "purview.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/purview/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "West Europe" 10 | } -------------------------------------------------------------------------------- /terraform/redis-cache/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_redis_cache.adl_redis) > 0 ? 4 | azurerm_redis_cache.adl_redis[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Redis Cache." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_redis_cache.adl_redis) > 0 ? 12 | azurerm_redis_cache.adl_redis[0].name : "" 13 | ) 14 | description = "The name of the Redis Cache." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_redis_cache.adl_redis) > 0 ? 20 | azurerm_redis_cache.adl_redis[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Redis Cache exists." 23 | } -------------------------------------------------------------------------------- /terraform/redis-cache/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "redis-cache" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_redis = "privatelink.redis.cache.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/redis-cache/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.redis_cache.id 3 | } 4 | 5 | output "name" { 6 | value = module.redis_cache.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.redis_cache.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/redis-cache/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "rediscache.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/redis-cache/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/redis-enterprise/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | sku_name = "${var.sku_name}-${var.capacity}" 3 | } -------------------------------------------------------------------------------- /terraform/redis-enterprise/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "redis-enterprise" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_redis = "privatelink.redisenterprise.cache.azure.net" 9 | } -------------------------------------------------------------------------------- /terraform/redis-enterprise/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.redis_enterprise.id 3 | } 4 | 5 | output "name" { 6 | value = module.redis_enterprise.name 7 | } 8 | 9 | output "hostname" { 10 | value = module.redis_enterprise.hostname 11 | } 12 | 13 | output "resource_group_name" { 14 | value = module.redis_enterprise.resource_group_name 15 | } 16 | 17 | output "port" { 18 | value = module.redis_enterprise.port 19 | } 20 | 21 | output "primary_access_key" { 22 | value = module.redis_enterprise.primary_access_key 23 | sensitive = true 24 | } -------------------------------------------------------------------------------- /terraform/redis-enterprise/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/resource-group/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/resource_group 2 | 3 | resource "azurerm_resource_group" "adl_rg" { 4 | name = "rg-${var.basename}" 5 | location = var.location 6 | tags = var.tags 7 | 8 | count = var.module_enabled ? 1 : 0 9 | } -------------------------------------------------------------------------------- /terraform/resource-group/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_resource_group.adl_rg) > 0 ? 4 | azurerm_resource_group.adl_rg[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Resource Group." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_resource_group.adl_rg) > 0 ? 12 | azurerm_resource_group.adl_rg[0].name : "" 13 | ) 14 | description = "The name of the Resource Group." 15 | } 16 | 17 | output "location" { 18 | value = ( 19 | length(azurerm_resource_group.adl_rg) > 0 ? 20 | azurerm_resource_group.adl_rg[0].location : "" 21 | ) 22 | description = "Location assigned to the Resource Group." 23 | } -------------------------------------------------------------------------------- /terraform/resource-group/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "resource-group" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/resource-group/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.resource_group.id 3 | } 4 | 5 | output "name" { 6 | value = module.resource_group.name 7 | } 8 | 9 | output "location" { 10 | value = module.resource_group.location 11 | } -------------------------------------------------------------------------------- /terraform/resource-group/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "resourcegroup.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/resource-group/test/resource_group.tf: -------------------------------------------------------------------------------- 1 | module "resource_group" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | location = var.location 5 | tags = local.tags 6 | } -------------------------------------------------------------------------------- /terraform/resource-group/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/route-table/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/route_table 2 | 3 | resource "azurerm_route_table" "adl_rt" { 4 | name = "rt-${var.basename}" 5 | location = var.location 6 | resource_group_name = var.resource_group_name 7 | tags = var.tags 8 | 9 | count = var.module_enabled ? 1 : 0 10 | } -------------------------------------------------------------------------------- /terraform/route-table/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_route_table.adl_rt) > 0 ? 4 | azurerm_route_table.adl_rt[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of network route table." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_route_table.adl_rt) > 0 ? 12 | azurerm_route_table.adl_rt[0].name : "" 13 | ) 14 | description = "The name of the network route table." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_route_table.adl_rt) > 0 ? 20 | azurerm_route_table.adl_rt[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the network route table exists." 23 | } -------------------------------------------------------------------------------- /terraform/route-table/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "route-table" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/route-table/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.route_table.id 3 | } 4 | 5 | output "name" { 6 | value = module.route_table.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.route_table.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/route-table/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "routetable.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/route-table/test/route_table.tf: -------------------------------------------------------------------------------- 1 | module "route_table" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/route-table/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/route/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/route 2 | 3 | resource "azurerm_route" "adl_r" { 4 | name = var.name 5 | resource_group_name = var.resource_group_name 6 | route_table_name = var.route_table_name 7 | address_prefix = var.address_prefix 8 | next_hop_type = var.next_hop_type 9 | 10 | count = var.module_enabled ? 1 : 0 11 | } -------------------------------------------------------------------------------- /terraform/route/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_route.adl_r) > 0 ? 4 | azurerm_route.adl_r[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of network route." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_route.adl_r) > 0 ? 12 | azurerm_route.adl_r[0].name : "" 13 | ) 14 | description = "The name of the network route." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_route.adl_r) > 0 ? 20 | azurerm_route.adl_r[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the network route exists." 23 | } -------------------------------------------------------------------------------- /terraform/route/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "route" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/route/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.route.id 3 | } 4 | 5 | output "name" { 6 | value = module.route.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.route.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/route/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "route.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/route/test/route.tf: -------------------------------------------------------------------------------- 1 | module "route" { 2 | source = "../" 3 | resource_group_name = module.local_rg.name 4 | name = "TestRoute" 5 | route_table_name = module.local_route_table.name 6 | address_prefix = "0.0.0.0/0" 7 | next_hop_type = "Internet" 8 | } 9 | 10 | # Modules dependencies 11 | 12 | module "local_rg" { 13 | source = "../../resource-group" 14 | basename = random_string.postfix.result 15 | location = var.location 16 | tags = local.tags 17 | } 18 | 19 | module "local_route_table" { 20 | source = "../../route-table" 21 | resource_group_name = module.local_rg.name 22 | basename = random_string.postfix.result 23 | location = var.location 24 | } 25 | -------------------------------------------------------------------------------- /terraform/route/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-namespace/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "service-bus-namespace" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_sb_namespace = "privatelink.servicebus.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-namespace/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.service_bus_namespace.id 3 | } 4 | 5 | output "name" { 6 | value = module.service_bus_namespace.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.service_bus_namespace.resource_group_name 11 | } 12 | 13 | output "primary_connection_string" { 14 | value = module.service_bus_namespace.primary_connection_string 15 | sensitive = true 16 | } 17 | 18 | output "secondary_connection_string" { 19 | value = module.service_bus_namespace.secondary_connection_string 20 | sensitive = true 21 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-namespace/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "servicebusnamespace.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-namespace/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-queue/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/servicebus_queue 2 | 3 | resource "azurerm_servicebus_queue" "adl_sbq" { 4 | name = "sbq-${var.basename}" 5 | namespace_id = var.namespace_id 6 | enable_partitioning = var.enable_partitioning 7 | 8 | count = var.module_enabled ? 1 : 0 9 | } 10 | 11 | resource "azurerm_servicebus_queue_authorization_rule" "adl_sbq_auth_rule" { 12 | name = "sbq-auth-rule" 13 | queue_id = azurerm_servicebus_queue.adl_sbq[0].id 14 | listen = var.listen 15 | send = var.send 16 | manage = var.manage 17 | 18 | count = var.module_enabled ? 1 : 0 19 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-queue/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-data-labs-modules/2ceadc87c8211ddbc80c5071e0938b60071a615f/terraform/service-bus/service-bus-queue/outputs.tf -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-queue/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "service-bus-queue" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-queue/test/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-data-labs-modules/2ceadc87c8211ddbc80c5071e0938b60071a615f/terraform/service-bus/service-bus-queue/test/outputs.tf -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-queue/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "servicebusqueue.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-queue/test/service_bus_queue.tf: -------------------------------------------------------------------------------- 1 | module "service_bus_queue" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | namespace_id = module.local_service_bus_namespace.id 5 | } 6 | 7 | # Module dependencies 8 | 9 | module "local_service_bus_namespace" { 10 | source = "../../service-bus-namespace/test" 11 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-queue/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-subscription/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/servicebus_subscription 2 | 3 | resource "azurerm_servicebus_subscription" "adt_sbs" { 4 | name = "sbs-${var.basename}" 5 | topic_id = var.topic_id 6 | max_delivery_count = var.max_delivery_count 7 | 8 | count = var.module_enabled ? 1 : 0 9 | } 10 | 11 | resource "azurerm_servicebus_subscription_rule" "adl_sbs_auth_rule" { 12 | name = "sbs-auth-rule" 13 | subscription_id = azurerm_servicebus_subscription.adt_sbs[0].id 14 | filter_type = var.filter_type 15 | sql_filter = var.sql_filter 16 | 17 | count = var.module_enabled ? 1 : 0 18 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-subscription/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-data-labs-modules/2ceadc87c8211ddbc80c5071e0938b60071a615f/terraform/service-bus/service-bus-subscription/outputs.tf -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-subscription/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "service-bus-subscription" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-subscription/test/outputs.tf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Azure/azure-data-labs-modules/2ceadc87c8211ddbc80c5071e0938b60071a615f/terraform/service-bus/service-bus-subscription/test/outputs.tf -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-subscription/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "servicebussubscription.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-subscription/test/service_bus_subscription.tf: -------------------------------------------------------------------------------- 1 | module "service_bus_subscription" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | topic_id = module.local_service_bus_topic.id 5 | } 6 | 7 | # Module dependencies 8 | 9 | module "local_service_bus_topic" { 10 | source = "../../service-bus-topic/test" 11 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-subscription/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-topic/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/servicebus_topic 2 | 3 | resource "azurerm_servicebus_topic" "adl_sbt" { 4 | name = "sbt-${var.basename}" 5 | namespace_id = var.namespace_id 6 | 7 | count = var.module_enabled ? 1 : 0 8 | } 9 | 10 | resource "azurerm_servicebus_topic_authorization_rule" "adl_sbt_auth_rule" { 11 | name = "sbt-auth-rule" 12 | topic_id = azurerm_servicebus_topic.adl_sbt[0].id 13 | listen = var.listen 14 | send = var.send 15 | manage = var.manage 16 | 17 | count = var.module_enabled ? 1 : 0 18 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-topic/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_servicebus_topic.adl_sbt) > 0 ? 4 | azurerm_servicebus_topic.adl_sbt[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Service Bus topic." 7 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-topic/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "service-bus-topic" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-topic/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.service_bus_topic.id 3 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-topic/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "servicebustopic.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-topic/test/service_bus_topic.tf: -------------------------------------------------------------------------------- 1 | module "service_bus_topic" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | namespace_id = module.local_service_bus_namespace.id 5 | } 6 | 7 | # Module dependencies 8 | 9 | module "local_service_bus_namespace" { 10 | source = "../../service-bus-namespace/test" 11 | } -------------------------------------------------------------------------------- /terraform/service-bus/service-bus-topic/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } -------------------------------------------------------------------------------- /terraform/service-plan/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_service_plan.adl_sp) > 0 ? 4 | azurerm_service_plan.adl_sp[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Service Plan." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_service_plan.adl_sp) > 0 ? 12 | azurerm_service_plan.adl_sp[0].name : "" 13 | ) 14 | description = "The name of the Service Plan." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_service_plan.adl_sp) > 0 ? 20 | azurerm_service_plan.adl_sp[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Service Plan exists." 23 | } -------------------------------------------------------------------------------- /terraform/service-plan/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "service-plan" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/service-plan/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.service_plan.id 3 | } 4 | 5 | output "name" { 6 | value = module.service_plan.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.service_plan.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/service-plan/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "serviceplan.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/service-plan/test/service_plan.tf: -------------------------------------------------------------------------------- 1 | module "service_plan" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | 7 | tags = {} 8 | } 9 | 10 | # Modules dependencies 11 | 12 | module "local_rg" { 13 | source = "../../resource-group" 14 | basename = random_string.postfix.result 15 | location = var.location 16 | 17 | tags = local.tags 18 | } -------------------------------------------------------------------------------- /terraform/service-plan/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/sql-database-server/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "sql-server-database" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_sql_server = "privatelink.database.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/sql-database-server/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.sql_database_server.id 3 | } 4 | 5 | output "name" { 6 | value = module.sql_database_server.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.sql_database_server.resource_group_name 11 | } 12 | 13 | output "fully_qualified_domain_name" { 14 | value = module.sql_database_server.fully_qualified_domain_name 15 | } -------------------------------------------------------------------------------- /terraform/sql-database-server/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "sqldatabaseserver.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/sql-database/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/sql_database 2 | 3 | resource "azurerm_mssql_database" "adl_sqldb" { 4 | name = "sqldb${var.basename}" 5 | server_id = var.server_id 6 | collation = var.collation 7 | tags = var.tags 8 | 9 | count = var.module_enabled ? 1 : 0 10 | } -------------------------------------------------------------------------------- /terraform/sql-database/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_mssql_database.adl_sqldb) > 0 ? 4 | azurerm_mssql_database.adl_sqldb[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of SQL Database." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_mssql_database.adl_sqldb) > 0 ? 12 | azurerm_mssql_database.adl_sqldb[0].name : "" 13 | ) 14 | description = "The name of the SQL Database." 15 | } 16 | 17 | output "server_id" { 18 | value = ( 19 | length(azurerm_mssql_database.adl_sqldb) > 0 ? 20 | azurerm_mssql_database.adl_sqldb[0].server_id : "" 21 | ) 22 | description = "Resource Group where the SQL Database exists." 23 | } -------------------------------------------------------------------------------- /terraform/sql-database/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "sql-database" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_sql_server = "privatelink.database.windows.net" 9 | } -------------------------------------------------------------------------------- /terraform/sql-database/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.sql_database.id 3 | } 4 | 5 | output "name" { 6 | value = module.sql_database.name 7 | } 8 | 9 | output "server_id" { 10 | value = module.sql_database.server_id 11 | } -------------------------------------------------------------------------------- /terraform/sql-database/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "sqldatabase.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/sql-database/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "server_name" { 13 | type = string 14 | default = "" 15 | } -------------------------------------------------------------------------------- /terraform/sql-database/variables.tf: -------------------------------------------------------------------------------- 1 | variable "basename" { 2 | type = string 3 | description = "Basename of the module." 4 | } 5 | 6 | variable "tags" { 7 | type = map(string) 8 | default = {} 9 | description = "A mapping of tags which should be assigned to the deployed resource." 10 | } 11 | 12 | variable "module_enabled" { 13 | type = bool 14 | description = "Variable to enable or disable the module." 15 | default = true 16 | } 17 | 18 | variable "server_id" { 19 | type = string 20 | description = "The id of the SQL Server on which to create the database." 21 | } 22 | 23 | variable "collation" { 24 | type = string 25 | description = "The name of the collation." 26 | default = "SQL_Latin1_General_CP1_CI_AS" 27 | } -------------------------------------------------------------------------------- /terraform/sql-managed-instance/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_mssql_managed_instance.adl_sqlmi) > 0 ? 4 | azurerm_mssql_managed_instance.adl_sqlmi[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of SQL Managed Instance." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_mssql_managed_instance.adl_sqlmi) > 0 ? 12 | azurerm_mssql_managed_instance.adl_sqlmi[0].name : "" 13 | ) 14 | description = "The name of the SQL Managed Instance." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_mssql_managed_instance.adl_sqlmi) > 0 ? 20 | azurerm_mssql_managed_instance.adl_sqlmi[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the SQL Managed Instance exists." 23 | } -------------------------------------------------------------------------------- /terraform/sql-managed-instance/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "sql-managed-instance" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_sql_server = "azuredatalabs.database.windows.net" 9 | } 10 | -------------------------------------------------------------------------------- /terraform/sql-managed-instance/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.sql_managed_instance.id 3 | } 4 | 5 | output "name" { 6 | value = module.sql_managed_instance.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.sql_managed_instance.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/sql-managed-instance/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "sqlmi.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features { 19 | resource_group { 20 | prevent_deletion_if_contains_resources = false 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /terraform/storage-account/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "storage-account" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_st_blob = "privatelink.blob.core.windows.net" 9 | 10 | dns_st_file = "privatelink.file.core.windows.net" 11 | 12 | dns_st_dfs = "privatelink.dfs.core.windows.net" 13 | } -------------------------------------------------------------------------------- /terraform/storage-account/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.storage_account.id 3 | } 4 | 5 | output "name" { 6 | value = module.storage_account.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.storage_account.resource_group_name 11 | } 12 | 13 | output "adls_id" { 14 | value = module.storage_account.adls_id 15 | } 16 | 17 | output "access_key" { 18 | value = module.storage_account.access_key 19 | sensitive = true 20 | } -------------------------------------------------------------------------------- /terraform/storage-account/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "storageaccount.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/stream-analytics/stream-analytics-job/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_stream_analytics_job.adl_asa) > 0 ? 4 | azurerm_stream_analytics_job.adl_asa[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Stream Analytics job." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_stream_analytics_job.adl_asa) > 0 ? 12 | azurerm_stream_analytics_job.adl_asa[0].name : "" 13 | ) 14 | description = "The name of the Stream Analytics job." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_stream_analytics_job.adl_asa) > 0 ? 20 | azurerm_stream_analytics_job.adl_asa[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Stream Analytics job exists." 23 | } -------------------------------------------------------------------------------- /terraform/stream-analytics/stream-analytics-job/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "stream-analytics-job" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/stream-analytics/stream-analytics-job/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.stream_analytics_job.id 3 | } 4 | 5 | output "name" { 6 | value = module.stream_analytics_job.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.stream_analytics_job.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/stream-analytics/stream-analytics-job/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "streamanalyticsjob.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/stream-analytics/stream-analytics-job/test/stream_analytics_job.tf: -------------------------------------------------------------------------------- 1 | module "stream_analytics_job" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/stream-analytics/stream-analytics-job/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/subnet-network-security-group-association/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet_network_security_group_association 2 | 3 | resource "azurerm_subnet_network_security_group_association" "adl_snet_nsg_association" { 4 | subnet_id = var.subnet_id 5 | network_security_group_id = var.network_security_group_id 6 | 7 | count = var.module_enabled ? 1 : 0 8 | } -------------------------------------------------------------------------------- /terraform/subnet-network-security-group-association/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_subnet_network_security_group_association.adl_snet_nsg_association) > 0 ? 4 | azurerm_subnet_network_security_group_association.adl_snet_nsg_association[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Subnet to Network Security Group association." 7 | } -------------------------------------------------------------------------------- /terraform/subnet-network-security-group-association/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "subnet-network-security-group-association" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/subnet-network-security-group-association/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.subnet_network_security_group_association.id 3 | } -------------------------------------------------------------------------------- /terraform/subnet-network-security-group-association/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "subnetnetworksecuritygroupassociation.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/subnet-network-security-group-association/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/subnet-network-security-group-association/variables.tf: -------------------------------------------------------------------------------- 1 | variable "subnet_id" { 2 | type = string 3 | description = "The ID of the Network Security Group which should be associated with the Subnet." 4 | } 5 | 6 | variable "network_security_group_id" { 7 | type = string 8 | description = "The ID of the Subnet." 9 | } 10 | 11 | variable "module_enabled" { 12 | type = bool 13 | description = "Variable to enable or disable the module." 14 | default = true 15 | } -------------------------------------------------------------------------------- /terraform/subnet-route-table-association/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet_route_table_association 2 | 3 | resource "azurerm_subnet_route_table_association" "adl_snet_rt_association" { 4 | subnet_id = var.subnet_id 5 | route_table_id = var.route_table_id 6 | } -------------------------------------------------------------------------------- /terraform/subnet-route-table-association/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = azurerm_subnet_route_table_association.adl_snet_rt_association.id 3 | description = "Resource identifier of the instance of Subnet to Route Table association." 4 | } -------------------------------------------------------------------------------- /terraform/subnet-route-table-association/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "subnet-route-table-association" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/subnet-route-table-association/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.subnet_route_table_association.id 3 | } -------------------------------------------------------------------------------- /terraform/subnet-route-table-association/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "subnetroutetableassociation.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/subnet-route-table-association/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/subnet-route-table-association/variables.tf: -------------------------------------------------------------------------------- 1 | variable "subnet_id" { 2 | type = string 3 | description = "The ID of the Network Security Group which should be associated with the Subnet." 4 | } 5 | 6 | variable "route_table_id" { 7 | type = string 8 | description = "The ID of the Route Table." 9 | } -------------------------------------------------------------------------------- /terraform/subnet/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_subnet.adl_snet) > 0 ? 4 | azurerm_subnet.adl_snet[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Subnet." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_subnet.adl_snet) > 0 ? 12 | azurerm_subnet.adl_snet[0].name : "" 13 | ) 14 | description = "The name of the Subnet." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_subnet.adl_snet) > 0 ? 20 | azurerm_subnet.adl_snet[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Subnet exists." 23 | } -------------------------------------------------------------------------------- /terraform/subnet/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "subnet" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/subnet/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.subnet.id 3 | } 4 | 5 | output "name" { 6 | value = module.subnet.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.subnet.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/subnet/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "subnet.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/subnet/test/subnet.tf: -------------------------------------------------------------------------------- 1 | module "subnet" { 2 | source = "../" 3 | resource_group_name = module.local_rg.name 4 | name = "snet-test" 5 | vnet_name = module.local_vnet.name 6 | address_prefixes = var.address_prefixes 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } 17 | 18 | module "local_vnet" { 19 | source = "../../virtual-network" 20 | resource_group_name = module.local_rg.name 21 | basename = random_string.postfix.result 22 | location = var.location 23 | address_space = ["10.0.0.0/16"] 24 | } -------------------------------------------------------------------------------- /terraform/subnet/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "address_prefixes" { 13 | type = list(string) 14 | description = "value." 15 | default = ["10.0.1.0/24"] 16 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-kusto-pool/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azapi_resource.syn_synkp) > 0 ? 4 | azapi_resource.syn_synkp[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Synapse Kusto Pool." 7 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-kusto-pool/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | required_providers { 3 | azapi = { 4 | source = "Azure/azapi" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-kusto-pool/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "synapse-kusto-pool" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-kusto-pool/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.synapse_kusto_pool.id 3 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-kusto-pool/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "synapsekustopool.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | azapi = { 15 | source = "azure/azapi" 16 | } 17 | } 18 | } 19 | 20 | provider "azurerm" { 21 | features {} 22 | } 23 | 24 | provider "azapi" { 25 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-kusto-pool/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "synadmin_username" { 13 | type = string 14 | default = "sqladminuser" 15 | } 16 | 17 | variable "synadmin_password" { 18 | type = string 19 | default = "ThisIsNotVerySecure!" 20 | sensitive = true 21 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-private-link-hub/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "synapse-private-link-hub" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_syn_web = "privatelink.azuresynapse.net" 9 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-private-link-hub/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.synapse_private_link_hub.id 3 | } 4 | 5 | output "name" { 6 | value = module.synapse_private_link_hub.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.synapse_private_link_hub.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-private-link-hub/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "synapseprivatelinkhub.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-private-link-hub/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-spark-pool/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/synapse_spark_pool 2 | 3 | resource "azurerm_synapse_spark_pool" "syn_synsp" { 4 | name = "synsp${var.basename}" 5 | synapse_workspace_id = var.synapse_workspace_id 6 | node_size_family = var.node_size_family 7 | node_size = var.node_size 8 | cache_size = var.cache_size 9 | spark_version = var.spark_version 10 | 11 | 12 | auto_scale { 13 | max_node_count = 50 14 | min_node_count = 3 15 | } 16 | auto_pause { 17 | delay_in_minutes = 15 18 | } 19 | 20 | count = var.module_enabled ? 1 : 0 21 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-spark-pool/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_synapse_spark_pool.syn_synsp) > 0 ? 4 | azurerm_synapse_spark_pool.syn_synsp[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Synapse Spark Pool." 7 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-spark-pool/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "synapse-spark-pool" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-spark-pool/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.synapse_spark_pool.id 3 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-spark-pool/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "synapsesparkpool.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-spark-pool/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "synadmin_username" { 13 | type = string 14 | default = "sqladminuser" 15 | } 16 | 17 | variable "synadmin_password" { 18 | type = string 19 | default = "ThisIsNotVerySecure!" 20 | sensitive = true 21 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-sql-pool/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/synapse_sql_pool 2 | 3 | resource "azurerm_synapse_sql_pool" "syn_syndp" { 4 | name = "syndp${var.basename}" 5 | synapse_workspace_id = var.synapse_workspace_id 6 | sku_name = var.sku_name 7 | create_mode = var.create_mode 8 | 9 | count = var.module_enabled ? 1 : 0 10 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-sql-pool/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_synapse_sql_pool.syn_syndp) > 0 ? 4 | azurerm_synapse_sql_pool.syn_syndp[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Synapse SQL Pool." 7 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-sql-pool/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "synapse-sql-pool" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-sql-pool/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.synapse_sql_pool.id 3 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-sql-pool/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "synapsesqlpool.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-sql-pool/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "synadmin_username" { 13 | type = string 14 | default = "sqladminuser" 15 | } 16 | 17 | variable "synadmin_password" { 18 | type = string 19 | default = "ThisIsNotVerySecure!" 20 | sensitive = true 21 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-workspace/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_synapse_workspace.adl_syn) > 0 ? 4 | azurerm_synapse_workspace.adl_syn[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Synapse workspace." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_synapse_workspace.adl_syn) > 0 ? 12 | azurerm_synapse_workspace.adl_syn[0].name : "" 13 | ) 14 | description = "The name of the Synapse workspace." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_synapse_workspace.adl_syn) > 0 ? 20 | azurerm_synapse_workspace.adl_syn[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Synapse workspace exists." 23 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-workspace/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "synapse-workspace" 5 | Toolkit = "Terraform" 6 | } 7 | 8 | dns_st_blob = "privatelink.blob.core.windows.net" 9 | 10 | dns_st_dfs = "privatelink.dfs.core.windows.net" 11 | 12 | dns_syn_sql = "privatelink.sql.azuresynapse.net" 13 | 14 | dns_syn_dev = "privatelink.dev.azuresynapse.net" 15 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-workspace/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.synapse_workspace.id 3 | } 4 | 5 | output "name" { 6 | value = module.synapse_workspace.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.synapse_workspace.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/synapse/synapse-workspace/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "synapseworkspace.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/user-assigned-identity/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/user_assigned_identity 2 | 3 | resource "azurerm_user_assigned_identity" "adl_id" { 4 | location = var.location 5 | name = "id-${var.basename}" 6 | resource_group_name = var.resource_group_name 7 | tags = var.tags 8 | 9 | count = var.module_enabled ? 1 : 0 10 | } -------------------------------------------------------------------------------- /terraform/user-assigned-identity/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "user-assigned-identity" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/user-assigned-identity/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.user_assigned_identity.id 3 | } 4 | 5 | output "name" { 6 | value = module.user_assigned_identity.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.user_assigned_identity.resource_group_name 11 | } 12 | 13 | output "principal_id" { 14 | value = module.user_assigned_identity.principal_id 15 | } -------------------------------------------------------------------------------- /terraform/user-assigned-identity/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "userassignedidentity.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/user-assigned-identity/test/user_assigned_identity.tf: -------------------------------------------------------------------------------- 1 | module "user_assigned_identity" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | tags = {} 7 | } 8 | 9 | # Modules dependencies 10 | 11 | module "local_rg" { 12 | source = "../../resource-group" 13 | basename = random_string.postfix.result 14 | location = var.location 15 | tags = local.tags 16 | } -------------------------------------------------------------------------------- /terraform/user-assigned-identity/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/virtual-machine/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "virtual-machine" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/virtual-machine/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.virtual_machine.id 3 | } 4 | 5 | output "name" { 6 | value = module.virtual_machine.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.virtual_machine.resource_group_name 11 | } 12 | 13 | output "identity" { 14 | value = module.virtual_machine.identity 15 | } 16 | 17 | output "public_ip_address" { 18 | value = module.virtual_machine.public_ip_address 19 | } 20 | -------------------------------------------------------------------------------- /terraform/virtual-machine/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "virtualmachine.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/virtual-machine/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } 11 | 12 | variable "jumphost_username" { 13 | type = string 14 | description = "VM username." 15 | default = "azureuser" 16 | } 17 | 18 | variable "jumphost_password" { 19 | type = string 20 | description = "VM password." 21 | default = "ThisIsNotVerySecure!" 22 | sensitive = true 23 | } -------------------------------------------------------------------------------- /terraform/virtual-network-peering/maint.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network_peering 2 | 3 | resource "azurerm_virtual_network_peering" "adl_peer" { 4 | name = "vnet-${var.basename}" 5 | resource_group_name = var.resource_group_name 6 | virtual_network_name = var.virtual_network_name 7 | remote_virtual_network_id = var.remote_virtual_network_id 8 | allow_virtual_network_access = var.allow_virtual_network_access 9 | allow_forwarded_traffic = var.allow_forwarded_traffic 10 | allow_gateway_transit = var.allow_gateway_transit 11 | use_remote_gateways = var.use_remote_gateways 12 | 13 | count = var.module_enabled ? 1 : 0 14 | } -------------------------------------------------------------------------------- /terraform/virtual-network-peering/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_virtual_network_peering.adl_peer) > 0 ? 4 | azurerm_virtual_network_peering.adl_peer[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Virtual Network Peering." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_virtual_network_peering.adl_peer) > 0 ? 12 | azurerm_virtual_network_peering.adl_peer[0].name : "" 13 | ) 14 | description = "The name of the Virtual Network Peering." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_virtual_network_peering.adl_peer) > 0 ? 20 | azurerm_virtual_network_peering.adl_peer[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Virtual Network Peering exists." 23 | } -------------------------------------------------------------------------------- /terraform/virtual-network-peering/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "virtual-network-peering" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/virtual-network-peering/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.virtual_network_peering.id 3 | } 4 | 5 | output "name" { 6 | value = module.virtual_network_peering.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.virtual_network_peering.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/virtual-network-peering/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "virtualnetworkpeering.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/virtual-network-peering/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/virtual-network/main.tf: -------------------------------------------------------------------------------- 1 | # https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_network 2 | 3 | resource "azurerm_virtual_network" "adl_vnet" { 4 | name = "vnet-${var.basename}" 5 | location = var.location 6 | resource_group_name = var.resource_group_name 7 | address_space = var.address_space 8 | dns_servers = var.dns_servers 9 | dynamic "ddos_protection_plan" { 10 | for_each = var.ddos_protection_plan 11 | content { 12 | id = lookup(ddos_protection_plan.value, "id", null) 13 | enable = lookup(ddos_protection_plan.value, "enable", false) 14 | } 15 | } 16 | tags = var.tags 17 | 18 | count = var.module_enabled ? 1 : 0 19 | } -------------------------------------------------------------------------------- /terraform/virtual-network/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = ( 3 | length(azurerm_virtual_network.adl_vnet) > 0 ? 4 | azurerm_virtual_network.adl_vnet[0].id : "" 5 | ) 6 | description = "Resource identifier of the instance of Virtual Network." 7 | } 8 | 9 | output "name" { 10 | value = ( 11 | length(azurerm_virtual_network.adl_vnet) > 0 ? 12 | azurerm_virtual_network.adl_vnet[0].name : "" 13 | ) 14 | description = "The name of the Virtual Network." 15 | } 16 | 17 | output "resource_group_name" { 18 | value = ( 19 | length(azurerm_virtual_network.adl_vnet) > 0 ? 20 | azurerm_virtual_network.adl_vnet[0].resource_group_name : "" 21 | ) 22 | description = "Resource Group where the Virtual Network exists." 23 | } -------------------------------------------------------------------------------- /terraform/virtual-network/test/locals.tf: -------------------------------------------------------------------------------- 1 | locals { 2 | tags = { 3 | Project = "Azure/azure-data-labs-modules" 4 | Module = "virtual-network" 5 | Toolkit = "Terraform" 6 | } 7 | } -------------------------------------------------------------------------------- /terraform/virtual-network/test/outputs.tf: -------------------------------------------------------------------------------- 1 | output "id" { 2 | value = module.virtual_network.id 3 | } 4 | 5 | output "name" { 6 | value = module.virtual_network.name 7 | } 8 | 9 | output "resource_group_name" { 10 | value = module.virtual_network.resource_group_name 11 | } -------------------------------------------------------------------------------- /terraform/virtual-network/test/providers.tf: -------------------------------------------------------------------------------- 1 | terraform { 2 | backend "azurerm" { 3 | resource_group_name = "rg-adl-terraform-state" 4 | storage_account_name = "stadlterraformstate" 5 | container_name = "default" 6 | key = "virtualnetwork.terraform.tfstate" 7 | } 8 | 9 | required_providers { 10 | azurerm = { 11 | source = "hashicorp/azurerm" 12 | version = "= 3.97.1" 13 | } 14 | } 15 | } 16 | 17 | provider "azurerm" { 18 | features {} 19 | } -------------------------------------------------------------------------------- /terraform/virtual-network/test/variables.tf: -------------------------------------------------------------------------------- 1 | resource "random_string" "postfix" { 2 | length = 8 3 | special = false 4 | upper = false 5 | } 6 | 7 | variable "location" { 8 | type = string 9 | default = "North Europe" 10 | } -------------------------------------------------------------------------------- /terraform/virtual-network/test/virtual_network.tf: -------------------------------------------------------------------------------- 1 | module "virtual_network" { 2 | source = "../" 3 | basename = random_string.postfix.result 4 | resource_group_name = module.local_rg.name 5 | location = var.location 6 | address_space = ["10.0.0.0/16"] 7 | tags = local.tags 8 | } 9 | 10 | # Module dependencies 11 | 12 | module "local_rg" { 13 | source = "../../resource-group" 14 | basename = random_string.postfix.result 15 | location = var.location 16 | tags = local.tags 17 | } --------------------------------------------------------------------------------