Skip to content

Commit 184a8f0

Browse files
authored
Merge pull request #518 from KelvinTegelaar/dev
[pull] dev from KelvinTegelaar:dev
2 parents f419476 + 8f52bcf commit 184a8f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecApiClient.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function Invoke-ExecApiClient {
101101
'GetAzureConfiguration' {
102102
$Owner = $env:WEBSITE_OWNER_NAME
103103
Write-Information "Owner: $Owner"
104-
if ($Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
104+
if ($env:WEBSITE_SKU -ne 'FlexConsumption' -and $Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
105105
$RGName = $Matches.RGName
106106
} else {
107107
$RGName = $env:WEBSITE_RESOURCE_GROUP
@@ -123,7 +123,7 @@ function Invoke-ExecApiClient {
123123
'SaveToAzure' {
124124
$TenantId = $env:TenantID
125125
$Owner = $env:WEBSITE_OWNER_NAME
126-
if ($Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
126+
if ($env:WEBSITE_SKU -ne 'FlexConsumption' -and $Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
127127
$RGName = $Matches.RGName
128128
} else {
129129
$RGName = $env:WEBSITE_RESOURCE_GROUP

Modules/CIPPCore/Public/Entrypoints/HTTP Functions/CIPP/Settings/Invoke-ExecBackendURLs.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Function Invoke-ExecBackendURLs {
1+
function Invoke-ExecBackendURLs {
22
<#
33
.FUNCTIONALITY
44
Entrypoint
@@ -14,7 +14,7 @@ Function Invoke-ExecBackendURLs {
1414
Write-Host 'PowerShell HTTP trigger function processed a request.'
1515

1616
$Owner = $env:WEBSITE_OWNER_NAME
17-
if ($Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
17+
if ($env:WEBSITE_SKU -ne 'FlexConsumption' -and $Owner -match '^(?<SubscriptionId>[^+]+)\+(?<RGName>[^-]+(?:-[^-]+)*?)(?:-[^-]+webspace(?:-Linux)?)?$') {
1818
$RGName = $Matches.RGName
1919
} else {
2020
$RGName = $env:WEBSITE_RESOURCE_GROUP

0 commit comments

Comments
 (0)