Skip to content

Commit 2d5f801

Browse files
Merge pull request #252770 from KimForss/main
Harmonize scripts
2 parents 996ed68 + fc3ebdb commit 2d5f801

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

articles/sap/automation/tutorial.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -170,11 +170,11 @@ When you choose a name for your service principal, make sure that the name is un
170170
1. Give the service principal Contributor and User Access Administrator permissions.
171171
172172
```cloudshell-interactive
173-
export subscriptionId="<subscriptionId>"
173+
export ARM_SUBSCRIPTION_ID="<subscriptionId>"
174174
export control_plane_env_code="MGMT"
175175
176176
az ad sp create-for-rbac --role="Contributor" \
177-
--scopes="/subscriptions/${subscriptionId}" \
177+
--scopes="/subscriptions/${ARM_SUBSCRIPTION_ID}" \
178178
--name="${control_plane_env_code}-Deployment-Account"
179179
```
180180
@@ -207,7 +207,7 @@ When you choose a name for your service principal, make sure that the name is un
207207
208208
az role assignment create --assignee ${appId} \
209209
--role "User Access Administrator" \
210-
--scope /subscriptions/${subscriptionId}
210+
--scope /subscriptions/${ARM_SUBSCRIPTION_ID}
211211
```
212212
213213
If you don't assign the User Access Administrator role to the service principal, you can't assign permissions by using the automation.
@@ -308,27 +308,27 @@ The sample SAP library configuration file `MGMT-NOEU-SAP_LIBRARY.tfvars` is in t
308308
309309
```bash
310310
311-
export subscriptionId="<subscriptionId>"
312-
export spn_id="<appId>"
313-
export spn_secret="<password>"
314-
export tenant_id="<tenantId>"
315-
export env_code="MGMT"
316-
export vnet_code="DEP00"
317-
export region_code="<region_code>"
311+
export ARM_SUBSCRIPTION_ID="<subscriptionId>"
312+
export ARM_CLIENT_ID="<appID>"
313+
export ARM_CLIENT_SECRET="<password>"
314+
export ARM_TENANT_ID="<tenant>"
315+
export env_code="MGMT"
316+
export vnet_code="DEP00"
317+
export region_code="<region_code>"
318318
319319
export DEPLOYMENT_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/sap-automation"
320320
export CONFIG_REPO_PATH="${HOME}/Azure_SAP_Automated_Deployment/WORKSPACES"
321-
export ARM_SUBSCRIPTION_ID="${subscriptionId}"
321+
322322
323323
cd $CONFIG_REPO_PATH
324324
325325
${DEPLOYMENT_REPO_PATH}/deploy/scripts/deploy_controlplane.sh \
326326
--deployer_parameter_file DEPLOYER/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE/${env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars \
327327
--library_parameter_file LIBRARY/${env_code}-${region_code}-SAP_LIBRARY/${env_code}-${region_code}-SAP_LIBRARY.tfvars \
328-
--subscription "${subscriptionId}" \
329-
--spn_id "${spn_id}" \
330-
--spn_secret "${spn_secret}" \
331-
--tenant_id "${tenant_id}" \
328+
--subscription "${ARM_SUBSCRIPTION_ID}" \
329+
--spn_id "${ARM_CLIENT_ID}" \
330+
--spn_secret "${ARM_CLIENT_SECRET}" \
331+
--tenant_id "${ARM_TENANT_ID}" \
332332
--auto-approve
333333
```
334334
@@ -837,14 +837,14 @@ Before you begin, sign in to your Azure account. Then, check that you're in the
837837
Go to the `DEV-NOEU-SAP01-X00` subfolder inside the `SYSTEM` folder. Then, run this command:
838838

839839
```bash
840-
export sap_env_code="DEV"
841-
export region_code="NOEU"
842-
export vnet_code="SAP01"
840+
export sap_env_code="DEV"
841+
export region_code="NOEU"
842+
export sap_vnet_code="SAP02"
843843
844-
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/${sap_env_code}-${region_code}-${vnet_code}-X00
844+
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES/SYSTEM/${sap_env_code}-${region_code}-${sap_vnet_code}-X00
845845
846846
${DEPLOYMENT_REPO_PATH}/deploy/scripts/remover.sh \
847-
--parameterfile "${sap_env_code}-${region_code}-${vnet_code}-X00.tfvars" \
847+
--parameterfile "${sap_env_code}-${region_code}-${sap_vnet_code}-X00.tfvars" \
848848
--type sap_system
849849
```
850850

@@ -854,14 +854,14 @@ Go to the `DEV-XXXX-SAP01-INFRASTRUCTURE` subfolder inside the `LANDSCAPE` folde
854854

855855
```bash
856856
857-
export sap_env_code="DEV"
858-
export region_code="NOEU"
859-
export vnet_code="SAP01"
857+
export sap_env_code="DEV"
858+
export region_code="NOEU"
859+
export sap_vnet_code="SAP01"
860860
861-
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES/LANDSCAPE/${sap_env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE
861+
cd ~/Azure_SAP_Automated_Deployment/WORKSPACES/LANDSCAPE/${sap_env_code}-${region_code}-${sap_vnet_code}-INFRASTRUCTURE
862862
863863
${DEPLOYMENT_REPO_PATH}/deploy/scripts/remover.sh \
864-
--parameterfile ${sap_env_code}-${region_code}-${vnet_code}-INFRASTRUCTURE.tfvars \
864+
--parameterfile ${sap_env_code}-${region_code}-${sap_vnet_code}-INFRASTRUCTURE.tfvars \
865865
--type sap_landscape
866866
```
867867

0 commit comments

Comments
 (0)