зеркало из https://github.com/microsoft/AzureTRE.git
Use Azure environment in local deployment (#3367)
This commit is contained in:
Родитель
3b4a0bac18
Коммит
ab78cd7dee
1
Makefile
1
Makefile
|
@ -364,6 +364,7 @@ auth:
|
|||
|
||||
show-core-output:
|
||||
$(call target_title,"Display TRE core output") \
|
||||
&& . ${MAKEFILE_DIR}/devops/scripts/check_dependencies.sh env \
|
||||
&& pushd ${MAKEFILE_DIR}/core/terraform/ > /dev/null && terraform show && popd > /dev/null
|
||||
|
||||
api-healthcheck:
|
||||
|
|
|
@ -16,11 +16,6 @@
|
|||
"pattern": "^[a-zA-Z 0-9\\_]*$",
|
||||
"maxLength": 11
|
||||
},
|
||||
"arm_environment": {
|
||||
"description": "The Azure environment where resources will be deployed.",
|
||||
"type": "string",
|
||||
"enum": ["public", "usgovernment"]
|
||||
},
|
||||
"management": {
|
||||
"description": "Management configuration",
|
||||
"type": "object",
|
||||
|
@ -163,7 +158,6 @@
|
|||
},
|
||||
"required": [
|
||||
"location",
|
||||
"tre_id",
|
||||
"arm_environment"
|
||||
"tre_id"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -66,11 +66,18 @@ else
|
|||
# shellcheck disable=SC2046
|
||||
export $(yq e "$GET_LEAF_KEYS|$TF_KEYS| $FORMAT_FOR_ENV_EXPORT" config.yaml)
|
||||
|
||||
# Source AZURE_ENVIRONMENT and setup the ARM_ENVIRONMENT based on it
|
||||
AZURE_ENVIRONMENT=$(az cloud show --query name --output tsv)
|
||||
export AZURE_ENVIRONMENT
|
||||
|
||||
declare -A cloudapp_endpoint_suffix=( ["public"]="cloudapp.azure.com" ["usgovernment"]="cloudapp.usgovcloudapi.net")
|
||||
export TRE_URL=${TRE_URL:-https://${TRE_ID}.${LOCATION}.${cloudapp_endpoint_suffix[${ARM_ENVIRONMENT}]}}
|
||||
declare -A arm_environments=( ["AzureCloud"]="public" ["AzureUSGovernment"]="usgovernment")
|
||||
declare -A cloudapp_endpoint_suffix=( ["AzureCloud"]="cloudapp.azure.com" ["AzureUSGovernment"]="cloudapp.usgovcloudapi.net")
|
||||
|
||||
# The ARM Environment is required by terrafform to indicate the destination cloud.
|
||||
export ARM_ENVIRONMENT="${arm_environments[${AZURE_ENVIRONMENT}]}"
|
||||
export TF_VAR_arm_environment="${arm_environments[${AZURE_ENVIRONMENT}]}"
|
||||
|
||||
export TRE_URL=${TRE_URL:-https://${TRE_ID}.${LOCATION}.${cloudapp_endpoint_suffix[${AZURE_ENVIRONMENT}]}}
|
||||
fi
|
||||
|
||||
set +o nounset
|
||||
|
|
Загрузка…
Ссылка в новой задаче