Adding EventHub Namespace Network Rule Set (#64)

* Adding EventHub Namespace Network Rule Set

* linting
This commit is contained in:
Marvin Buss 2021-09-22 14:05:11 +02:00 коммит произвёл GitHub
Родитель 6fe42bfef6
Коммит 8bdd5b2ff6
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 43 добавлений и 14 удалений

Просмотреть файл

@ -5,7 +5,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "1296363371752267801"
"templateHash": "7419035663361961382"
}
},
"parameters": {
@ -1141,7 +1141,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "10407527876899620091"
"templateHash": "13466920506392227882"
}
},
"parameters": {
@ -1164,6 +1164,7 @@
"iothubSkuCapacity": {
"type": "int",
"defaultValue": 1,
"maxValue": 200,
"minValue": 1
},
"privateDnsZoneIdIothub": {
@ -1345,7 +1346,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "17416459153117104041"
"templateHash": "1612925201210464947"
}
},
"parameters": {
@ -1402,6 +1403,21 @@
"zoneRedundant": true
}
},
{
"type": "Microsoft.EventHub/namespaces/networkRuleSets",
"apiVersion": "2021-06-01-preview",
"name": "[format('{0}/{1}', parameters('eventhubnamespaceName'), 'default')]",
"properties": {
"defaultAction": "Deny",
"ipRules": [],
"virtualNetworkRules": [],
"publicNetworkAccess": "Disabled",
"trustedServiceAccessEnabled": false
},
"dependsOn": [
"[resourceId('Microsoft.EventHub/namespaces', parameters('eventhubnamespaceName'))]"
]
},
{
"type": "Microsoft.Network/privateEndpoints",
"apiVersion": "2020-11-01",
@ -1504,7 +1520,7 @@
"_generator": {
"name": "bicep",
"version": "0.4.613.9944",
"templateHash": "16035487727448282155"
"templateHash": "8085901455606187999"
}
},
"parameters": {
@ -1568,7 +1584,7 @@
"resources": [
{
"type": "Microsoft.StreamAnalytics/clusters",
"apiVersion": "2020-03-01-preview",
"apiVersion": "2020-03-01",
"name": "[parameters('streamanalyticsclusterName')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",
@ -1581,7 +1597,7 @@
{
"condition": "[not(empty(parameters('storageAccountId')))]",
"type": "Microsoft.StreamAnalytics/clusters/privateEndpoints",
"apiVersion": "2020-03-01-preview",
"apiVersion": "2020-03-01",
"name": "[format('{0}/{1}', parameters('streamanalyticsclusterName'), variables('streamanalyticsclusterManagedPrivateEndpointNameStorageAccount'))]",
"properties": {
"manualPrivateLinkServiceConnections": [
@ -1604,7 +1620,7 @@
{
"condition": "[not(empty(parameters('sqlServerId')))]",
"type": "Microsoft.StreamAnalytics/clusters/privateEndpoints",
"apiVersion": "2020-03-01-preview",
"apiVersion": "2020-03-01",
"name": "[format('{0}/{1}', parameters('streamanalyticsclusterName'), variables('streamanalyticsclusterManagedPrivateEndpointNameSqlServer'))]",
"properties": {
"manualPrivateLinkServiceConnections": [
@ -1627,7 +1643,7 @@
{
"condition": "[not(empty(parameters('eventhubNamespaceId')))]",
"type": "Microsoft.StreamAnalytics/clusters/privateEndpoints",
"apiVersion": "2020-03-01-preview",
"apiVersion": "2020-03-01",
"name": "[format('{0}/{1}', parameters('streamanalyticsclusterName'), variables('streamanalyticsclusterManagedPrivateEndpointNameEventhubNamespace'))]",
"properties": {
"manualPrivateLinkServiceConnections": [
@ -1649,7 +1665,7 @@
},
{
"type": "Microsoft.StreamAnalytics/streamingjobs",
"apiVersion": "2017-04-01-preview",
"apiVersion": "2020-03-01",
"name": "[parameters('streamanalyticsName')]",
"location": "[parameters('location')]",
"tags": "[parameters('tags')]",

Просмотреть файл

@ -41,6 +41,18 @@ resource eventhubNamespace 'Microsoft.EventHub/namespaces@2021-01-01-preview' =
}
}
resource eventhubNamespaceNetworkRuleSets 'Microsoft.EventHub/namespaces/networkRuleSets@2021-06-01-preview' = {
name: 'default'
parent: eventhubNamespace
properties: {
defaultAction: 'Deny'
ipRules: []
virtualNetworkRules: []
publicNetworkAccess: 'Disabled'
trustedServiceAccessEnabled: false
}
}
// resource eventhub001 'Microsoft.EventHub/namespaces/eventhubs@2021-01-01-preview' = { // Uncomment to deploy an Event Hub in the namespace
// parent: eventhubNamespace
// name: 'default'

Просмотреть файл

@ -11,6 +11,7 @@ param subnetId string
param iothubName string
param iothubSkuName string = 'S1'
@minValue(1)
@maxValue(200)
param iothubSkuCapacity int = 1
param privateDnsZoneIdIothub string = ''
param privateDnsZoneIdEventhubNamespace string = ''

Просмотреть файл

@ -39,7 +39,7 @@ var streamanalyticsclusterManagedPrivateEndpointNameEventhubNamespace = '${event
var requestMessage = 'Private Endpoint for Stream Analytics Cluster ${streamanalyticscluster.name}'
// Resources
resource streamanalyticscluster 'Microsoft.StreamAnalytics/clusters@2020-03-01-preview' = {
resource streamanalyticscluster 'Microsoft.StreamAnalytics/clusters@2020-03-01' = {
name: streamanalyticsclusterName
location: location
tags: tags
@ -50,7 +50,7 @@ resource streamanalyticscluster 'Microsoft.StreamAnalytics/clusters@2020-03-01-p
properties: {}
}
resource streamanalyticsclusterManagedPrivateEndpointStorageAccount 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01-preview' = if (!empty(storageAccountId)) {
resource streamanalyticsclusterManagedPrivateEndpointStorageAccount 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if (!empty(storageAccountId)) {
parent: streamanalyticscluster
name: streamanalyticsclusterManagedPrivateEndpointNameStorageAccount
properties: {
@ -69,7 +69,7 @@ resource streamanalyticsclusterManagedPrivateEndpointStorageAccount 'Microsoft.S
}
}
resource streamanalyticsclusterManagedPrivateEndpointSqlServer 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01-preview' = if (!empty(sqlServerId)) {
resource streamanalyticsclusterManagedPrivateEndpointSqlServer 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if (!empty(sqlServerId)) {
parent: streamanalyticscluster
name: streamanalyticsclusterManagedPrivateEndpointNameSqlServer
properties: {
@ -88,7 +88,7 @@ resource streamanalyticsclusterManagedPrivateEndpointSqlServer 'Microsoft.Stream
}
}
resource streamanalyticsclusterManagedPrivateEndpointEventhubNamespace 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01-preview' = if (!empty(eventhubNamespaceId)) {
resource streamanalyticsclusterManagedPrivateEndpointEventhubNamespace 'Microsoft.StreamAnalytics/clusters/privateEndpoints@2020-03-01' = if (!empty(eventhubNamespaceId)) {
parent: streamanalyticscluster
name: streamanalyticsclusterManagedPrivateEndpointNameEventhubNamespace
properties: {
@ -107,7 +107,7 @@ resource streamanalyticsclusterManagedPrivateEndpointEventhubNamespace 'Microsof
}
}
resource streamanalyticsjob001 'Microsoft.StreamAnalytics/streamingjobs@2017-04-01-preview' = {
resource streamanalyticsjob001 'Microsoft.StreamAnalytics/streamingjobs@2020-03-01' = {
name: streamanalyticsName
location: location
tags: tags