-
Notifications
You must be signed in to change notification settings - Fork 437
[Modules] Update Eventhub Network Rules + latest APIs #1387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
40cad2e
updated event hub module for network rules
ahmadabdalla 61fa0e8
updated API versions on event hub
ahmadabdalla 5d4b455
updated readme for network rules
ahmadabdalla 9e278be
updated readme
ahmadabdalla 839bd2b
Removed defaults from the bicep module
ahmadabdalla cd81055
restored to use defaults
ahmadabdalla bca9549
Update arm/Microsoft.EventHub/namespaces/networkRuleSets/deploy.bicep
ahmadabdalla 3c289af
Updated Namespace and networkRules config
ahmadabdalla File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
arm/Microsoft.EventHub/namespaces/networkRuleSets/deploy.bicep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| @description('Conditional. The name of the parent event hub namespace. Required if the template is used in a standalone deployment.') | ||
| param namespaceName string | ||
|
|
||
| @allowed([ | ||
| 'Enabled' | ||
| 'Disabled' | ||
| ]) | ||
| @description('Optional. This determines if traffic is allowed over public network. Default it is "Enabled". If set to "Disabled", traffic to this namespace will be restricted over Private Endpoints only.') | ||
| param publicNetworkAccess string = 'Enabled' | ||
|
|
||
| @allowed([ | ||
| 'Allow' | ||
| 'Deny' | ||
| ]) | ||
| @description('Optional. Default Action for Network Rule Set. Default is "Allow". Will be set to "Deny" if ipRules/virtualNetworkRules or are being used. If ipRules/virtualNetworkRules are not used and PublicNetworkAccess is set to "Disabled", setting this to "Deny" would render the namespace resources inaccessible for data-plane requests') | ||
| param defaultAction string = 'Allow' | ||
|
|
||
| @description('Optional. List of IpRules. When used, defaultAction will be set to "Deny" and publicNetworkAccess will be set to "Enabled".') | ||
| param ipRules array = [] | ||
|
|
||
| @allowed([ | ||
| true | ||
| false | ||
| ]) | ||
| @description('Optional. Value that indicates whether Trusted Service Access is Enabled or not. Default is "true".') | ||
| param trustedServiceAccessEnabled bool = true | ||
|
|
||
| @description('Optional. List VirtualNetwork Rules. When used, defaultAction will be set to "Deny" and publicNetworkAccess will be set to "Enabled".') | ||
| param virtualNetworkRules array = [] | ||
|
|
||
| @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') | ||
| param enableDefaultTelemetry bool = true | ||
|
|
||
| resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { | ||
| name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name)}' | ||
| properties: { | ||
| mode: 'Incremental' | ||
| template: { | ||
| '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' | ||
| contentVersion: '1.0.0.0' | ||
| resources: [] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| resource namespace 'Microsoft.EventHub/namespaces@2021-11-01' existing = { | ||
| name: namespaceName | ||
| } | ||
|
|
||
| resource networkRuleSet 'Microsoft.EventHub/namespaces/networkRuleSets@2021-11-01' = { | ||
| name: 'default' | ||
| parent: namespace | ||
| properties: { | ||
| publicNetworkAccess: !empty(ipRules) || !empty(virtualNetworkRules) ? null : publicNetworkAccess | ||
| defaultAction: !empty(ipRules) || !empty(virtualNetworkRules) ? 'Deny' : defaultAction | ||
| trustedServiceAccessEnabled: trustedServiceAccessEnabled | ||
| ipRules: publicNetworkAccess == 'Disabled' ? null : ipRules | ||
| virtualNetworkRules: publicNetworkAccess == 'Disabled' ? null : virtualNetworkRules | ||
| } | ||
| } | ||
|
|
||
| @description('The name of the network rule set.') | ||
| output name string = networkRuleSet.name | ||
|
|
||
| @description('The resource ID of the network rule set.') | ||
| output resourceId string = networkRuleSet.id | ||
|
|
||
| @description('The name of the resource group the network rule set was created in.') | ||
| output resourceGroupName string = resourceGroup().name |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.