Skip to content

Commit 840dde7

Browse files
incorporated review comments
1 parent 639a048 commit 840dde7

File tree

2 files changed

+106
-25
lines changed

2 files changed

+106
-25
lines changed

articles/spring-apps/concept-outbound-type.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,21 @@ Egress from an Azure Spring Apps application can be customized to fit specific s
1919

2020
This article describes how to customize an instance's egress route to support custom network scenarios. For example, you might want to customize an instance's egress route for networks that disallow public IPs and require the instance to sit behind a network virtual appliance (NVA).
2121

22+
## Prerequisites
23+
24+
- All prerequisites for deploying Azure Spring Apps in a virtual network. For more information, see [Deploy Azure Spring Apps in a virtual network](how-to-deploy-in-azure-virtual-network.md).
25+
- An API version of *2022-09-01 preview* or greater.
26+
- [Azure CLI version 1.1.7 or later](/cli/azure/install-azure-cli).
27+
2228
## Limitations
2329

2430
- You can only define `OutboundType` when you create a new Azure Spring Apps service instance, and you can't updated it afterwards. `OutboundType` works only with a VNet instance.
2531
- Setting `outboundType` to `UserDefinedRouting` requires a user-defined route with valid outbound connectivity for your instance.
2632
- Setting `outboundType` to `UserDefinedRouting` implies that the ingress source IP routed to the load-balancer may not match the instance's outgoing egress destination address.
2733

28-
## Prerequisites
29-
30-
- All prerequisites for deploying Azure Spring Apps in a virtual network. For more information, see [Deploy Azure Spring Apps in a virtual network](how-to-deploy-in-azure-virtual-network.md).
31-
- An API version of *2022-09-01 preview* or greater.
32-
- A CLI extension version of 1.1.7 or greater.
33-
3434
## Overview of outbound types in Azure Spring Apps
3535

36-
An Azure Spring Apps instance can be customized with a unique `outboundType` of type `loadBalancer` or `userDefinedRouting`.
36+
You can customize an Azure Spring Apps instance with a unique `outboundType` of type `loadBalancer` or `userDefinedRouting`.
3737

3838
### Outbound type loadBalancer
3939

articles/spring-apps/how-to-create-udr-instance.md

Lines changed: 99 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ This article describes how to secure outbound traffic from your applications hos
2121

2222
- All prerequisites for deploying Azure Spring Apps in a virtual network. For more information, see [Deploy Azure Spring Apps in a virtual network](how-to-deploy-in-azure-virtual-network.md).
2323
- API version of `2022-09-01 preview` or greater
24-
- CLI version extension of 1.1.7 or greater
25-
- The following articles:
24+
- [Azure CLI version 1.1.7 or later](/cli/azure/install-azure-cli).
25+
- You should be familiar with information in the following articles:
2626
- [Deploy Azure Spring Apps in a virtual network](how-to-deploy-in-azure-virtual-network.md)
2727
- [Customer responsibilities for running Azure Spring Apps in VNET](vnet-customer-responsibilities.md)
2828
- [Customize Azure Spring Cloud egress with a User-Defined Route](concept-outbound-type.md)
@@ -106,7 +106,10 @@ Use the following command to create and set up an Azure Firewall with a user-def
106106
> If your cluster or application creates a large number of outbound connections directed to the same or small subset of destinations, you might require more firewall frontend IPs to avoid reaching the maximum ports per front-end IP. For more information on how to create an Azure firewall with multiple IPs, see [Quickstart: Create an Azure Firewall with multiple public IP addresses - ARM template](../firewall/quick-create-multiple-ip-template.md). Create a standard SKU public IP resource that will be used as the Azure Firewall front-end address.
107107
108108
```azurecli
109-
az network public-ip create -g $RG -n $FWPUBLICIP_NAME -l $LOC --sku "Standard"
109+
az network public-ip create \
110+
--resource-group $RG \
111+
--name $FWPUBLICIP_NAME -l $LOC \
112+
--sku "Standard"
110113
```
111114

112115
The following example shows how to install the Azure Firewall preview CLI extension and deploy Azure Firewall.
@@ -118,7 +121,10 @@ az extension add --name azure-firewall
118121
119122
# Deploy Azure Firewall.
120123
121-
az network firewall create -g $RG -n $FWNAME -l $LOC --enable-dns-proxy true
124+
az network firewall create \
125+
--resource-group $RG \
126+
--firewall-name $FWNAME -l $LOC \
127+
--enable-dns-proxy true
122128
```
123129

124130
The following example shows how to assign the IP address you created to the firewall front end.
@@ -129,16 +135,29 @@ The following example shows how to assign the IP address you created to the fire
129135
```azurecli
130136
# Configure firewall IP config.
131137
132-
az network firewall ip-config create -g $RG -f $FWNAME -n $FWIPCONFIG_NAME --public-ip-address $FWPUBLICIP_NAME --vnet-name $VNET_NAME
138+
az network firewall ip-config create \
139+
--resource-group $RG \
140+
--firewall-name $FWNAME \
141+
--name $FWIPCONFIG_NAME \
142+
--public-ip-address $FWPUBLICIP_NAME \
143+
--vnet-name $VNET_NAME
133144
```
134145

135146
When the operation has completed, save the firewall front-end IP address for configuration later, as shown in the following example.
136147

137148
```azurecli
138149
# Capture firewall IP address for later use.
139150
140-
FWPUBLIC_IP=$(az network public-ip show -g $RG -n $FWPUBLICIP_NAME --query "ipAddress" -o tsv)
141-
FWPRIVATE_IP=$(az network firewall show -g $RG -n $FWNAME --query "ipConfigurations[0].privateIpAddress" -o tsv | tr -d '[:space:]')
151+
FWPUBLIC_IP=$(az network public-ip show \
152+
--resource-group $RG \
153+
--name $FWPUBLICIP_NAME \
154+
--query "ipAddress" \
155+
--output tsv)
156+
FWPRIVATE_IP=$(az network firewall show \
157+
--resource-group $RG \
158+
--name $FWNAME \
159+
--query "ipConfigurations[0].privateIpAddress" \
160+
--output tsv | tr -d '[:space:]')
142161
```
143162

144163
### Create a user-defined route with a hop to Azure Firewall
@@ -150,10 +169,26 @@ The following example shows how to create a route table to be associated with a
150169
```azurecli
151170
# Create UDR and add a route for Azure Firewall.
152171
153-
az network route-table create -g $RG -l $LOC --name $APP_ROUTE_TABLE_NAME
154-
az network route-table route create -g $RG --name $FWROUTE_NAME --route-table-name $APP_ROUTE_TABLE_NAME --address-prefix 0.0.0.0/0 --next-hop-type VirtualAppliance --next-hop-ip-address $FWPRIVATE_IP
155-
az network route-table create -g $RG -l $LOC --name $SERVICE_RUNTIME_ROUTE_TABLE_NAME
156-
az network route-table route create -g $RG --name $FWROUTE_NAME --route-table-name $SERVICE_RUNTIME_ROUTE_TABLE_NAME --address-prefix 0.0.0.0/0 --next-hop-type VirtualAppliance --next-hop-ip-address $FWPRIVATE_IP
172+
az network route-table create \
173+
--resource-group $RG -l $LOC \
174+
--name $APP_ROUTE_TABLE_NAME
175+
az network route-table route create \
176+
--resource-group $RG \
177+
--name $FWROUTE_NAME \
178+
--route-table-name $APP_ROUTE_TABLE_NAME \
179+
--address-prefix 0.0.0.0/0 \
180+
--next-hop-type VirtualAppliance \
181+
--next-hop-ip-address $FWPRIVATE_IP
182+
az network route-table create \
183+
--resource-group $RG -l $LOC \
184+
--name $SERVICE_RUNTIME_ROUTE_TABLE_NAME
185+
az network route-table route create \
186+
--resource-group $RG \
187+
--name $FWROUTE_NAME \
188+
--route-table-name $SERVICE_RUNTIME_ROUTE_TABLE_NAME \
189+
--address-prefix 0.0.0.0/0 \
190+
--next-hop-type VirtualAppliance \
191+
--next-hop-ip-address $FWPRIVATE_IP
157192
```
158193

159194
### Adding firewall rules
@@ -163,13 +198,45 @@ The following example shows hot to add rules to your firewall. For more informat
163198
```azurecli
164199
# Add firewall network rules.
165200
166-
az network firewall network-rule create -g $RG -f $FWNAME --collection-name 'asafwnr' -n 'apiudp' --protocols 'UDP' --source-addresses '*' --destination-addresses "AzureCloud" --destination-ports 1194 --action allow --priority 100
167-
az network firewall network-rule create -g $RG -f $FWNAME --collection-name 'asafwnr' -n 'springcloudtcp' --protocols 'TCP' --source-addresses '*' --destination-addresses "AzureCloud" --destination-ports 443 445
168-
az network firewall network-rule create -g $RG -f $FWNAME --collection-name 'asafwnr' -n 'time' --protocols 'UDP' --source-addresses '*' --destination-fqdns 'ntp.ubuntu.com' --destination-ports 123
201+
az network firewall network-rule create \
202+
--resource-group $RG \
203+
--firewall-name $FWNAME \
204+
--collection-name 'asafwnr' -n 'apiudp' \
205+
--protocols 'UDP' \
206+
--source-addresses '*' \
207+
--destination-addresses "AzureCloud" \
208+
--destination-ports 1194 \
209+
--action allow \
210+
--priority 100
211+
az network firewall network-rule create \
212+
--resource-group $RG \
213+
--firewall-name $FWNAME \
214+
--collection-name 'asafwnr' -n 'springcloudtcp' \
215+
--protocols 'TCP' \
216+
--source-addresses '*' \
217+
--destination-addresses "AzureCloud" \
218+
--destination-ports 443 445
219+
az network firewall network-rule create \
220+
--resource-group $RG \
221+
--firewall-name $FWNAME \
222+
--collection-name 'asafwnr' \
223+
--name 'time' \
224+
--protocols 'UDP' \
225+
--source-addresses '*' \
226+
--destination-fqdns 'ntp.ubuntu.com' \
227+
--destination-ports 123
169228
170229
# Add firewall application rules.
171230
172-
az network firewall application-rule create -g $RG -f $FWNAME --collection-name 'aksfwar' -n 'fqdn' --source-addresses '*' --protocols 'http=80' 'https=443' --fqdn-tags "AzureKubernetesService" --action allow --priority 100
231+
az network firewall application-rule create \
232+
--resource-group $RG \
233+
--firewall-name $FWNAME \
234+
--collection-name 'aksfwar'\
235+
--name 'fqdn' \
236+
--source-addresses '*' \
237+
--protocols 'http=80' 'https=443' \
238+
--fqdn-tags "AzureKubernetesService" \
239+
--action allow --priority 100
173240
```
174241

175242
### Associate route tables with subnets
@@ -179,9 +246,17 @@ To associate the cluster with the firewall, the dedicated subnet for the cluster
179246
```azurecli
180247
# Associate route table with next hop to Firewall to the Azure Spring Apps subnet.
181248
182-
az network vnet subnet update -g $RG --vnet-name $VNET_NAME --name $ASA_APP_SUBNET_NAME --route-table $APP_ROUTE_TABLE_NAME
249+
az network vnet subnet update \
250+
--resource-group $RG \
251+
--vnet-name $VNET_NAME \
252+
--name $ASA_APP_SUBNET_NAME \
253+
--route-table $APP_ROUTE_TABLE_NAME
183254
184-
az network vnet subnet update -g $RG --vnet-name $VNET_NAME --name $ASA_SERVICE_RUNTIME_SUBNET_NAME --route-table $SERVICE_RUNTIME_ROUTE_TABLE_NAME
255+
az network vnet subnet update
256+
--resource-group $RG \
257+
--vnet-name $VNET_NAME \
258+
--name $ASA_SERVICE_RUNTIME_SUBNET_NAME \
259+
--route-table $SERVICE_RUNTIME_ROUTE_TABLE_NAME
185260
186261
```
187262

@@ -207,7 +282,13 @@ az role assignment create \
207282
The following example shows how to create a UDR Azure Spring Apps instance.
208283

209284
```azurecli
210-
az spring create -n $ASA_NAME -g $RG --vnet $VNET_NAME --app-subnet $ASA_APP_SUBNET_NAME --service-runtime-subnet $ASA_SERVICE_RUNTIME_SUBNET_NAME --outbound-type userDefinedRouting
285+
az spring create \
286+
--name $ASA_NAME \
287+
--resource-group $RG \
288+
--vnet $VNET_NAME \
289+
--app-subnet $ASA_APP_SUBNET_NAME \
290+
--service-runtime-subnet $ASA_SERVICE_RUNTIME_SUBNET_NAME \
291+
--outbound-type userDefinedRouting
211292
```
212293

213294
You can now access the public IP of the firewall from the internet. The firewall will route traffic into Azure Spring Apps subnets according to your routing rules.

0 commit comments

Comments
 (0)