@gradientedge/cdk-utils-azure 2.24.0 → 2.25.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.
|
@@ -51,7 +51,7 @@ export declare class CommonAzureConstruct extends ComponentResource {
|
|
|
51
51
|
storageManager: AzureStorageManager;
|
|
52
52
|
commonLogAnalyticsWorkspace: Workspace | Output<GetWorkspaceResult>;
|
|
53
53
|
constructor(name: string, props: CommonAzureStackProps, options?: ComponentResourceOptions);
|
|
54
|
-
protected resolveStack(
|
|
54
|
+
protected resolveStack(id: string, stackName?: string): pulumi.StackReference;
|
|
55
55
|
protected createResourceGroup(): void;
|
|
56
56
|
protected resolveCommonLogAnalyticsWorkspace(): void;
|
|
57
57
|
/**
|
|
@@ -73,11 +73,12 @@ export class CommonAzureConstruct extends ComponentResource {
|
|
|
73
73
|
this.storageManager = new AzureStorageManager();
|
|
74
74
|
this.determineFullyQualifiedDomain();
|
|
75
75
|
}
|
|
76
|
-
resolveStack(stackName) {
|
|
77
|
-
|
|
76
|
+
resolveStack(id, stackName) {
|
|
77
|
+
const name = stackName ?? id;
|
|
78
|
+
if (!name)
|
|
78
79
|
throw new Error('Stack name undefined');
|
|
79
|
-
return new pulumi.StackReference(
|
|
80
|
-
name
|
|
80
|
+
return new pulumi.StackReference(id, {
|
|
81
|
+
name,
|
|
81
82
|
});
|
|
82
83
|
}
|
|
83
84
|
createResourceGroup() {
|
|
@@ -82,7 +82,7 @@ export class AzureServiceBusManager {
|
|
|
82
82
|
duplicateDetectionHistoryTimeWindow: props.duplicateDetectionHistoryTimeWindow ?? 'PT1M',
|
|
83
83
|
requiresDuplicateDetection: props.requiresDuplicateDetection ?? true,
|
|
84
84
|
deadLetteringOnMessageExpiration: props.deadLetteringOnMessageExpiration ?? true,
|
|
85
|
-
defaultMessageTimeToLive: props.
|
|
85
|
+
defaultMessageTimeToLive: props.defaultMessageTimeToLive ?? 'P14D',
|
|
86
86
|
requiresSession: props.requiresSession ?? false,
|
|
87
87
|
enablePartitioning: props.enablePartitioning ?? false,
|
|
88
88
|
}, { parent: scope, ...resourceOptions });
|
|
@@ -51,18 +51,21 @@ export class AzureStorageManager {
|
|
|
51
51
|
...props.tags,
|
|
52
52
|
},
|
|
53
53
|
}, { parent: scope, ...resourceOptions });
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
.
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
54
|
+
if (!props.skipBlobServiceProperties) {
|
|
55
|
+
new BlobServiceProperties(`${id}-blob-props`, {
|
|
56
|
+
...props.blobProperties,
|
|
57
|
+
blobServicesName: 'default',
|
|
58
|
+
accountName: scope.resourceNameFormatter
|
|
59
|
+
.format(props.accountName?.toString(), scope.props.resourceNameOptions?.storageAccount)
|
|
60
|
+
.replace(/\W/g, '')
|
|
61
|
+
.toLowerCase(),
|
|
62
|
+
resourceGroupName,
|
|
63
|
+
deleteRetentionPolicy: props.blobProperties?.deleteRetentionPolicy ?? {
|
|
64
|
+
enabled: true,
|
|
65
|
+
days: 7,
|
|
66
|
+
},
|
|
67
|
+
}, { parent: scope, ...resourceOptions });
|
|
68
|
+
}
|
|
66
69
|
return storageAccount;
|
|
67
70
|
}
|
|
68
71
|
/**
|
|
@@ -99,9 +102,11 @@ export class AzureStorageManager {
|
|
|
99
102
|
const resourceGroupName = props.resourceGroupName ?? scope.resourceNameFormatter.format(scope.props.resourceGroupName);
|
|
100
103
|
return new Blob(`${id}-sb`, {
|
|
101
104
|
...props,
|
|
102
|
-
blobName:
|
|
105
|
+
blobName: props.skipBlobNameFormatting
|
|
106
|
+
? props.blobName
|
|
107
|
+
: scope.resourceNameFormatter.format(props.blobName?.toString(), scope.props.resourceNameOptions?.storageBlob),
|
|
103
108
|
accountName: props.accountName,
|
|
104
|
-
containerName:
|
|
109
|
+
containerName: props.containerName,
|
|
105
110
|
resourceGroupName,
|
|
106
111
|
}, { parent: scope, ...resourceOptions });
|
|
107
112
|
}
|
|
@@ -151,7 +156,7 @@ export class AzureStorageManager {
|
|
|
151
156
|
createManagementPolicy(id, scope, props, resourceOptions) {
|
|
152
157
|
if (!props)
|
|
153
158
|
throw new Error(`Props undefined for ${id}`);
|
|
154
|
-
return new ManagementPolicy(`${id}`, props, { parent: scope, ...resourceOptions });
|
|
159
|
+
return new ManagementPolicy(`${id}`, { ...props, managementPolicyName: 'default' }, { parent: scope, ...resourceOptions });
|
|
155
160
|
}
|
|
156
161
|
/**
|
|
157
162
|
* @summary Method to create a new storage table
|
|
@@ -3,12 +3,14 @@ import { BaseAzureConfigProps } from '../../types/index.js';
|
|
|
3
3
|
/** @category Interface */
|
|
4
4
|
export interface StorageAccountProps extends StorageAccountArgs {
|
|
5
5
|
blobProperties?: BlobServicePropertiesArgs;
|
|
6
|
+
skipBlobServiceProperties?: boolean;
|
|
6
7
|
}
|
|
7
8
|
/** @category Interface */
|
|
8
9
|
export interface StorageContainerProps extends BlobContainerArgs, BaseAzureConfigProps {
|
|
9
10
|
}
|
|
10
11
|
/** @category Interface */
|
|
11
12
|
export interface StorageBlobProps extends BaseAzureConfigProps, BlobArgs {
|
|
13
|
+
skipBlobNameFormatting?: boolean;
|
|
12
14
|
}
|
|
13
15
|
/** @category Interface */
|
|
14
16
|
export interface ManagementPolicyProps extends ManagementPolicyArgs {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils-azure",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"description": "Azure Pulumi utilities for @gradientedge/cdk-utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@pulumi/archive": "0.3.7",
|
|
18
|
-
"@pulumi/azure-native": "3.
|
|
18
|
+
"@pulumi/azure-native": "3.17.0",
|
|
19
19
|
"@pulumi/azuread": "6.9.0",
|
|
20
20
|
"@pulumi/pulumi": "3.231.0",
|
|
21
21
|
"@types/lodash": "4.17.24",
|