@gradientedge/cdk-utils 10.6.0 → 10.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/api-destined-function/src/lib/lambda.d.ts +1 -0
- package/dist/app/api-destined-function/src/lib/lambda.d.ts.map +1 -0
- package/dist/app/api-destined-function/src/lib/lambda.js +1 -0
- package/dist/app/api-destined-function/src/lib/lambda.js.map +1 -0
- package/dist/app/api-destined-function/tsconfig.tsbuildinfo +1 -0
- package/dist/src/lib/aws/services/cloudwatch/main.d.ts +11 -11
- package/dist/src/lib/azure/common/constants.d.ts +74 -0
- package/dist/src/lib/azure/common/constants.js +77 -0
- package/dist/src/lib/azure/common/construct.d.ts +15 -3
- package/dist/src/lib/azure/common/construct.js +40 -4
- package/dist/src/lib/azure/common/stack.d.ts +3 -2
- package/dist/src/lib/azure/common/stack.js +25 -42
- package/dist/src/lib/azure/common/types.d.ts +13 -2
- package/dist/src/lib/azure/construct/event-handler/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/event-handler/index.js +2 -0
- package/dist/src/lib/azure/construct/event-handler/main.d.ts +20 -0
- package/dist/src/lib/azure/construct/event-handler/main.js +139 -0
- package/dist/src/lib/azure/construct/event-handler/types.d.ts +35 -0
- package/dist/src/lib/azure/construct/event-handler/types.js +1 -0
- package/dist/src/lib/azure/construct/function-app/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/function-app/index.js +2 -0
- package/dist/src/lib/azure/construct/function-app/main.d.ts +51 -0
- package/dist/src/lib/azure/construct/function-app/main.js +297 -0
- package/dist/src/lib/azure/construct/function-app/types.d.ts +33 -0
- package/dist/src/lib/azure/construct/function-app/types.js +1 -0
- package/dist/src/lib/azure/construct/index.d.ts +6 -0
- package/dist/src/lib/azure/construct/index.js +6 -0
- package/dist/src/lib/azure/construct/rest-api/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/rest-api/index.js +2 -0
- package/dist/src/lib/azure/construct/rest-api/main.d.ts +20 -0
- package/dist/src/lib/azure/construct/rest-api/main.js +172 -0
- package/dist/src/lib/azure/construct/rest-api/types.d.ts +25 -0
- package/dist/src/lib/azure/construct/rest-api/types.js +1 -0
- package/dist/src/lib/azure/construct/rest-api-function/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/rest-api-function/index.js +2 -0
- package/dist/src/lib/azure/construct/rest-api-function/main.d.ts +19 -0
- package/dist/src/lib/azure/construct/rest-api-function/main.js +255 -0
- package/dist/src/lib/azure/construct/rest-api-function/types.d.ts +29 -0
- package/dist/src/lib/azure/construct/rest-api-function/types.js +1 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/index.js +2 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/main.d.ts +12 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/main.js +56 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/types.d.ts +13 -0
- package/dist/src/lib/azure/construct/rest-api-with-cache/types.js +1 -0
- package/dist/src/lib/azure/construct/site-with-webapp/index.d.ts +2 -0
- package/dist/src/lib/azure/construct/site-with-webapp/index.js +2 -0
- package/dist/src/lib/azure/construct/site-with-webapp/main.d.ts +19 -0
- package/dist/src/lib/azure/construct/site-with-webapp/main.js +135 -0
- package/dist/src/lib/azure/construct/site-with-webapp/types.d.ts +30 -0
- package/dist/src/lib/azure/construct/site-with-webapp/types.js +1 -0
- package/dist/src/lib/azure/index.d.ts +1 -0
- package/dist/src/lib/azure/index.js +1 -0
- package/dist/src/lib/azure/services/api-management/main.d.ts +83 -5
- package/dist/src/lib/azure/services/api-management/main.js +114 -148
- package/dist/src/lib/azure/services/api-management/types.d.ts +22 -1
- package/dist/src/lib/azure/services/app-configuration/main.d.ts +13 -1
- package/dist/src/lib/azure/services/app-configuration/main.js +21 -2
- package/dist/src/lib/azure/services/app-service/main.d.ts +5 -2
- package/dist/src/lib/azure/services/app-service/main.js +12 -4
- package/dist/src/lib/azure/services/application-insights/main.d.ts +15 -4
- package/dist/src/lib/azure/services/application-insights/main.js +27 -6
- package/dist/src/lib/azure/services/application-insights/types.d.ts +4 -1
- package/dist/src/lib/azure/services/authorisation/constants.d.ts +13 -0
- package/dist/src/lib/azure/services/authorisation/constants.js +14 -0
- package/dist/src/lib/azure/services/authorisation/index.d.ts +3 -0
- package/dist/src/lib/azure/services/authorisation/index.js +3 -0
- package/dist/src/lib/azure/services/authorisation/main.d.ts +84 -0
- package/dist/src/lib/azure/services/authorisation/main.js +120 -0
- package/dist/src/lib/azure/services/authorisation/types.d.ts +3 -0
- package/dist/src/lib/azure/services/authorisation/types.js +1 -0
- package/dist/src/lib/azure/services/cosmosdb/constants.d.ts +8 -0
- package/dist/src/lib/azure/services/cosmosdb/constants.js +10 -0
- package/dist/src/lib/azure/services/cosmosdb/index.d.ts +1 -0
- package/dist/src/lib/azure/services/cosmosdb/index.js +1 -0
- package/dist/src/lib/azure/services/cosmosdb/main.d.ts +47 -5
- package/dist/src/lib/azure/services/cosmosdb/main.js +77 -8
- package/dist/src/lib/azure/services/cosmosdb/types.d.ts +3 -1
- package/dist/src/lib/azure/services/dns/main.d.ts +9 -4
- package/dist/src/lib/azure/services/dns/main.js +12 -8
- package/dist/src/lib/azure/services/eventgrid/main.d.ts +12 -7
- package/dist/src/lib/azure/services/eventgrid/main.js +18 -19
- package/dist/src/lib/azure/services/function/main.d.ts +16 -3
- package/dist/src/lib/azure/services/function/main.js +122 -8
- package/dist/src/lib/azure/services/function/types.d.ts +3 -4
- package/dist/src/lib/azure/services/index.d.ts +3 -0
- package/dist/src/lib/azure/services/index.js +3 -0
- package/dist/src/lib/azure/services/key-vault/main.d.ts +22 -2
- package/dist/src/lib/azure/services/key-vault/main.js +28 -3
- package/dist/src/lib/azure/services/key-vault/types.d.ts +3 -2
- package/dist/src/lib/azure/services/monitor/main.d.ts +3 -1
- package/dist/src/lib/azure/services/monitor/main.js +3 -2
- package/dist/src/lib/azure/services/operational-insights/main.d.ts +13 -2
- package/dist/src/lib/azure/services/operational-insights/main.js +17 -3
- package/dist/src/lib/azure/services/operational-insights/types.d.ts +3 -1
- package/dist/src/lib/azure/services/portal/error.d.ts +5 -0
- package/dist/src/lib/azure/services/portal/error.js +10 -0
- package/dist/src/lib/azure/services/portal/index.d.ts +4 -0
- package/dist/src/lib/azure/services/portal/index.js +4 -0
- package/dist/src/lib/azure/services/portal/main.d.ts +33 -0
- package/dist/src/lib/azure/services/portal/main.js +51 -0
- package/dist/src/lib/azure/services/portal/renderer.d.ts +11 -0
- package/dist/src/lib/azure/services/portal/renderer.js +156 -0
- package/dist/src/lib/azure/services/portal/types.d.ts +40 -0
- package/dist/src/lib/azure/services/portal/types.js +1 -0
- package/dist/src/lib/azure/services/redis/main.d.ts +4 -2
- package/dist/src/lib/azure/services/redis/main.js +3 -2
- package/dist/src/lib/azure/services/redis/types.d.ts +1 -1
- package/dist/src/lib/azure/services/resource-group/main.d.ts +10 -1
- package/dist/src/lib/azure/services/resource-group/main.js +17 -3
- package/dist/src/lib/azure/services/security-center/index.d.ts +2 -0
- package/dist/src/lib/azure/services/security-center/index.js +2 -0
- package/dist/src/lib/azure/services/security-center/main.d.ts +31 -0
- package/dist/src/lib/azure/services/security-center/main.js +33 -0
- package/dist/src/lib/azure/services/security-center/types.d.ts +3 -0
- package/dist/src/lib/azure/services/security-center/types.js +1 -0
- package/dist/src/lib/azure/services/servicebus/main.d.ts +28 -22
- package/dist/src/lib/azure/services/servicebus/main.js +31 -26
- package/dist/src/lib/azure/services/servicebus/types.d.ts +4 -4
- package/dist/src/lib/azure/services/storage/main.d.ts +26 -5
- package/dist/src/lib/azure/services/storage/main.js +51 -9
- package/dist/src/lib/azure/services/storage/types.d.ts +7 -2
- package/dist/src/lib/cloudflare/common/construct.js +1 -1
- package/dist/src/lib/cloudflare/common/stack.d.ts +2 -2
- package/dist/src/lib/cloudflare/common/stack.js +25 -25
- package/dist/src/lib/cloudflare/services/worker/main.js +8 -1
- package/dist/src/lib/cloudflare/services/worker/types.d.ts +1 -0
- package/package.json +26 -23
- package/src/lib/azure/common/constants.ts +83 -0
- package/src/lib/azure/common/construct.ts +50 -7
- package/src/lib/azure/common/stack.ts +26 -43
- package/src/lib/azure/common/types.ts +14 -2
- package/src/lib/azure/construct/event-handler/index.ts +2 -0
- package/src/lib/azure/construct/event-handler/main.ts +183 -0
- package/src/lib/azure/construct/event-handler/types.ts +49 -0
- package/src/lib/azure/construct/function-app/index.ts +2 -0
- package/src/lib/azure/construct/function-app/main.ts +410 -0
- package/src/lib/azure/construct/function-app/types.ts +45 -0
- package/src/lib/azure/construct/index.ts +6 -0
- package/src/lib/azure/construct/rest-api/index.ts +2 -0
- package/src/lib/azure/construct/rest-api/main.ts +205 -0
- package/src/lib/azure/construct/rest-api/types.ts +33 -0
- package/src/lib/azure/construct/rest-api-function/index.ts +2 -0
- package/src/lib/azure/construct/rest-api-function/main.ts +297 -0
- package/src/lib/azure/construct/rest-api-function/types.ts +39 -0
- package/src/lib/azure/construct/rest-api-with-cache/index.ts +2 -0
- package/src/lib/azure/construct/rest-api-with-cache/main.ts +75 -0
- package/src/lib/azure/construct/rest-api-with-cache/types.ts +15 -0
- package/src/lib/azure/construct/site-with-webapp/index.ts +2 -0
- package/src/lib/azure/construct/site-with-webapp/main.ts +160 -0
- package/src/lib/azure/construct/site-with-webapp/types.ts +33 -0
- package/src/lib/azure/index.ts +1 -0
- package/src/lib/azure/services/api-management/main.ts +168 -152
- package/src/lib/azure/services/api-management/types.ts +30 -1
- package/src/lib/azure/services/app-configuration/main.ts +29 -2
- package/src/lib/azure/services/app-service/main.ts +23 -4
- package/src/lib/azure/services/application-insights/main.ts +46 -7
- package/src/lib/azure/services/application-insights/types.ts +6 -2
- package/src/lib/azure/services/authorisation/constants.ts +13 -0
- package/src/lib/azure/services/authorisation/index.ts +3 -0
- package/src/lib/azure/services/authorisation/main.ts +202 -0
- package/src/lib/azure/services/authorisation/types.ts +3 -0
- package/src/lib/azure/services/cosmosdb/constants.ts +9 -0
- package/src/lib/azure/services/cosmosdb/index.ts +1 -0
- package/src/lib/azure/services/cosmosdb/main.ts +158 -8
- package/src/lib/azure/services/cosmosdb/types.ts +3 -0
- package/src/lib/azure/services/dns/main.ts +33 -8
- package/src/lib/azure/services/eventgrid/main.ts +41 -23
- package/src/lib/azure/services/function/main.ts +155 -9
- package/src/lib/azure/services/function/types.ts +3 -4
- package/src/lib/azure/services/index.ts +3 -0
- package/src/lib/azure/services/key-vault/main.ts +47 -4
- package/src/lib/azure/services/key-vault/types.ts +4 -4
- package/src/lib/azure/services/monitor/main.ts +5 -2
- package/src/lib/azure/services/operational-insights/main.ts +30 -4
- package/src/lib/azure/services/operational-insights/types.ts +3 -1
- package/src/lib/azure/services/portal/error.ts +12 -0
- package/src/lib/azure/services/portal/index.ts +4 -0
- package/src/lib/azure/services/portal/main.ts +81 -0
- package/src/lib/azure/services/portal/renderer.ts +182 -0
- package/src/lib/azure/services/portal/types.ts +45 -0
- package/src/lib/azure/services/redis/main.ts +10 -3
- package/src/lib/azure/services/redis/types.ts +1 -1
- package/src/lib/azure/services/resource-group/main.ts +34 -3
- package/src/lib/azure/services/security-center/index.ts +2 -0
- package/src/lib/azure/services/security-center/main.ts +42 -0
- package/src/lib/azure/services/security-center/types.ts +3 -0
- package/src/lib/azure/services/servicebus/main.ts +61 -30
- package/src/lib/azure/services/servicebus/types.ts +4 -4
- package/src/lib/azure/services/storage/main.ts +91 -9
- package/src/lib/azure/services/storage/types.ts +11 -2
- package/src/lib/cloudflare/common/construct.ts +1 -1
- package/src/lib/cloudflare/common/stack.ts +25 -25
- package/src/lib/cloudflare/services/worker/main.ts +10 -1
- package/src/lib/cloudflare/services/worker/types.ts +8 -1
- package/dist/lib/lambda.d.ts +0 -17
- package/dist/lib/lambda.d.ts.map +0 -1
- package/dist/lib/lambda.js +0 -28
- package/dist/lib/lambda.js.map +0 -1
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import * as archive from '@pulumi/archive'
|
|
2
|
+
import { getComponentOutput, GetComponentResult } from '@pulumi/azure-native/applicationinsights/index.js'
|
|
3
|
+
import { Output, ResourceOptions } from '@pulumi/pulumi'
|
|
4
|
+
import { writeFileSync } from 'fs'
|
|
5
|
+
import _ from 'lodash'
|
|
6
|
+
import * as path from 'path'
|
|
7
|
+
import { CommonAzureConstruct } from '../../common/index.js'
|
|
8
|
+
import { Site, SiteWithWebAppProps } from './types.js'
|
|
9
|
+
|
|
10
|
+
export class SiteWithWebApp extends CommonAzureConstruct {
|
|
11
|
+
props: SiteWithWebAppProps
|
|
12
|
+
applicationInsights: Output<GetComponentResult>
|
|
13
|
+
site: Site
|
|
14
|
+
|
|
15
|
+
constructor(id: string, props: SiteWithWebAppProps) {
|
|
16
|
+
super(id, props)
|
|
17
|
+
this.props = props
|
|
18
|
+
this.id = id
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public initResources() {
|
|
22
|
+
this.createResourceGroup()
|
|
23
|
+
this.resolveCommonLogAnalyticsWorkspace()
|
|
24
|
+
this.resolveApplicationInsights()
|
|
25
|
+
this.createSiteAppServicePlan()
|
|
26
|
+
this.createSiteStorageAccount()
|
|
27
|
+
this.createSiteStorageContainer()
|
|
28
|
+
this.createCodePackage()
|
|
29
|
+
this.createWebAppSiteConfig()
|
|
30
|
+
this.createWebApp()
|
|
31
|
+
this.createDiagnosticLog()
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
protected resolveApplicationInsights() {
|
|
35
|
+
if (!this.props.commonApplicationInsights || !this.props.commonApplicationInsights.resourceName) return
|
|
36
|
+
|
|
37
|
+
this.applicationInsights = getComponentOutput({
|
|
38
|
+
resourceName: this.props.commonApplicationInsights.resourceName,
|
|
39
|
+
resourceGroupName: this.props.commonApplicationInsights.resourceGroupName,
|
|
40
|
+
})
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
protected createSiteAppServicePlan() {
|
|
44
|
+
this.site.appServicePlan = this.appServiceManager.createAppServicePlan(`${this.id}-app-service-plan`, this, {
|
|
45
|
+
...this.props.site.appServicePlan,
|
|
46
|
+
location: this.resourceGroup.location,
|
|
47
|
+
resourceGroupName: this.resourceGroup.name,
|
|
48
|
+
})
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
protected createSiteStorageAccount() {
|
|
52
|
+
this.site.storageAccount = this.storageManager.createStorageAccount(`${this.id}-storage-account`, this, {
|
|
53
|
+
...this.props.site.storageAccount,
|
|
54
|
+
location: this.resourceGroup.location,
|
|
55
|
+
resourceGroupName: this.resourceGroup.name,
|
|
56
|
+
})
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
protected createSiteStorageContainer() {
|
|
60
|
+
this.site.storageContainer = this.storageManager.createStorageContainer(
|
|
61
|
+
`${this.id}-storage-deployment-container`,
|
|
62
|
+
this,
|
|
63
|
+
{
|
|
64
|
+
...this.props.site.storageContainer,
|
|
65
|
+
accountName: this.site.storageAccount.id,
|
|
66
|
+
resourceGroupName: this.resourceGroup.name,
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
protected createCodePackage() {
|
|
72
|
+
const currentDirectory = path.resolve()
|
|
73
|
+
|
|
74
|
+
if (this.props.startCommand) {
|
|
75
|
+
const packageJson = {
|
|
76
|
+
description: 'Generated',
|
|
77
|
+
name: this.id,
|
|
78
|
+
private: true,
|
|
79
|
+
scripts: {
|
|
80
|
+
start: this.props.startCommand,
|
|
81
|
+
},
|
|
82
|
+
version: '1.0.0',
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const packageJsonFile = `${currentDirectory}/${this.props.deploySource}/package.json`
|
|
86
|
+
writeFileSync(packageJsonFile, JSON.stringify(packageJson))
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
this.site.codeArchiveFile = archive.getFileOutput({
|
|
90
|
+
...this.props.site.codeArchiveFile,
|
|
91
|
+
excludes: this.props.site.codeArchiveFile.excludes ?? ['*.zip'],
|
|
92
|
+
outputPath: `${currentDirectory}/${this.props.deploySource}/${this.props.packageName}`,
|
|
93
|
+
sourceDir: `${currentDirectory}/${this.props.deploySource}`,
|
|
94
|
+
type: this.props.site.codeArchiveFile.type ?? 'zip',
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
protected createWebAppSiteConfig() {
|
|
99
|
+
this.site.environmentVariables = {
|
|
100
|
+
APPINSIGHTS_INSTRUMENTATIONKEY: this.applicationInsights.instrumentationKey,
|
|
101
|
+
APPLICATIONINSIGHTS_CONNECTION_STRING: this.applicationInsights.connectionString,
|
|
102
|
+
ApplicationInsightsAgent_EXTENSION_VERSION: '~3',
|
|
103
|
+
OTEL_SDK_DISABLED: 'false',
|
|
104
|
+
BUILD_VERSION: '0.0.0',
|
|
105
|
+
STAGE: this.props.stage,
|
|
106
|
+
NODE_OPTIONS: this.props.nodeOptions,
|
|
107
|
+
NODE_ENV: this.props.nodeEnv ?? 'production',
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
protected createWebApp(resourceOptions?: ResourceOptions) {
|
|
112
|
+
this.site.webApp = this.appServiceManager.createLinuxWebApp(
|
|
113
|
+
`${this.id}-web-app`,
|
|
114
|
+
this,
|
|
115
|
+
{
|
|
116
|
+
...this.props.site.webApp,
|
|
117
|
+
location: this.resourceGroup.location,
|
|
118
|
+
resourceGroupName: this.resourceGroup.name,
|
|
119
|
+
serverFarmId: this.site.appServicePlan.id,
|
|
120
|
+
siteConfig: _.merge(this.props.site.webApp.siteConfig, {
|
|
121
|
+
appSettings: _.map(this.site.environmentVariables, (value, name) => ({ name, value })),
|
|
122
|
+
}),
|
|
123
|
+
},
|
|
124
|
+
{ ...resourceOptions }
|
|
125
|
+
)
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
protected createDiagnosticLog() {
|
|
129
|
+
this.monitorManager.createMonitorDiagnosticSettings(this.id, this, {
|
|
130
|
+
name: `${this.props.site.webApp.name}-webapp`,
|
|
131
|
+
resourceUri: this.site.webApp.id,
|
|
132
|
+
workspaceId: this.commonLogAnalyticsWorkspace.id,
|
|
133
|
+
logAnalyticsDestinationType: 'Dedicated',
|
|
134
|
+
logs: [
|
|
135
|
+
{
|
|
136
|
+
category: 'AppServiceAppLogs',
|
|
137
|
+
enabled: true,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
category: 'AppServiceConsoleLogs',
|
|
141
|
+
enabled: true,
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
category: 'AppServiceHTTPLogs',
|
|
145
|
+
enabled: true,
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
category: 'AppServicePlatformLogs',
|
|
149
|
+
enabled: true,
|
|
150
|
+
},
|
|
151
|
+
],
|
|
152
|
+
metrics: [
|
|
153
|
+
{
|
|
154
|
+
category: 'AllMetrics',
|
|
155
|
+
enabled: true,
|
|
156
|
+
},
|
|
157
|
+
],
|
|
158
|
+
})
|
|
159
|
+
}
|
|
160
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as archive from '@pulumi/archive'
|
|
2
|
+
import { GetFileOutputArgs } from '@pulumi/archive'
|
|
3
|
+
import { BlobContainer, StorageAccount } from '@pulumi/azure-native/storage/index.js'
|
|
4
|
+
import { AppServicePlan, WebApp } from '@pulumi/azure-native/web/index.js'
|
|
5
|
+
import { Output } from '@pulumi/pulumi'
|
|
6
|
+
import { CommonAzureStackProps } from '../../common/index.js'
|
|
7
|
+
import { LinuxWebAppProps, ServicePlanProps, StorageAccountProps, StorageContainerProps } from '../../services/index.js'
|
|
8
|
+
|
|
9
|
+
export interface SiteProps {
|
|
10
|
+
appServicePlan: ServicePlanProps
|
|
11
|
+
codeArchiveFile: GetFileOutputArgs
|
|
12
|
+
storageAccount: StorageAccountProps
|
|
13
|
+
storageContainer: StorageContainerProps
|
|
14
|
+
webApp: LinuxWebAppProps
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SiteWithWebAppProps extends CommonAzureStackProps {
|
|
18
|
+
deploySource: string
|
|
19
|
+
nodeOptions: string
|
|
20
|
+
nodeEnv?: string
|
|
21
|
+
packageName: string
|
|
22
|
+
site: SiteProps
|
|
23
|
+
startCommand: string
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface Site {
|
|
27
|
+
appServicePlan: AppServicePlan
|
|
28
|
+
codeArchiveFile: Output<archive.GetFileResult>
|
|
29
|
+
environmentVariables: Record<string, any>
|
|
30
|
+
storageAccount: StorageAccount
|
|
31
|
+
storageContainer: BlobContainer
|
|
32
|
+
webApp: WebApp
|
|
33
|
+
}
|
package/src/lib/azure/index.ts
CHANGED
|
@@ -1,25 +1,36 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Api,
|
|
3
|
+
ApiDiagnostic,
|
|
3
4
|
ApiManagementService,
|
|
4
5
|
ApiOperation,
|
|
5
6
|
ApiOperationPolicy,
|
|
7
|
+
ApiPolicy,
|
|
6
8
|
Backend,
|
|
7
9
|
BackendProtocol,
|
|
8
10
|
Cache,
|
|
9
11
|
getApiManagementServiceOutput,
|
|
10
12
|
Logger,
|
|
11
13
|
LoggerType,
|
|
12
|
-
|
|
14
|
+
NamedValue,
|
|
13
15
|
Protocol,
|
|
16
|
+
Subscription,
|
|
14
17
|
} from '@pulumi/azure-native/apimanagement/index.js'
|
|
15
18
|
import * as redis from '@pulumi/azure-native/redis/index.js'
|
|
16
|
-
import
|
|
19
|
+
import { ResourceOptions } from '@pulumi/pulumi'
|
|
17
20
|
import { CommonAzureConstruct } from '../../common/index.js'
|
|
18
21
|
import {
|
|
22
|
+
ApiDiagnosticProps,
|
|
19
23
|
ApiManagementApiProps,
|
|
20
24
|
ApiManagementBackendProps,
|
|
21
25
|
ApiManagementCustomDomainProps,
|
|
22
26
|
ApiManagementProps,
|
|
27
|
+
ApiOperationPolicyProps,
|
|
28
|
+
ApiOperationProps,
|
|
29
|
+
ApiPolicyProps,
|
|
30
|
+
ApiSubscriptionProps,
|
|
31
|
+
CacheProps,
|
|
32
|
+
LoggerProps,
|
|
33
|
+
NamedValueProps,
|
|
23
34
|
ResolveApiManagementProps,
|
|
24
35
|
} from './types.js'
|
|
25
36
|
|
|
@@ -48,6 +59,7 @@ export class AzureApiManagementManager {
|
|
|
48
59
|
* @param props API Management properties
|
|
49
60
|
* @param applicationInsightsKey Optional Application Insights instrumentation key for logging
|
|
50
61
|
* @param externalRedisCache Optional external Redis cache for API Management caching
|
|
62
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
51
63
|
* @see [Pulumi Azure Native API Management]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/apimanagementservice/}
|
|
52
64
|
*/
|
|
53
65
|
public createApiManagementService(
|
|
@@ -55,7 +67,8 @@ export class AzureApiManagementManager {
|
|
|
55
67
|
scope: CommonAzureConstruct,
|
|
56
68
|
props: ApiManagementProps,
|
|
57
69
|
applicationInsightsKey?: string,
|
|
58
|
-
externalRedisCache?: redis.Redis
|
|
70
|
+
externalRedisCache?: redis.Redis,
|
|
71
|
+
resourceOptions?: ResourceOptions
|
|
59
72
|
) {
|
|
60
73
|
if (!props) throw `Props undefined for ${id}`
|
|
61
74
|
|
|
@@ -82,7 +95,7 @@ export class AzureApiManagementManager {
|
|
|
82
95
|
environment: scope.props.stage,
|
|
83
96
|
},
|
|
84
97
|
},
|
|
85
|
-
{ parent: scope }
|
|
98
|
+
{ parent: scope, ...resourceOptions }
|
|
86
99
|
)
|
|
87
100
|
|
|
88
101
|
// Create logger if Application Insights key is provided
|
|
@@ -101,7 +114,7 @@ export class AzureApiManagementManager {
|
|
|
101
114
|
instrumentationKey: applicationInsightsKey,
|
|
102
115
|
},
|
|
103
116
|
},
|
|
104
|
-
{ parent: scope }
|
|
117
|
+
{ parent: scope, dependsOn: [apiManagementService] }
|
|
105
118
|
)
|
|
106
119
|
}
|
|
107
120
|
|
|
@@ -123,7 +136,7 @@ export class AzureApiManagementManager {
|
|
|
123
136
|
useFromLocation: externalRedisCache.location,
|
|
124
137
|
resourceId: externalRedisCache.id,
|
|
125
138
|
},
|
|
126
|
-
{ parent: scope }
|
|
139
|
+
{ parent: scope, dependsOn: apiManagementService }
|
|
127
140
|
)
|
|
128
141
|
}
|
|
129
142
|
|
|
@@ -135,9 +148,15 @@ export class AzureApiManagementManager {
|
|
|
135
148
|
* @param id scoped id of the resource
|
|
136
149
|
* @param scope scope in which this resource is defined
|
|
137
150
|
* @param props API Management lookup properties
|
|
151
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
138
152
|
* @see [Pulumi Azure Native API Management Lookup]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/apimanagementservice/}
|
|
139
153
|
*/
|
|
140
|
-
public resolveApiManagementService(
|
|
154
|
+
public resolveApiManagementService(
|
|
155
|
+
id: string,
|
|
156
|
+
scope: CommonAzureConstruct,
|
|
157
|
+
props: ResolveApiManagementProps,
|
|
158
|
+
resourceOptions?: ResourceOptions
|
|
159
|
+
) {
|
|
141
160
|
if (!props) throw `Props undefined for ${id}`
|
|
142
161
|
|
|
143
162
|
return getApiManagementServiceOutput(
|
|
@@ -150,7 +169,7 @@ export class AzureApiManagementManager {
|
|
|
150
169
|
? `${scope.props.resourceGroupName}-${scope.props.stage}`
|
|
151
170
|
: props.resourceGroupName,
|
|
152
171
|
},
|
|
153
|
-
{ parent: scope }
|
|
172
|
+
{ parent: scope, ...resourceOptions }
|
|
154
173
|
)
|
|
155
174
|
}
|
|
156
175
|
|
|
@@ -159,9 +178,15 @@ export class AzureApiManagementManager {
|
|
|
159
178
|
* @param id scoped id of the resource
|
|
160
179
|
* @param scope scope in which this resource is defined
|
|
161
180
|
* @param props API Management backend properties
|
|
181
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
162
182
|
* @see [Pulumi Azure Native API Management Backend]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/backend/}
|
|
163
183
|
*/
|
|
164
|
-
public createBackend(
|
|
184
|
+
public createBackend(
|
|
185
|
+
id: string,
|
|
186
|
+
scope: CommonAzureConstruct,
|
|
187
|
+
props: ApiManagementBackendProps,
|
|
188
|
+
resourceOptions?: ResourceOptions
|
|
189
|
+
) {
|
|
165
190
|
if (!props) throw `Props undefined for ${id}`
|
|
166
191
|
|
|
167
192
|
return new Backend(
|
|
@@ -175,7 +200,7 @@ export class AzureApiManagementManager {
|
|
|
175
200
|
description: props.description ?? `Backend for ${(props as any).name || id}-${scope.props.stage}`,
|
|
176
201
|
protocol: props.protocol ?? BackendProtocol.Http,
|
|
177
202
|
},
|
|
178
|
-
{ parent: scope }
|
|
203
|
+
{ parent: scope, ...resourceOptions }
|
|
179
204
|
)
|
|
180
205
|
}
|
|
181
206
|
|
|
@@ -184,9 +209,15 @@ export class AzureApiManagementManager {
|
|
|
184
209
|
* @param id scoped id of the resource
|
|
185
210
|
* @param scope scope in which this resource is defined
|
|
186
211
|
* @param props API Management API properties
|
|
212
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
187
213
|
* @see [Pulumi Azure Native API Management API]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/api/}
|
|
188
214
|
*/
|
|
189
|
-
public createApi(
|
|
215
|
+
public createApi(
|
|
216
|
+
id: string,
|
|
217
|
+
scope: CommonAzureConstruct,
|
|
218
|
+
props: ApiManagementApiProps,
|
|
219
|
+
resourceOptions?: ResourceOptions
|
|
220
|
+
) {
|
|
190
221
|
if (!props) throw `Props undefined for ${id}`
|
|
191
222
|
|
|
192
223
|
const api = new Api(
|
|
@@ -201,160 +232,146 @@ export class AzureApiManagementManager {
|
|
|
201
232
|
apiRevision: props.apiRevision ?? '1',
|
|
202
233
|
protocols: props.protocols ?? [Protocol.Https],
|
|
203
234
|
},
|
|
204
|
-
{ parent: scope }
|
|
235
|
+
{ parent: scope, ...resourceOptions }
|
|
205
236
|
)
|
|
206
237
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
const operationId = `${operation.displayName}-${operation.method}`
|
|
210
|
-
const apimOperation = new ApiOperation(
|
|
211
|
-
`${id}-apim-api-operation-${operation.displayName}-${operation.method}`,
|
|
212
|
-
{
|
|
213
|
-
operationId: operationId,
|
|
214
|
-
method: (operation.method as string)?.toUpperCase() || 'GET',
|
|
215
|
-
serviceName: props.serviceName!,
|
|
216
|
-
resourceGroupName: props.resourceGroupName!,
|
|
217
|
-
apiId: api.name,
|
|
218
|
-
displayName: operation.displayName,
|
|
219
|
-
urlTemplate: operation.urlTemplate,
|
|
220
|
-
templateParameters: operation.templateParameters,
|
|
221
|
-
},
|
|
222
|
-
{ parent: scope }
|
|
223
|
-
)
|
|
238
|
+
return api
|
|
239
|
+
}
|
|
224
240
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
241
|
+
/**
|
|
242
|
+
* @summary Method to create a new API Diagnostic
|
|
243
|
+
* @param id scoped id of the resource
|
|
244
|
+
* @param scope scope in which this resource is defined
|
|
245
|
+
* @param props API Disagnostic properties
|
|
246
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
247
|
+
* @see [Pulumi Azure Native API Management Diagnostic]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/apidiagnostic/}
|
|
248
|
+
*/
|
|
249
|
+
public createApiDiagnostic(
|
|
250
|
+
id: string,
|
|
251
|
+
scope: CommonAzureConstruct,
|
|
252
|
+
props: ApiDiagnosticProps,
|
|
253
|
+
resourceOptions?: ResourceOptions
|
|
254
|
+
) {
|
|
255
|
+
if (!props) throw `Props undefined for ${id}`
|
|
230
256
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<set-variable name="customCacheKey" value="@{
|
|
234
|
-
// Instance identification
|
|
257
|
+
return new ApiDiagnostic(`${id}`, props, { parent: scope, ...resourceOptions })
|
|
258
|
+
}
|
|
235
259
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
260
|
+
/**
|
|
261
|
+
* @summary Method to create a new API Logger
|
|
262
|
+
* @param id scoped id of the resource
|
|
263
|
+
* @param scope scope in which this resource is defined
|
|
264
|
+
* @param props API Logger properties
|
|
265
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
266
|
+
* @see [Pulumi Azure Native API Management Logger]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/logger/}
|
|
267
|
+
*/
|
|
268
|
+
public createLogger(id: string, scope: CommonAzureConstruct, props: LoggerProps, resourceOptions?: ResourceOptions) {
|
|
269
|
+
if (!props) throw `Props undefined for ${id}`
|
|
239
270
|
|
|
240
|
-
|
|
241
|
-
|
|
271
|
+
return new Logger(`${id}`, props, { parent: scope, ...resourceOptions })
|
|
272
|
+
}
|
|
242
273
|
|
|
243
|
-
|
|
244
|
-
|
|
274
|
+
/**
|
|
275
|
+
* @summary Method to create a new API Named Value
|
|
276
|
+
* @param id scoped id of the resource
|
|
277
|
+
* @param scope scope in which this resource is defined
|
|
278
|
+
* @param props API Named Value properties
|
|
279
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
280
|
+
* @see [Pulumi Azure Native API Management Named Value]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/namedvalue/}
|
|
281
|
+
*/
|
|
282
|
+
public createNamedValue(
|
|
283
|
+
id: string,
|
|
284
|
+
scope: CommonAzureConstruct,
|
|
285
|
+
props: NamedValueProps,
|
|
286
|
+
resourceOptions?: ResourceOptions
|
|
287
|
+
) {
|
|
288
|
+
if (!props) throw `Props undefined for ${id}`
|
|
245
289
|
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}" />
|
|
249
|
-
<set-variable name="bypassCache" value="@(context.Request.Headers.GetValueOrDefault("X-Cache-Bypass", "false").ToLower())" />`
|
|
290
|
+
return new NamedValue(`${id}`, props, { parent: scope, ...resourceOptions })
|
|
291
|
+
}
|
|
250
292
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
293
|
+
/**
|
|
294
|
+
* @summary Method to create a new API Subscription
|
|
295
|
+
* @param id scoped id of the resource
|
|
296
|
+
* @param scope scope in which this resource is defined
|
|
297
|
+
* @param props API Subscription properties
|
|
298
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
299
|
+
* @see [Pulumi Azure Native API Management Subscription]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/subscription/}
|
|
300
|
+
*/
|
|
301
|
+
public createSubscription(
|
|
302
|
+
id: string,
|
|
303
|
+
scope: CommonAzureConstruct,
|
|
304
|
+
props: ApiSubscriptionProps,
|
|
305
|
+
resourceOptions?: ResourceOptions
|
|
306
|
+
) {
|
|
307
|
+
if (!props) throw `Props undefined for ${id}`
|
|
256
308
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
<when condition="@(context.Variables.ContainsKey("cachedResponse"))">
|
|
260
|
-
<return-response>
|
|
261
|
-
<set-status code="200" reason="OK" />
|
|
262
|
-
<set-header name="Content-Type" exists-action="override">
|
|
263
|
-
<value>application/json</value>
|
|
264
|
-
</set-header>
|
|
265
|
-
<set-header name="X-Apim-Cache-Status" exists-action="override">
|
|
266
|
-
<value>HIT</value>
|
|
267
|
-
</set-header>
|
|
268
|
-
<set-header name="X-Apim-Cache-Key" exists-action="override">
|
|
269
|
-
<value>@((string)context.Variables["customCacheKey"])</value>
|
|
270
|
-
</set-header>
|
|
271
|
-
<set-body>@((string)context.Variables["cachedResponse"])</set-body>
|
|
272
|
-
</return-response>
|
|
273
|
-
</when>
|
|
274
|
-
</choose>
|
|
275
|
-
</when>
|
|
276
|
-
<when condition="@((string)context.Variables["bypassCache"] == "true")">
|
|
277
|
-
<cache-remove-value key="@((string)context.Variables["customCacheKey"])" caching-type="${operation.caching.cachingType || 'prefer-external'}" />
|
|
278
|
-
</when>
|
|
279
|
-
</choose>`
|
|
280
|
-
cacheSetOutboundPolicy = `<!-- Store the response body in cache -->
|
|
281
|
-
<choose>
|
|
282
|
-
<when condition="@(context.Response.StatusCode == 200)">
|
|
283
|
-
<cache-store-value key="@((string)context.Variables["customCacheKey"])" value="@(context.Response.Body.As<string>(preserveContent: true))" duration="${operation.caching.ttlInSecs ?? 900}" caching-type="${operation.caching.cachingType || 'prefer-external'}" />
|
|
284
|
-
<!-- Add cache status header -->
|
|
285
|
-
<set-header name="X-Apim-Cache-Status" exists-action="override">
|
|
286
|
-
<value>MISS</value>
|
|
287
|
-
</set-header>
|
|
288
|
-
</when>
|
|
289
|
-
</choose>
|
|
290
|
-
<!-- Add debug headers -->
|
|
291
|
-
<set-header name="X-Apim-Cache-Key" exists-action="override">
|
|
292
|
-
<value>@((string)context.Variables["customCacheKey"])</value>
|
|
293
|
-
</set-header>
|
|
294
|
-
<set-header name="X-Apim-API-Name" exists-action="override">
|
|
295
|
-
<value>@(context.Api.Name)</value>
|
|
296
|
-
</set-header>`
|
|
297
|
-
}
|
|
309
|
+
return new Subscription(`${id}`, props, { parent: scope, ...resourceOptions })
|
|
310
|
+
}
|
|
298
311
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
</when>
|
|
310
|
-
</choose>`
|
|
311
|
-
}
|
|
312
|
-
}
|
|
312
|
+
/**
|
|
313
|
+
* @summary Method to create a new API cache
|
|
314
|
+
* @param id scoped id of the resource
|
|
315
|
+
* @param scope scope in which this resource is defined
|
|
316
|
+
* @param props API cache properties
|
|
317
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
318
|
+
* @see [Pulumi Azure Native API Management Cache]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/cache/}
|
|
319
|
+
*/
|
|
320
|
+
public createCache(id: string, scope: CommonAzureConstruct, props: CacheProps, resourceOptions?: ResourceOptions) {
|
|
321
|
+
if (!props) throw `Props undefined for ${id}`
|
|
313
322
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
if (props.rateLimit && scope.props.subscriptionId) {
|
|
317
|
-
rateLimitPolicy = `<rate-limit-by-key calls="${props.rateLimit.calls}" renewal-period="${props.rateLimit.renewalPeriodInSecs}" counter-key="${scope.props.subscriptionId}-${operationId}"/>`
|
|
318
|
-
}
|
|
323
|
+
return new Cache(`${id}`, props, { parent: scope, ...resourceOptions })
|
|
324
|
+
}
|
|
319
325
|
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
</outbound>
|
|
337
|
-
<on-error>
|
|
338
|
-
<base />
|
|
339
|
-
</on-error>
|
|
340
|
-
</policies>`
|
|
326
|
+
/**
|
|
327
|
+
* @summary Method to create a new API operation
|
|
328
|
+
* @param id scoped id of the resource
|
|
329
|
+
* @param scope scope in which this resource is defined
|
|
330
|
+
* @param props API operation properties
|
|
331
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
332
|
+
* @see [Pulumi Azure Native API Management Operation]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/apioperation/}
|
|
333
|
+
*/
|
|
334
|
+
public createOperation(
|
|
335
|
+
id: string,
|
|
336
|
+
scope: CommonAzureConstruct,
|
|
337
|
+
props: ApiOperationProps,
|
|
338
|
+
resourceOptions?: ResourceOptions
|
|
339
|
+
) {
|
|
340
|
+
return new ApiOperation(`${id}`, props, { parent: scope, ...resourceOptions })
|
|
341
|
+
}
|
|
341
342
|
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
343
|
+
/**
|
|
344
|
+
* @summary Method to create a new API operation policy
|
|
345
|
+
* @param id scoped id of the resource
|
|
346
|
+
* @param scope scope in which this resource is defined
|
|
347
|
+
* @param props API operation policy properties
|
|
348
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
349
|
+
* @see [Pulumi Azure Native API Management Operation Policy]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/apioperationpolicy/}
|
|
350
|
+
*/
|
|
351
|
+
public createOperationPolicy(
|
|
352
|
+
id: string,
|
|
353
|
+
scope: CommonAzureConstruct,
|
|
354
|
+
props: ApiOperationPolicyProps,
|
|
355
|
+
resourceOptions?: ResourceOptions
|
|
356
|
+
) {
|
|
357
|
+
return new ApiOperationPolicy(`${id}`, props, { parent: scope, ...resourceOptions })
|
|
358
|
+
}
|
|
356
359
|
|
|
357
|
-
|
|
360
|
+
/**
|
|
361
|
+
* @summary Method to create a new API policy
|
|
362
|
+
* @param id scoped id of the resource
|
|
363
|
+
* @param scope scope in which this resource is defined
|
|
364
|
+
* @param props API policy properties
|
|
365
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
366
|
+
* @see [Pulumi Azure Native API Management Policy]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/apimanagement/apipolicy/}
|
|
367
|
+
*/
|
|
368
|
+
public createPolicy(
|
|
369
|
+
id: string,
|
|
370
|
+
scope: CommonAzureConstruct,
|
|
371
|
+
props: ApiPolicyProps,
|
|
372
|
+
resourceOptions?: ResourceOptions
|
|
373
|
+
) {
|
|
374
|
+
return new ApiPolicy(`${id}`, props, { parent: scope, ...resourceOptions })
|
|
358
375
|
}
|
|
359
376
|
|
|
360
377
|
/**
|
|
@@ -362,6 +379,7 @@ export class AzureApiManagementManager {
|
|
|
362
379
|
* @param id scoped id of the resource
|
|
363
380
|
* @param scope scope in which this resource is defined
|
|
364
381
|
* @param props API Management custom domain properties
|
|
382
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
365
383
|
* @note In Pulumi Azure Native, custom domains are configured as part of the API Management service resource,
|
|
366
384
|
* not as a separate resource. Use the hostnameConfigurations property when creating the service.
|
|
367
385
|
*/
|
|
@@ -370,8 +388,6 @@ export class AzureApiManagementManager {
|
|
|
370
388
|
scope: CommonAzureConstruct,
|
|
371
389
|
props: ApiManagementCustomDomainProps
|
|
372
390
|
) {
|
|
373
|
-
if (!props) throw `Props undefined for ${id}`
|
|
374
|
-
|
|
375
391
|
// Note: In Pulumi Azure Native, custom domains are part of the ApiManagementService
|
|
376
392
|
// This method is provided for API compatibility but should be configured
|
|
377
393
|
// via the hostnameConfigurations property of ApiManagementService instead
|