Azure / Azure/SAP-automation-samples

[BUG] Deployer based on SLES 15 SP5 - Cloned repository files show Windows line breaks

Open
#60 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jinja
Stars
23
Forks
39
Avg merge
3m
Merged PRs (30d)
1

Description

Doc: https://learn.microsoft.com/en-us/azure/sap/automation/deploy-control-plane?tabs=linux#deploy-the-control-plane-1

After executing:

git clone https://github.com/Azure/sap-automation-samples.git samples

At least the file(s) used for the "Workload Zone" deployment showing the "^M" carriage-return character.
Those Windows line breaks are causing the deployment of the workload zone to fail because the "Deployment region code:" will be shown as an empty string

```
azureadm@mgmtweeudep00deploy00:~/Azure_SAP_Automated_Deployment/WORKSPACES/LANDSCAPE/DEV-WEEU-SAP01-INFRASTRUCTURE> $SAP_AUTOMATION_REPO_PATH/deploy/scripts/install_workloadzone.sh \
--parameterfile "${parameterFile}" \
--deployer_environment "${deployer_env_code}" \
--deployer_tfstate_key "${deployerState}" \
--keyvault "${key_vault}" \
--storageaccountname "${tfstate_storage_account}" \
--subscription "${ARM_SUBSCRIPTION_ID}" \
--spn_id "${ARM_CLIENT_ID}" \
--spn_secret "${ARM_CLIENT_SECRET}" \
--tenant_id "${ARM_TENANT_ID}" \
--state_subscription "${STATE_SUBSCRIPTION}" \
--auto-approve

Output:

Deployer environment: MGMT
Validating DEV-WEEU-SAP01-INFRASTRUCTURE.tfvars
Deployment region: westeurope
Deployment region code:
```





The expected output running the "install_workloadzone.sh" script would be:

` Deployment region code: WEEU`






azureadm@mgmtweeudep00deploy00:~> cat -v ~/Azure_SAP_Automated_Deployment/WORKSPACES/LANDSCAPE/DEV-WEEU-SAP01-INFRASTRUCTURE/DEV-WEEU-SAP01-INFRASTRUCTURE.tfvars

```
^M
#########################################################################################^M
# #^M
# This sample defines a deployment that will create the networks and their subnets #^M
# #^M
#########################################################################################^M
^M
#########################################################################################^M
# #^M
# The automation framework supports both creating resources (greenfield) or using #^M
# existing resources (brownfield). #^M
# #^M
# For the greenfield scenario the automation defines default names for resources, #^M
# if there is a XXXXname variable then the name is customizable. #^M
# #^M
# For the brownfield scenario the Azure resource identifiers for the resources must #^M
# be specified. #^M
# #^M
#########################################################################################^M
^M
#########################################################################################^M
# #^M
# Environment definitions #^M
# #^M
#########################################################################################^M
^M
# The environment value is a mandatory field, it is used for partitioning the environments, for example (PROD and NP)^M
environment = "DEV"^M
^M
# The location value is a mandatory field, it is used to control where the resources are deployed^M
location = "westeurope"^M
```

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the documented git clone on SLES 15 SP5, then inspect install_workloadzone.sh and the generated DEV-WEEU-SAP01-INFRASTRUCTURE.tfvars with cat -v. Trace how the location value is read and verify that cloned files use Unix line endings and install_workloadzone.sh reports "Deployment region code: WEEU".

Written by the indexing model from the issue text.

Assessment

Tech stack
git, linux, shell, terraform
Domain
devops, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.