Skip to content

Commit

Permalink
Merge pull request #3 from hattan/fhi
Browse files Browse the repository at this point in the history
refactor FHI mappings files
  • Loading branch information
hattan authored Nov 4, 2020
2 parents 14b7331 + 183445c commit c6bdf92
Show file tree
Hide file tree
Showing 26 changed files with 174 additions and 193 deletions.
8 changes: 8 additions & 0 deletions tools/apispec-rule-gen/mappings/azurerm_frontdoor.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mapping "azurerm_frontdoor" {
import_path = "azure-rest-api-specs/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json"

name = frontDoorNameParameter
resource_group_name = resourceGroupNameParameter
backend_pools_send_receive_timeout_seconds = BackendPoolsSettings.sendRecvTimeoutSeconds
friendly_name = FrontDoorUpdateParameters.friendlyName
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,3 @@
mapping "azurerm_frontdoor" {
import_path = "azure-rest-api-specs/specification/frontdoor/resource-manager/Microsoft.Network/stable/2020-01-01/frontdoor.json"

name = frontDoorNameParameter
resource_group_name = resourceGroupNameParameter
backend_pools_send_receive_timeout_seconds = BackendPoolsSettings.sendRecvTimeoutSeconds
friendly_name = FrontDoorUpdateParameters.friendlyName
}

mapping "azurerm_frontdoor_firewall_policy" {
import_path = "azure-rest-api-specs/specification/frontdoor/resource-manager/Microsoft.Network/stable/2019-10-01/webapplicationfirewall.json"

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_hdinsight_hadoop_cluster" {
import_path = "azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/cluster.json"

name = ClusterNameParameter
resource_group_name = ResourceGroupNameParameter
cluster_version = ClusterCreateProperties.clusterVersion
tier = ClusterCreateProperties.tier
min_tls_version = ClusterCreateProperties.minSupportedTlsVersion
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_hdinsight_hbase_cluster" {
import_path = "azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/cluster.json"

name = ClusterNameParameter
resource_group_name = ResourceGroupNameParameter
cluster_version = ClusterCreateProperties.clusterVersion
tier = ClusterCreateProperties.tier
min_tls_version = ClusterCreateProperties.minSupportedTlsVersion
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_hdinsight_interactive_query_cluster" {
import_path = "azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/cluster.json"

name = ClusterNameParameter
resource_group_name = ResourceGroupNameParameter
cluster_version = ClusterCreateProperties.clusterVersion
tier = ClusterCreateProperties.tier
min_tls_version = ClusterCreateProperties.minSupportedTlsVersion
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_hdinsight_kafka_cluster" {
import_path = "azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/cluster.json"

name = ClusterNameParameter
resource_group_name = ResourceGroupNameParameter
cluster_version = ClusterCreateProperties.clusterVersion
tier = ClusterCreateProperties.tier
min_tls_version = ClusterCreateProperties.minSupportedTlsVersion
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_hdinsight_ml_services_cluster" {
import_path = "azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/cluster.json"

name = ClusterNameParameter
resource_group_name = ResourceGroupNameParameter
cluster_version = ClusterCreateProperties.clusterVersion
tier = ClusterCreateProperties.tier
min_tls_version = ClusterCreateProperties.minSupportedTlsVersion
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_hdinsight_rserver_cluster" {
import_path = "azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/cluster.json"

name = ClusterNameParameter
resource_group_name = ResourceGroupNameParameter
cluster_version = ClusterCreateProperties.clusterVersion
tier = ClusterCreateProperties.tier
min_tls_version = ClusterCreateProperties.minSupportedTlsVersion
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_hdinsight_spark_cluster" {
import_path = "azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/cluster.json"

name = ClusterNameParameter
resource_group_name = ResourceGroupNameParameter
cluster_version = ClusterCreateProperties.clusterVersion
tier = ClusterCreateProperties.tier
min_tls_version = ClusterCreateProperties.minSupportedTlsVersion
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_hdinsight_storm_cluster" {
import_path = "azure-rest-api-specs/specification/hdinsight/resource-manager/Microsoft.HDInsight/stable/2018-06-01-preview/cluster.json"

name = ClusterNameParameter
resource_group_name = ResourceGroupNameParameter
cluster_version = ClusterCreateProperties.clusterVersion
tier = ClusterCreateProperties.tier
min_tls_version = ClusterCreateProperties.minSupportedTlsVersion
}
8 changes: 8 additions & 0 deletions tools/apispec-rule-gen/mappings/azurerm_iothub.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mapping "azurerm_iothub" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
resource_group_name = resourceGroupName
event_hub_partition_count = EventHubProperties.partitionCount
event_hub_retention_in_days = EventHubProperties.retentionTimeInDays
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mapping "azurerm_iothub_consumer_group" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
iothub_name = resourceName
resource_group_name = resourceGroupName
}
6 changes: 6 additions & 0 deletions tools/apispec-rule-gen/mappings/azurerm_iothub_dps.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mapping "azurerm_iothub_dps" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
resource_group_name = resourceGroupName
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
mapping "azurerm_iothub_dps_certificate" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
resource_group_name = resourceGroupName
iot_dps_name = resourceName
certificate_content = CertificateProperties.certificate
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mapping "azurerm_iothub_dps_shared_access_policy" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
resource_group_name = resourceGroupName
iothub_dps_name = resourceName
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mapping "azurerm_iothub_endpoint_eventhub" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
connection_string = RoutingEventHubProperties.connectionString
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mapping "azurerm_iothub_endpoint_servicebus_queue" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
connection_string = RoutingServiceBusQueueEndpointProperties.connectionString
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
mapping "azurerm_iothub_endpoint_servicebus_topic" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
connection_string = RoutingServiceBusTopicEndpointProperties.connectionString
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
mapping "azurerm_iothub_endpoint_storage_container" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = RoutingStorageContainerProperties.name
resource_group_name = RoutingStorageContainerProperties.resourceGroup
iothub_name = resourceName
connection_string = RoutingStorageContainerProperties.connectionString
batch_frequency_in_seconds = RoutingStorageContainerProperties.batchFrequencyInSeconds
max_chunk_size_in_bytes = RoutingStorageContainerProperties.maxChunkSizeInBytes
container_name = RoutingStorageContainerProperties.containerName
encoding = RoutingStorageContainerProperties.encoding
file_name_format = RoutingStorageContainerProperties.fileNameFormat
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
mapping "azurerm_iothub_fallback_route" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

resource_group_name = resourceGroupName
iothub_name = resourceName
enabled = FallbackRouteProperties.isEnabled
endpoint_names = FallbackRouteProperties.endpointNames
condition = FallbackRouteProperties.condition
}
11 changes: 11 additions & 0 deletions tools/apispec-rule-gen/mappings/azurerm_iothub_route.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
mapping "azurerm_iothub_route" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = RouteProperties.name
resource_group_name = resourceGroupName
iothub_name = resourceName
source = RouteProperties.source
condition = RouteProperties.condition
endpoint_names = RouteProperties.endpointNames
enabled = RouteProperties.isEnabled
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
mapping "azurerm_iothub_shared_access_policy" {
import_path = "azure-rest-api-specs/specification/iothub/resource-manager/Microsoft.Devices/stable/2020-03-01/iothub.json"

name = resourceName
resource_group_name = resourceGroupName
iothub_name = resourceName
}
79 changes: 0 additions & 79 deletions tools/apispec-rule-gen/mappings/hdinsight.hcl

This file was deleted.

105 changes: 0 additions & 105 deletions tools/apispec-rule-gen/mappings/iothub.hcl

This file was deleted.

0 comments on commit c6bdf92

Please sign in to comment.