Skip to content

Commit 78b6ae9

Browse files
authored
Merge pull request #48 from cloudgraphdev/fix/azure-format-fixes-2
fix: initialization bugfixes
2 parents 10e73a0 + 073b716 commit 78b6ae9

File tree

3 files changed

+12
-15
lines changed

3 files changed

+12
-15
lines changed

src/services/appServiceWebApp/data.ts

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,8 @@ export default async ({
6464
client.appServicePlans.listWebApps(resourceGroupId, name)
6565
for await (const webApp of webAppsIterable) {
6666
if (webApp) {
67-
const {
68-
location,
69-
extendedLocation,
70-
identity,
71-
tags,
72-
...rest
73-
} = webApp
67+
const { location, extendedLocation, identity, tags, ...rest } =
68+
webApp
7469
const region = lowerCaseLocation(location)
7570
return {
7671
...rest,
@@ -102,12 +97,14 @@ export default async ({
10297
name: webAppName,
10398
resourceGroup: webAppResourceGroupName,
10499
}) => {
105-
const siteAuthSetting = await client.webApps.getAuthSettings(
106-
webAppResourceGroupName,
107-
webAppName
108-
)
109-
if (siteAuthSetting) {
110-
siteAuthSettings[webAppName] = siteAuthSetting
100+
if (webAppResourceGroupName && webAppName) {
101+
const siteAuthSetting = await client.webApps.getAuthSettings(
102+
webAppResourceGroupName,
103+
webAppName
104+
)
105+
if (siteAuthSetting) {
106+
siteAuthSettings[webAppName] = siteAuthSetting
107+
}
111108
}
112109
}
113110
)

src/services/appServiceWebApp/format.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ export default ({
196196
storageAccountRequired,
197197
keyVaultReferenceIdentity,
198198
virtualNetworkSubnetId,
199-
siteAuthSettings,
199+
siteAuthSettings = { enabled: false },
200200
} = service
201201

202202
return {

src/services/containerRegistry/format.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default ({
1818
type,
1919
Tags,
2020
sku = {},
21-
identity: { userAssignedIdentities, ...restOfIdentity },
21+
identity: { userAssignedIdentities, ...restOfIdentity } = {},
2222
loginServer,
2323
creationDate,
2424
provisioningState,

0 commit comments

Comments
 (0)