Skip to content

Commit ca1e245

Browse files
author
Basel Rustum
authored
Add a default value for environmentName (#17309)
1 parent daa7356 commit ca1e245

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

sdk/timeseriesinsights/Azure.Iot.TimeSeriesInsights/tests/prerequisites/setup.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ az deployment group create --resource-group $ResourceGroup --name $($Environment
124124

125125
# Even though the output variable names are all capital letters in the script, ARM turns them into a strange casing
126126
# and we have to use that casing in order to get them from the deployment outputs.
127-
$dataAccessFqdn = az deployment group show -g $ResourceGroup -n $($EnvironmentName.ToLower()) --query 'properties.outputs.dataAccessFQDN.value' --output tsv
127+
$dataAccessFqdn = az deployment group show -g $ResourceGroup -n $($EnvironmentName.ToLower()) --query 'properties.outputs.TIMESERIESINSIGHTS_URL.value' --output tsv
128128

129129
Write-Host("`nSet a new client secret for $appId`n")
130130
$appSecret = az ad app credential reset --id $appId --years 2 --query 'password' --output tsv

sdk/timeseriesinsights/test-resources.bicep

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ param environmentName string {
2323
description: 'Name of the environment. The name cannot include: \'<\', \'>\', \'%\', \'&\', \':\', \'\\\', \'?\', \'/\' and any control characters. All other characters are allowed.'
2424
}
2525
maxLength: 90
26+
default: concat(az.resourceGroup().name, '-TSI')
2627
}
2728

2829
param consumerGroupName string {
@@ -173,4 +174,4 @@ resource storageaccount 'Microsoft.Storage/storageAccounts@2018-11-01' = {
173174
properties: {}
174175
}
175176

176-
output dataAccessFQDN string = '${environment.properties.dataAccessFqdn}'
177+
output TIMESERIESINSIGHTS_URL string = '${environment.properties.dataAccessFqdn}'

sdk/timeseriesinsights/test-resources.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"maxLength": 90,
2828
"metadata": {
2929
"description": "Name of the environment. The name cannot include: '<', '>', '%', '&', ':', '\\', '?', '/' and any control characters. All other characters are allowed."
30-
}
30+
},
31+
"defaultValue": "[concat(resourceGroup().name, '-TSI')]"
3132
},
3233
"consumerGroupName": {
3334
"type": "string",
@@ -190,7 +191,7 @@
190191
}
191192
],
192193
"outputs": {
193-
"dataAccessFQDN": {
194+
"TIMESERIESINSIGHTS_URL": {
194195
"type": "string",
195196
"value": "[reference(resourceId('Microsoft.TimeSeriesInsights/environments', parameters('environmentName'))).dataAccessFqdn]"
196197
}

0 commit comments

Comments
 (0)