|
29 | 29 | } |
30 | 30 | }, |
31 | 31 | "variables": { |
32 | | - "apiVersion": "2020-04-01-preview", |
| 32 | + "apiVersion": "2022-06-15", |
33 | 33 | "eventGridTopicName": "[concat(parameters('baseName'), 'topic')]", |
34 | 34 | "eventGridDomainName": "[concat(parameters('baseName'), 'domain')]", |
35 | 35 | "cloudeventDomainName": "[concat(parameters('baseName'), 'cloudevent-domain')]", |
36 | 36 | "cloudeventTopicName": "[concat(parameters('baseName'), 'cloudevent-topic')]", |
37 | 37 | "customeventTopicName": "[concat(parameters('baseName'), 'customevent-topic')]", |
| 38 | + "partnerRegistrationName": "[concat(parameters('baseName'), 'partner-registration')]", |
| 39 | + "partnerConfigurationName": "default", |
| 40 | + "partnerNamespaceName": "[concat(parameters('baseName'), 'partner-namespace')]", |
| 41 | + "partnerChannelName": "[concat(parameters('baseName'), 'partner-channel')]", |
| 42 | + "partnerTopicName": "[concat(parameters('baseName'), 'partner-topic')]", |
38 | 43 | "eventGridDataSenderRoleId": "d5a91429-5739-47e2-a06b-3470a27159e7", |
39 | 44 | }, |
40 | 45 | "resources": [ |
|
104 | 109 | } |
105 | 110 | } |
106 | 111 | }, |
| 112 | + { |
| 113 | + "type": "Microsoft.EventGrid/partnerRegistrations", |
| 114 | + "apiVersion": "[variables('apiVersion')]", |
| 115 | + "name": "[variables('partnerRegistrationName')]", |
| 116 | + "location": "global" |
| 117 | + }, |
| 118 | + { |
| 119 | + "type": "Microsoft.EventGrid/partnerConfigurations", |
| 120 | + "apiVersion": "[variables('apiVersion')]", |
| 121 | + "name": "[variables('partnerConfigurationName')]", |
| 122 | + "dependsOn": [ |
| 123 | + "[resourceId('Microsoft.EventGrid/partnerRegistrations', variables('partnerRegistrationName'))]" |
| 124 | + ], |
| 125 | + "location": "global", |
| 126 | + "properties": { |
| 127 | + "partnerAuthorization": { |
| 128 | + "authorizedPartnersList": [ |
| 129 | + { |
| 130 | + "partnerRegistrationImmutableId": "[reference(variables('partnerRegistrationName')).partnerRegistrationImmutableId]" |
| 131 | + } |
| 132 | + ] |
| 133 | + } |
| 134 | + } |
| 135 | + }, |
| 136 | + { |
| 137 | + "type": "Microsoft.EventGrid/partnerNamespaces", |
| 138 | + "apiVersion": "[variables('apiVersion')]", |
| 139 | + "name": "[variables('partnerNamespaceName')]", |
| 140 | + "dependsOn": [ |
| 141 | + "[resourceId('Microsoft.EventGrid/partnerConfigurations', variables('partnerConfigurationName'))]" |
| 142 | + ], |
| 143 | + "location": "[resourceGroup().location]", |
| 144 | + "properties": { |
| 145 | + "partnerRegistrationFullyQualifiedId": "[resourceId('Microsoft.EventGrid/partnerRegistrations', variables('partnerRegistrationName'))]", |
| 146 | + "partnerTopicRoutingMode": "ChannelNameHeader" |
| 147 | + } |
| 148 | + }, |
| 149 | + { |
| 150 | + "type": "Microsoft.EventGrid/partnerNamespaces/channels", |
| 151 | + "apiVersion": "[variables('apiVersion')]", |
| 152 | + "name": "[concat(variables('partnerNamespaceName'), '/', variables('partnerChannelName'))]", |
| 153 | + "dependsOn": [ |
| 154 | + "[resourceId('Microsoft.EventGrid/partnerNamespaces', variables('partnerNamespaceName'))]" |
| 155 | + ], |
| 156 | + "properties": { |
| 157 | + "channelType": "PartnerTopic", |
| 158 | + "partnerTopicInfo": { |
| 159 | + "azureSubscriptionId": "[subscription().subscriptionId]", |
| 160 | + "name": "[variables('partnerTopicName')]", |
| 161 | + "resourceGroupName": "[resourceGroup().Name]", |
| 162 | + "source": "customSource" |
| 163 | + } |
| 164 | + } |
| 165 | + }, |
107 | 166 | { |
108 | 167 | "type": "Microsoft.Authorization/roleAssignments", |
109 | 168 | "apiVersion": "2019-04-01-preview", |
|
114 | 173 | "scope": "[resourceGroup().id]" |
115 | 174 | } |
116 | 175 | } |
| 176 | + |
117 | 177 | ], |
118 | 178 | "outputs": { |
119 | 179 | "EVENTGRID_TOPIC_KEY": { |
|
155 | 215 | "EVENTGRID_CUSTOM_EVENT_TOPIC_KEY": { |
156 | 216 | "type": "string", |
157 | 217 | "value": "[listKeys(resourceId('Microsoft.EventGrid/topics', variables('customeventTopicName')), variables('apiVersion')).key1]" |
| 218 | + }, |
| 219 | + "EVENTGRID_PARTNER_NAMESPACE_TOPIC_ENDPOINT": { |
| 220 | + "type": "string", |
| 221 | + "value": "[reference(variables('partnerNamespaceName')).endpoint]" |
| 222 | + }, |
| 223 | + "EVENTGRID_PARTNER_NAMESPACE_TOPIC_KEY": { |
| 224 | + "type": "string", |
| 225 | + "value": "[listKeys(resourceId('Microsoft.EventGrid/partnerNamespaces', variables('partnerNamespaceName')), variables('apiVersion')).key1]" |
| 226 | + }, |
| 227 | + "EVENTGRID_PARTNER_CHANNEL_NAME": { |
| 228 | + "type": "string", |
| 229 | + "value": "[variables('partnerChannelName')]" |
158 | 230 | } |
159 | 231 | } |
160 | 232 | } |
0 commit comments