@gradientedge/cdk-utils-azure 1.0.1 → 2.1.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/README.md +30 -0
- package/dist/src/common/constants.d.ts +4 -0
- package/dist/src/common/constants.js +3 -0
- package/dist/src/common/construct.d.ts +2 -1
- package/dist/src/common/construct.js +4 -3
- package/dist/src/common/resource-name-formatter.d.ts +2 -1
- package/dist/src/common/resource-name-formatter.js +3 -2
- package/dist/src/common/stack.d.ts +2 -1
- package/dist/src/common/stack.js +5 -4
- package/dist/src/common/tagging.d.ts +3 -0
- package/dist/src/common/tagging.js +3 -0
- package/dist/src/common/types.d.ts +5 -1
- package/dist/src/construct/event-handler/main.d.ts +2 -1
- package/dist/src/construct/event-handler/main.js +2 -1
- package/dist/src/construct/event-handler/types.d.ts +6 -0
- package/dist/src/construct/function-app/main.d.ts +2 -1
- package/dist/src/construct/function-app/main.js +4 -3
- package/dist/src/construct/function-app/types.d.ts +3 -0
- package/dist/src/construct/rest-api/main.d.ts +2 -1
- package/dist/src/construct/rest-api/main.js +2 -1
- package/dist/src/construct/rest-api/types.d.ts +3 -0
- package/dist/src/construct/rest-api-function/main.d.ts +2 -1
- package/dist/src/construct/rest-api-function/main.js +2 -1
- package/dist/src/construct/rest-api-function/types.d.ts +4 -0
- package/dist/src/construct/rest-api-with-cache/main.d.ts +2 -1
- package/dist/src/construct/rest-api-with-cache/main.js +2 -1
- package/dist/src/construct/rest-api-with-cache/types.d.ts +2 -0
- package/dist/src/construct/site-with-webapp/main.d.ts +2 -1
- package/dist/src/construct/site-with-webapp/main.js +4 -3
- package/dist/src/construct/site-with-webapp/types.d.ts +3 -0
- package/dist/src/services/api-management/main.d.ts +5 -8
- package/dist/src/services/api-management/main.js +14 -17
- package/dist/src/services/api-management/types.d.ts +17 -0
- package/dist/src/services/app-configuration/main.d.ts +2 -1
- package/dist/src/services/app-configuration/main.js +4 -3
- package/dist/src/services/app-configuration/types.d.ts +1 -0
- package/dist/src/services/app-service/main.d.ts +2 -1
- package/dist/src/services/app-service/main.js +6 -5
- package/dist/src/services/app-service/types.d.ts +3 -2
- package/dist/src/services/application-insights/main.d.ts +2 -1
- package/dist/src/services/application-insights/main.js +5 -4
- package/dist/src/services/application-insights/types.d.ts +2 -0
- package/dist/src/services/authorisation/constants.d.ts +1 -0
- package/dist/src/services/authorisation/constants.js +1 -0
- package/dist/src/services/authorisation/main.d.ts +2 -1
- package/dist/src/services/authorisation/main.js +3 -2
- package/dist/src/services/authorisation/types.d.ts +1 -0
- package/dist/src/services/cosmosdb/constants.d.ts +2 -0
- package/dist/src/services/cosmosdb/constants.js +2 -0
- package/dist/src/services/cosmosdb/main.d.ts +2 -1
- package/dist/src/services/cosmosdb/main.js +8 -7
- package/dist/src/services/cosmosdb/types.d.ts +4 -0
- package/dist/src/services/dns/main.d.ts +2 -1
- package/dist/src/services/dns/main.js +7 -6
- package/dist/src/services/dns/types.d.ts +4 -0
- package/dist/src/services/eventgrid/main.d.ts +2 -1
- package/dist/src/services/eventgrid/main.js +11 -10
- package/dist/src/services/eventgrid/types.d.ts +5 -0
- package/dist/src/services/function/main.d.ts +3 -2
- package/dist/src/services/function/main.js +10 -9
- package/dist/src/services/function/types.d.ts +3 -0
- package/dist/src/services/key-vault/main.d.ts +2 -1
- package/dist/src/services/key-vault/main.js +5 -4
- package/dist/src/services/key-vault/types.d.ts +2 -0
- package/dist/src/services/monitor/main.d.ts +2 -1
- package/dist/src/services/monitor/main.js +3 -2
- package/dist/src/services/monitor/types.d.ts +1 -0
- package/dist/src/services/operational-insights/main.d.ts +2 -1
- package/dist/src/services/operational-insights/main.js +5 -4
- package/dist/src/services/operational-insights/types.d.ts +2 -0
- package/dist/src/services/portal/error.d.ts +1 -0
- package/dist/src/services/portal/error.js +1 -0
- package/dist/src/services/portal/main.d.ts +2 -1
- package/dist/src/services/portal/main.js +4 -3
- package/dist/src/services/portal/renderer.d.ts +1 -0
- package/dist/src/services/portal/renderer.js +3 -2
- package/dist/src/services/portal/types.d.ts +7 -0
- package/dist/src/services/redis/main.d.ts +2 -1
- package/dist/src/services/redis/main.js +4 -3
- package/dist/src/services/redis/types.d.ts +1 -0
- package/dist/src/services/resource-group/main.d.ts +2 -1
- package/dist/src/services/resource-group/main.js +4 -3
- package/dist/src/services/resource-group/types.d.ts +1 -0
- package/dist/src/services/security-center/main.d.ts +2 -1
- package/dist/src/services/security-center/main.js +3 -2
- package/dist/src/services/security-center/types.d.ts +1 -0
- package/dist/src/services/servicebus/main.d.ts +2 -1
- package/dist/src/services/servicebus/main.js +8 -7
- package/dist/src/services/servicebus/types.d.ts +5 -0
- package/dist/src/services/storage/main.d.ts +2 -2
- package/dist/src/services/storage/main.js +7 -7
- package/dist/src/services/storage/types.d.ts +6 -0
- package/dist/src/types/index.d.ts +1 -0
- package/package.json +14 -3
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { DnsARecordProps, DnsCnameRecordProps, DnsTxtRecordProps, DnsZoneProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure DNS using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { DnsARecordProps, DnsCnameRecordProps, DnsTxtRecordProps, DnsZoneProps }
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureDnsManager {
|
|
22
23
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RecordSet, Zone } from '@pulumi/azure-native/dns/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure DNS using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { RecordSet, Zone } from '@pulumi/azure-native/dns/index.js';
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureDnsManager {
|
|
20
21
|
/**
|
|
@@ -27,13 +28,13 @@ export class AzureDnsManager {
|
|
|
27
28
|
*/
|
|
28
29
|
createDnsZone(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
// Get resource group name
|
|
32
33
|
const resourceGroupName = scope.props.resourceGroupName
|
|
33
34
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
34
35
|
: props.resourceGroupName;
|
|
35
36
|
if (!resourceGroupName)
|
|
36
|
-
throw `Resource group name undefined for ${id}
|
|
37
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
37
38
|
return new Zone(`${id}-dz`, {
|
|
38
39
|
...props,
|
|
39
40
|
zoneName: scope.resourceNameFormatter.format(props.zoneName?.toString(), scope.props.resourceNameOptions?.dnsZone),
|
|
@@ -54,7 +55,7 @@ export class AzureDnsManager {
|
|
|
54
55
|
*/
|
|
55
56
|
createDnsARecord(id, scope, props, resourceOptions) {
|
|
56
57
|
if (!props)
|
|
57
|
-
throw `Props undefined for ${id}
|
|
58
|
+
throw new Error(`Props undefined for ${id}`);
|
|
58
59
|
return new RecordSet(`${id}-da`, {
|
|
59
60
|
...props,
|
|
60
61
|
recordType: 'A',
|
|
@@ -74,7 +75,7 @@ export class AzureDnsManager {
|
|
|
74
75
|
*/
|
|
75
76
|
createDnsCnameRecord(id, scope, props, resourceOptions) {
|
|
76
77
|
if (!props)
|
|
77
|
-
throw `Props undefined for ${id}
|
|
78
|
+
throw new Error(`Props undefined for ${id}`);
|
|
78
79
|
return new RecordSet(`${id}-dc`, {
|
|
79
80
|
...props,
|
|
80
81
|
recordType: 'CNAME',
|
|
@@ -94,7 +95,7 @@ export class AzureDnsManager {
|
|
|
94
95
|
*/
|
|
95
96
|
createDnsTxtRecord(id, scope, props, resourceOptions) {
|
|
96
97
|
if (!props)
|
|
97
|
-
throw `Props undefined for ${id}
|
|
98
|
+
throw new Error(`Props undefined for ${id}`);
|
|
98
99
|
return new RecordSet(`${id}-dt`, {
|
|
99
100
|
...props,
|
|
100
101
|
recordType: 'TXT',
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import { RecordSetArgs, ZoneArgs } from '@pulumi/azure-native/dns/index.js';
|
|
2
|
+
/** @category Interface */
|
|
2
3
|
export interface DnsZoneProps extends ZoneArgs {
|
|
3
4
|
}
|
|
5
|
+
/** @category Interface */
|
|
4
6
|
export interface DnsARecordProps extends RecordSetArgs {
|
|
5
7
|
}
|
|
8
|
+
/** @category Interface */
|
|
6
9
|
export interface DnsCnameRecordProps extends RecordSetArgs {
|
|
7
10
|
}
|
|
11
|
+
/** @category Interface */
|
|
8
12
|
export interface DnsTxtRecordProps extends RecordSetArgs {
|
|
9
13
|
}
|
|
@@ -3,7 +3,7 @@ import { Output, ResourceOptions } from '@pulumi/pulumi';
|
|
|
3
3
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
4
4
|
import { EventgridEventSubscriptionProps, EventgridSystemTopicEventSubscriptionProps, EventgridSystemTopicProps, EventgridTopicProps, ResolveEventgridTopicProps } from './types.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Provides operations on Azure Event Grid using Pulumi
|
|
7
7
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
8
8
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
9
9
|
* @example
|
|
@@ -18,6 +18,7 @@ import { EventgridEventSubscriptionProps, EventgridSystemTopicEventSubscriptionP
|
|
|
18
18
|
* }
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
|
+
* @category Service
|
|
21
22
|
*/
|
|
22
23
|
export declare class AzureEventgridManager {
|
|
23
24
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventDeliverySchema, EventSubscription, getTopicOutput, SystemTopic, SystemTopicEventSubscription, Topic, } from '@pulumi/azure-native/eventgrid/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure Event Grid using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { EventDeliverySchema, EventSubscription, getTopicOutput, SystemTopic, Sy
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureEventgridManager {
|
|
20
21
|
/**
|
|
@@ -27,13 +28,13 @@ export class AzureEventgridManager {
|
|
|
27
28
|
*/
|
|
28
29
|
createEventgridTopic(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
// Get resource group name
|
|
32
33
|
const resourceGroupName = scope.props.resourceGroupName
|
|
33
34
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
34
35
|
: props.resourceGroupName;
|
|
35
36
|
if (!resourceGroupName)
|
|
36
|
-
throw `Resource group name undefined for ${id}
|
|
37
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
37
38
|
return new Topic(`${id}-et`, {
|
|
38
39
|
...props,
|
|
39
40
|
topicName: scope.resourceNameFormatter.format(props.topicName?.toString(), scope.props.resourceNameOptions?.eventGridTopic),
|
|
@@ -54,7 +55,7 @@ export class AzureEventgridManager {
|
|
|
54
55
|
*/
|
|
55
56
|
resolveEventgridTopic(id, scope, props, resourceOptions) {
|
|
56
57
|
if (!props)
|
|
57
|
-
throw `Props undefined for ${id}
|
|
58
|
+
throw new Error(`Props undefined for ${id}`);
|
|
58
59
|
return getTopicOutput({
|
|
59
60
|
topicName: scope.resourceNameFormatter.format(props.topicName?.toString(), scope.props.resourceNameOptions?.eventGridTopic),
|
|
60
61
|
resourceGroupName: scope.props.resourceGroupName
|
|
@@ -72,7 +73,7 @@ export class AzureEventgridManager {
|
|
|
72
73
|
*/
|
|
73
74
|
createEventgridSubscription(id, scope, props, resourceOptions) {
|
|
74
75
|
if (!props)
|
|
75
|
-
throw `Props undefined for ${id}
|
|
76
|
+
throw new Error(`Props undefined for ${id}`);
|
|
76
77
|
return new EventSubscription(`${id}-es`, {
|
|
77
78
|
...props,
|
|
78
79
|
eventSubscriptionName: scope.resourceNameFormatter.format(props.eventSubscriptionName?.toString(), scope.props.resourceNameOptions?.eventGridEventSubscription),
|
|
@@ -93,12 +94,12 @@ export class AzureEventgridManager {
|
|
|
93
94
|
*/
|
|
94
95
|
createEventgridSystemTopic(id, scope, props, resourceOptions) {
|
|
95
96
|
if (!props)
|
|
96
|
-
throw `Props undefined for ${id}
|
|
97
|
+
throw new Error(`Props undefined for ${id}`);
|
|
97
98
|
const resourceGroupName = scope.props.resourceGroupName
|
|
98
99
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
99
100
|
: props.resourceGroupName;
|
|
100
101
|
if (!resourceGroupName)
|
|
101
|
-
throw `Resource group name undefined for ${id}
|
|
102
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
102
103
|
return new SystemTopic(`${id}-est`, {
|
|
103
104
|
...props,
|
|
104
105
|
systemTopicName: scope.resourceNameFormatter.format(props.systemTopicName?.toString(), scope.props.resourceNameOptions?.eventGridSystemTopic),
|
|
@@ -120,12 +121,12 @@ export class AzureEventgridManager {
|
|
|
120
121
|
*/
|
|
121
122
|
createEventgridSystemTopicEventSubscription(id, scope, props, systemTopic, resourceOptions) {
|
|
122
123
|
if (!props)
|
|
123
|
-
throw `Props undefined for ${id}
|
|
124
|
-
|
|
124
|
+
throw new Error(`Props undefined for ${id}`);
|
|
125
|
+
const resourceGroupName = scope.props.resourceGroupName
|
|
125
126
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
126
127
|
: props.resourceGroupName;
|
|
127
128
|
if (!resourceGroupName)
|
|
128
|
-
throw `Resource group name undefined for ${id}
|
|
129
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
129
130
|
return new SystemTopicEventSubscription(`${id}-ests`, {
|
|
130
131
|
...props,
|
|
131
132
|
eventSubscriptionName: scope.resourceNameFormatter.format(props.eventSubscriptionName?.toString(), scope.props.resourceNameOptions?.eventGridSystemTopicEventSubscription),
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { EventSubscriptionArgs, GetTopicOutputArgs, SystemTopicArgs, SystemTopicEventSubscriptionArgs, TopicArgs } from '@pulumi/azure-native/eventgrid/index.js';
|
|
2
|
+
/** @category Interface */
|
|
2
3
|
export interface EventgridTopicProps extends TopicArgs {
|
|
3
4
|
}
|
|
5
|
+
/** @category Interface */
|
|
4
6
|
export interface EventgridEventSubscriptionProps extends EventSubscriptionArgs {
|
|
5
7
|
}
|
|
8
|
+
/** @category Interface */
|
|
6
9
|
export interface EventgridSystemTopicProps extends SystemTopicArgs {
|
|
7
10
|
}
|
|
11
|
+
/** @category Interface */
|
|
8
12
|
export interface EventgridSystemTopicEventSubscriptionProps extends SystemTopicEventSubscriptionArgs {
|
|
9
13
|
}
|
|
14
|
+
/** @category Interface */
|
|
10
15
|
export interface ResolveEventgridTopicProps extends GetTopicOutputArgs {
|
|
11
16
|
}
|
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { FunctionAppFlexConsumptionProps, FunctionAppProps, FunctionProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Functions using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { FunctionAppFlexConsumptionProps, FunctionAppProps, FunctionProps } from
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureFunctionManager {
|
|
22
23
|
/**
|
|
@@ -35,7 +36,7 @@ export declare class AzureFunctionManager {
|
|
|
35
36
|
* @param props function properties
|
|
36
37
|
* @param resourceOptions Optional settings to control resource behaviour
|
|
37
38
|
* @see [Pulumi Azure Native Function Envelope]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappfunction/}
|
|
38
|
-
*
|
|
39
|
+
* In Pulumi, individual functions are typically deployed via code deployment rather than as separate infrastructure resources.
|
|
39
40
|
* This method is provided for API compatibility but may require additional setup.
|
|
40
41
|
*/
|
|
41
42
|
createFunction(id: string, scope: CommonAzureConstruct, props: FunctionProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/web/webAppFunction.js").WebAppFunction;
|
|
@@ -2,7 +2,7 @@ import { Deployment, DeploymentMode, Resource } from '@pulumi/azure-native/resou
|
|
|
2
2
|
import { ManagedServiceIdentityType, WebApp, WebAppFunction } from '@pulumi/azure-native/web/index.js';
|
|
3
3
|
import { CommonAzureStack } from '../../common/index.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Functions using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { CommonAzureStack } from '../../common/index.js';
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export class AzureFunctionManager {
|
|
22
23
|
/**
|
|
@@ -29,13 +30,13 @@ export class AzureFunctionManager {
|
|
|
29
30
|
*/
|
|
30
31
|
createFunctionApp(id, scope, props, resourceOptions) {
|
|
31
32
|
if (!props)
|
|
32
|
-
throw `Props undefined for ${id}
|
|
33
|
+
throw new Error(`Props undefined for ${id}`);
|
|
33
34
|
// Get resource group name
|
|
34
35
|
const resourceGroupName = scope.props.resourceGroupName
|
|
35
36
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
36
37
|
: props.resourceGroupName;
|
|
37
38
|
if (!resourceGroupName)
|
|
38
|
-
throw `Resource group name undefined for ${id}
|
|
39
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
39
40
|
return new WebApp(`${id}-fa`, {
|
|
40
41
|
...props,
|
|
41
42
|
name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.linuxFunctionApp),
|
|
@@ -57,12 +58,12 @@ export class AzureFunctionManager {
|
|
|
57
58
|
* @param props function properties
|
|
58
59
|
* @param resourceOptions Optional settings to control resource behaviour
|
|
59
60
|
* @see [Pulumi Azure Native Function Envelope]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/web/webappfunction/}
|
|
60
|
-
*
|
|
61
|
+
* In Pulumi, individual functions are typically deployed via code deployment rather than as separate infrastructure resources.
|
|
61
62
|
* This method is provided for API compatibility but may require additional setup.
|
|
62
63
|
*/
|
|
63
64
|
createFunction(id, scope, props, resourceOptions) {
|
|
64
65
|
if (!props)
|
|
65
|
-
throw `Props undefined for ${id}
|
|
66
|
+
throw new Error(`Props undefined for ${id}`);
|
|
66
67
|
// Get resource group name
|
|
67
68
|
const resourceGroupName = scope.props.resourceGroupName
|
|
68
69
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
@@ -86,13 +87,13 @@ export class AzureFunctionManager {
|
|
|
86
87
|
*/
|
|
87
88
|
createFunctionAppFlexConsumption(id, scope, props, resourceOptions) {
|
|
88
89
|
if (!props)
|
|
89
|
-
throw `Props undefined for ${id}
|
|
90
|
+
throw new Error(`Props undefined for ${id}`);
|
|
90
91
|
// Get resource group name
|
|
91
92
|
const resourceGroupName = scope.props.resourceGroupName
|
|
92
93
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
93
94
|
: props.resourceGroupName;
|
|
94
95
|
if (!resourceGroupName)
|
|
95
|
-
throw `Resource group name undefined for ${id}
|
|
96
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
96
97
|
const functionApp = new WebApp(`${id}-fc`, {
|
|
97
98
|
...props,
|
|
98
99
|
name: scope.resourceNameFormatter.format(props.name, scope.props.resourceNameOptions?.functionApp),
|
|
@@ -178,13 +179,13 @@ export class AzureFunctionManager {
|
|
|
178
179
|
*/
|
|
179
180
|
createFunctionAppFlexConsumptionResource(id, scope, props, resourceOptions) {
|
|
180
181
|
if (!props)
|
|
181
|
-
throw `Props undefined for ${id}
|
|
182
|
+
throw new Error(`Props undefined for ${id}`);
|
|
182
183
|
// Get resource group name
|
|
183
184
|
const resourceGroupName = scope.props.resourceGroupName
|
|
184
185
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
185
186
|
: props.resourceGroupName;
|
|
186
187
|
if (!resourceGroupName)
|
|
187
|
-
throw `Resource group name undefined for ${id}
|
|
188
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
188
189
|
return new Resource(`${id}-fc`, {
|
|
189
190
|
apiVersion: '2024-04-01',
|
|
190
191
|
identity: {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { input } from '@pulumi/azure-native/types/index.js';
|
|
2
2
|
import { WebAppArgs } from '@pulumi/azure-native/web/index.js';
|
|
3
|
+
/** @category Interface */
|
|
3
4
|
export interface FunctionAppProps extends WebAppArgs {
|
|
4
5
|
name?: string;
|
|
5
6
|
}
|
|
7
|
+
/** @category Interface */
|
|
6
8
|
export interface FunctionProps {
|
|
7
9
|
name: string;
|
|
8
10
|
functionAppId: string;
|
|
@@ -11,6 +13,7 @@ export interface FunctionProps {
|
|
|
11
13
|
testData?: string;
|
|
12
14
|
enabled?: boolean;
|
|
13
15
|
}
|
|
16
|
+
/** @category Interface */
|
|
14
17
|
export interface FunctionAppFlexConsumptionProps extends WebAppArgs {
|
|
15
18
|
name?: string;
|
|
16
19
|
runtime?: input.web.FunctionsRuntimeArgs;
|
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { KeyVaultProps, SecretProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Key Vault using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { KeyVaultProps, SecretProps } from './types.js';
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureKeyVaultManager {
|
|
22
23
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { getVaultOutput, Secret, SkuFamily, SkuName, Vault } from '@pulumi/azure-native/keyvault/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure Key Vault using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { getVaultOutput, Secret, SkuFamily, SkuName, Vault } from '@pulumi/azure
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureKeyVaultManager {
|
|
20
21
|
/**
|
|
@@ -27,13 +28,13 @@ export class AzureKeyVaultManager {
|
|
|
27
28
|
*/
|
|
28
29
|
createKeyVault(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
// Get resource group name
|
|
32
33
|
const resourceGroupName = scope.props.resourceGroupName
|
|
33
34
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
34
35
|
: props.resourceGroupName;
|
|
35
36
|
if (!resourceGroupName)
|
|
36
|
-
throw `Resource group name undefined for ${id}
|
|
37
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
37
38
|
return new Vault(`${id}-kv`, {
|
|
38
39
|
...props,
|
|
39
40
|
vaultName: scope.resourceNameFormatter.format(props.vaultName?.toString(), scope.props.resourceNameOptions?.keyVault),
|
|
@@ -67,7 +68,7 @@ export class AzureKeyVaultManager {
|
|
|
67
68
|
*/
|
|
68
69
|
createKeyVaultSecret(id, scope, props, resourceOptions) {
|
|
69
70
|
if (!props)
|
|
70
|
-
throw `Props undefined for ${id}
|
|
71
|
+
throw new Error(`Props undefined for ${id}`);
|
|
71
72
|
return new Secret(`${id}`, props, { parent: scope, ...resourceOptions });
|
|
72
73
|
}
|
|
73
74
|
/**
|
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { MonitorDiagnosticSettingProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Monitor using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { MonitorDiagnosticSettingProps } from './types.js';
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureMonitorManager {
|
|
22
23
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DiagnosticSetting } from '@pulumi/azure-native/monitor/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure Monitor using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { DiagnosticSetting } from '@pulumi/azure-native/monitor/index.js';
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureMonitorManager {
|
|
20
21
|
/**
|
|
@@ -27,7 +28,7 @@ export class AzureMonitorManager {
|
|
|
27
28
|
*/
|
|
28
29
|
createMonitorDiagnosticSettings(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
return new DiagnosticSetting(`${id}-ds`, {
|
|
32
33
|
...props,
|
|
33
34
|
name: scope.resourceNameFormatter.format(props.name?.toString(), scope.props.resourceNameOptions?.monitorDiagnosticSetting),
|
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { WorkspaceProps, WorkspaceTableProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Log Analytics Workspace using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { WorkspaceProps, WorkspaceTableProps } from './types.js';
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureOperationalInsightsManager {
|
|
22
23
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Table, Workspace, WorkspaceSkuNameEnum } from '@pulumi/azure-native/operationalinsights/index.js';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Provides operations on Azure Log Analytics Workspace using Pulumi
|
|
4
4
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
5
5
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
6
6
|
* @example
|
|
@@ -15,6 +15,7 @@ import { Table, Workspace, WorkspaceSkuNameEnum } from '@pulumi/azure-native/ope
|
|
|
15
15
|
* }
|
|
16
16
|
* }
|
|
17
17
|
* ```
|
|
18
|
+
* @category Service
|
|
18
19
|
*/
|
|
19
20
|
export class AzureOperationalInsightsManager {
|
|
20
21
|
/**
|
|
@@ -27,13 +28,13 @@ export class AzureOperationalInsightsManager {
|
|
|
27
28
|
*/
|
|
28
29
|
createWorkspace(id, scope, props, resourceOptions) {
|
|
29
30
|
if (!props)
|
|
30
|
-
throw `Props undefined for ${id}
|
|
31
|
+
throw new Error(`Props undefined for ${id}`);
|
|
31
32
|
// Get resource group name
|
|
32
33
|
const resourceGroupName = scope.props.resourceGroupName
|
|
33
34
|
? scope.resourceNameFormatter.format(scope.props.resourceGroupName)
|
|
34
35
|
: props.resourceGroupName;
|
|
35
36
|
if (!resourceGroupName)
|
|
36
|
-
throw `Resource group name undefined for ${id}
|
|
37
|
+
throw new Error(`Resource group name undefined for ${id}`);
|
|
37
38
|
return new Workspace(`${id}-lw`, {
|
|
38
39
|
...props,
|
|
39
40
|
workspaceName: scope.resourceNameFormatter.format(props.workspaceName?.toString(), scope.props.resourceNameOptions?.logAnalyticsWorkspace),
|
|
@@ -58,7 +59,7 @@ export class AzureOperationalInsightsManager {
|
|
|
58
59
|
*/
|
|
59
60
|
createTable(id, scope, props, resourceOptions) {
|
|
60
61
|
if (!props)
|
|
61
|
-
throw `Props undefined for ${id}
|
|
62
|
+
throw new Error(`Props undefined for ${id}`);
|
|
62
63
|
return new Table(`${id}`, props, { parent: scope, ...resourceOptions });
|
|
63
64
|
}
|
|
64
65
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { TableArgs, WorkspaceArgs } from '@pulumi/azure-native/operationalinsights/index.js';
|
|
2
|
+
/** @category Interface */
|
|
2
3
|
export interface WorkspaceProps extends WorkspaceArgs {
|
|
3
4
|
}
|
|
5
|
+
/** @category Interface */
|
|
4
6
|
export interface WorkspaceTableProps extends TableArgs {
|
|
5
7
|
}
|
|
@@ -3,7 +3,7 @@ import { CommonAzureConstruct } from '../../index.js';
|
|
|
3
3
|
import { AzureDashboardRenderer } from './renderer.js';
|
|
4
4
|
import { PortalDashboardProps } from './types.js';
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Provides operations on Azure Portal Dashboards using Pulumi
|
|
7
7
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
8
8
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
9
9
|
* @example
|
|
@@ -18,6 +18,7 @@ import { PortalDashboardProps } from './types.js';
|
|
|
18
18
|
* }
|
|
19
19
|
* }
|
|
20
20
|
* ```
|
|
21
|
+
* @category Service
|
|
21
22
|
*/
|
|
22
23
|
export declare class AzurePortalManager {
|
|
23
24
|
/**
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Dashboard } from '@pulumi/azure-native/portal/index.js';
|
|
2
1
|
import fs from 'fs';
|
|
2
|
+
import { Dashboard } from '@pulumi/azure-native/portal/index.js';
|
|
3
3
|
import { AzureDashboardRenderer } from './renderer.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Portal Dashboards using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { AzureDashboardRenderer } from './renderer.js';
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export class AzurePortalManager {
|
|
22
23
|
/**
|
|
@@ -30,7 +31,7 @@ export class AzurePortalManager {
|
|
|
30
31
|
*/
|
|
31
32
|
createDashBoard(id, scope, props, renderer, resourceOptions) {
|
|
32
33
|
if (!props)
|
|
33
|
-
throw `Props undefined for ${id}
|
|
34
|
+
throw new Error(`Props undefined for ${id}`);
|
|
34
35
|
const resourceGroup = scope.resourceGroupManager.resolveResourceGroup(scope, props.resourceGroupName.toString() ?? scope.props.resourceGroupName, resourceOptions);
|
|
35
36
|
const dashboardName = scope.resourceNameFormatter.format(props.dashboardName?.toString(), scope.props.resourceNameOptions?.portalDashboard);
|
|
36
37
|
const dashboardRenderer = renderer ?? new AzureDashboardRenderer();
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import appRoot from 'app-root-path';
|
|
2
1
|
import fs from 'fs';
|
|
3
|
-
import _ from 'lodash';
|
|
4
2
|
import path from 'path';
|
|
3
|
+
import appRoot from 'app-root-path';
|
|
4
|
+
import _ from 'lodash';
|
|
5
5
|
import { parse } from 'yaml';
|
|
6
6
|
import { TemplateError } from './error.js';
|
|
7
|
+
/** @category Service */
|
|
7
8
|
export class AzureDashboardRenderer {
|
|
8
9
|
paneTemplatePath;
|
|
9
10
|
outputDir;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { DashboardArgs } from '@pulumi/azure-native/portal/index.js';
|
|
2
|
+
/** @category Interface */
|
|
2
3
|
export type PaneTemplate = {
|
|
3
4
|
dimensions: {
|
|
4
5
|
height: number;
|
|
@@ -7,30 +8,36 @@ export type PaneTemplate = {
|
|
|
7
8
|
variables: Record<string, string>;
|
|
8
9
|
template: string;
|
|
9
10
|
};
|
|
11
|
+
/** @category Interface */
|
|
10
12
|
export type MissingKeys = {
|
|
11
13
|
keys: Array<string>;
|
|
12
14
|
hasMissingKeys: boolean;
|
|
13
15
|
};
|
|
16
|
+
/** @category Interface */
|
|
14
17
|
export type Pane = {
|
|
15
18
|
id: string;
|
|
16
19
|
properties?: Record<string, string | number | Array<string | number>>;
|
|
17
20
|
};
|
|
21
|
+
/** @category Interface */
|
|
18
22
|
export type Filter = {
|
|
19
23
|
locale?: string;
|
|
20
24
|
timeFormat?: string;
|
|
21
25
|
timeGranularity?: string;
|
|
22
26
|
timeRelative?: string;
|
|
23
27
|
};
|
|
28
|
+
/** @category Interface */
|
|
24
29
|
export type RenderParams = {
|
|
25
30
|
panes: Array<Pane>;
|
|
26
31
|
variables: Record<string, any>;
|
|
27
32
|
properties?: Record<string, any>;
|
|
28
33
|
filter?: Filter;
|
|
29
34
|
};
|
|
35
|
+
/** @category Interface */
|
|
30
36
|
export interface DashboardRenderer {
|
|
31
37
|
render(params: RenderParams): string;
|
|
32
38
|
renderToFile(filename: string, params: RenderParams): string;
|
|
33
39
|
}
|
|
40
|
+
/** @category Interface */
|
|
34
41
|
export interface PortalDashboardProps extends DashboardArgs {
|
|
35
42
|
displayName: string;
|
|
36
43
|
panes: Array<Pane>;
|
|
@@ -2,7 +2,7 @@ import { ResourceOptions } from '@pulumi/pulumi';
|
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { RedisProps } from './types.js';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Provides operations on Azure Redis using Pulumi
|
|
6
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
7
7
|
* - If a custom construct extends {@link CommonAzureConstruct}, an instance is available within the context.
|
|
8
8
|
* @example
|
|
@@ -17,6 +17,7 @@ import { RedisProps } from './types.js';
|
|
|
17
17
|
* }
|
|
18
18
|
* }
|
|
19
19
|
* ```
|
|
20
|
+
* @category Service
|
|
20
21
|
*/
|
|
21
22
|
export declare class AzureRedisManager {
|
|
22
23
|
/**
|