@gradientedge/cdk-utils-azure 2.52.1 → 2.53.1
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/src/services/eventgrid/main.d.ts +10 -1
- package/dist/src/services/eventgrid/main.js +18 -1
- package/dist/src/services/eventgrid/types.d.ts +8 -1
- package/dist/src/services/servicebus/main.d.ts +7 -0
- package/dist/src/services/servicebus/main.js +76 -10
- package/dist/src/services/servicebus/types.d.ts +45 -0
- package/dist/src/services/servicebus/types.js +11 -1
- package/dist/src/services/storage/main.d.ts +17 -1
- package/dist/src/services/storage/main.js +28 -1
- package/dist/src/services/storage/types.d.ts +15 -1
- package/package.json +2 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GetSystemTopicResult, SystemTopic } from '@pulumi/azure-native/eventgrid/index.js';
|
|
2
2
|
import { Output, ResourceOptions } from '@pulumi/pulumi';
|
|
3
3
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
4
|
-
import { EventgridEventSubscriptionProps, EventgridSystemTopicEventSubscriptionProps, EventgridSystemTopicProps, EventgridTopicProps, ResolveEventgridTopicProps } from './types.js';
|
|
4
|
+
import { EventgridEventSubscriptionProps, EventgridSystemTopicEventSubscriptionProps, EventgridSystemTopicProps, EventgridTopicProps, ResolveEventgridTopicProps, ResolveEventgridSystemTopicProps } 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.
|
|
@@ -67,4 +67,13 @@ export declare class AzureEventgridManager {
|
|
|
67
67
|
* @see [Pulumi Azure Native Event Grid System Topic Event Subscription]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/eventgrid/systemtopiceventsubscription/}
|
|
68
68
|
*/
|
|
69
69
|
createEventgridSystemTopicEventSubscription(id: string, scope: CommonAzureConstruct, props: EventgridSystemTopicEventSubscriptionProps, systemTopic: SystemTopic | Output<GetSystemTopicResult>, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/eventgrid/systemTopicEventSubscription.js").SystemTopicEventSubscription;
|
|
70
|
+
/**
|
|
71
|
+
* @summary Method to resolve an existing eventgrid system topic
|
|
72
|
+
* @param id scoped id of the resource
|
|
73
|
+
* @param scope scope in which this resource is defined
|
|
74
|
+
* @param props eventgrid system topic properties
|
|
75
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
76
|
+
* @see [Pulumi Azure Native Event Grid System Topic Lookup]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/eventgrid/getsystemtopic/}
|
|
77
|
+
*/
|
|
78
|
+
resolveEventgridSystemTopic(id: string, scope: CommonAzureConstruct, props: ResolveEventgridSystemTopicProps, resourceOptions?: ResourceOptions): Output<GetSystemTopicResult>;
|
|
70
79
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataResidencyBoundary, EventDeliverySchema, EventSubscription, getTopicOutput, SystemTopic, SystemTopicEventSubscription, TlsVersion, Topic, } from '@pulumi/azure-native/eventgrid/index.js';
|
|
1
|
+
import { DataResidencyBoundary, EventDeliverySchema, EventSubscription, getTopicOutput, getSystemTopicOutput, SystemTopic, SystemTopicEventSubscription, TlsVersion, 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.
|
|
@@ -126,4 +126,21 @@ export class AzureEventgridManager {
|
|
|
126
126
|
resourceGroupName,
|
|
127
127
|
}, { parent: scope, ...resourceOptions });
|
|
128
128
|
}
|
|
129
|
+
/**
|
|
130
|
+
* @summary Method to resolve an existing eventgrid system topic
|
|
131
|
+
* @param id scoped id of the resource
|
|
132
|
+
* @param scope scope in which this resource is defined
|
|
133
|
+
* @param props eventgrid system topic properties
|
|
134
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
135
|
+
* @see [Pulumi Azure Native Event Grid System Topic Lookup]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/eventgrid/getsystemtopic/}
|
|
136
|
+
*/
|
|
137
|
+
resolveEventgridSystemTopic(id, scope, props, resourceOptions) {
|
|
138
|
+
if (!props)
|
|
139
|
+
throw new Error(`Props undefined for ${id}`);
|
|
140
|
+
return getSystemTopicOutput({
|
|
141
|
+
systemTopicName: props.systemTopicName ??
|
|
142
|
+
scope.resourceNameFormatter.format(props.systemTopicName, scope.props.resourceNameOptions?.eventGridSystemTopic),
|
|
143
|
+
resourceGroupName: props.resourceGroupName ?? scope.resourceNameFormatter.format(scope.props.resourceGroupName),
|
|
144
|
+
}, { parent: scope, ...resourceOptions });
|
|
145
|
+
}
|
|
129
146
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventSubscriptionArgs, GetTopicOutputArgs, SystemTopicArgs, SystemTopicEventSubscriptionArgs, TopicArgs } from '@pulumi/azure-native/eventgrid/index.js';
|
|
1
|
+
import { EventSubscriptionArgs, GetSystemTopicOutputArgs, GetTopicOutputArgs, SystemTopicArgs, SystemTopicEventSubscriptionArgs, TopicArgs } from '@pulumi/azure-native/eventgrid/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Properties for creating an EventGrid topic
|
|
4
4
|
* @see [Pulumi Azure Native Event Grid Topic]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/eventgrid/topic/}
|
|
@@ -34,3 +34,10 @@ export interface EventgridSystemTopicEventSubscriptionProps extends SystemTopicE
|
|
|
34
34
|
*/
|
|
35
35
|
export interface ResolveEventgridTopicProps extends GetTopicOutputArgs {
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* Properties for resolving an existing EventGrid system topic
|
|
39
|
+
* @see [Pulumi Azure Native Event Grid System Topic]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/eventgrid/systemtopic/}
|
|
40
|
+
* @category Interface
|
|
41
|
+
*/
|
|
42
|
+
export interface ResolveEventgridSystemTopicProps extends GetSystemTopicOutputArgs {
|
|
43
|
+
}
|
|
@@ -29,6 +29,13 @@ export declare class AzureServiceBusManager {
|
|
|
29
29
|
* @see [Pulumi Azure Native Service Bus Namespace]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/service bus/namespace/}
|
|
30
30
|
*/
|
|
31
31
|
createServiceBusNamespace(id: string, scope: CommonAzureConstruct, props: ServiceBusNamespaceProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/servicebus/namespace.js").Namespace;
|
|
32
|
+
/**
|
|
33
|
+
* Provisions the geo-replication topology for a Service Bus namespace via an ARM
|
|
34
|
+
* deployment. The deployment PATCHes the existing namespace using the 2024-01-01
|
|
35
|
+
* Service Bus API version, which exposes the `geoDataReplication` property that is
|
|
36
|
+
* not yet surfaced by `@pulumi/azure-native`'s strongly-typed `Namespace` resource.
|
|
37
|
+
*/
|
|
38
|
+
private createServiceBusGeoReplicationDeployment;
|
|
32
39
|
/**
|
|
33
40
|
* @summary Method to create a new service bus topic
|
|
34
41
|
* @param id scoped id of the resource
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { Deployment, DeploymentMode } from '@pulumi/azure-native/resources/index.js';
|
|
1
2
|
import { getQueueOutput, ManagedServiceIdentityType, Namespace, Queue, QueueAuthorizationRule, SkuName, Subscription, Topic, } from '@pulumi/azure-native/servicebus/index.js';
|
|
3
|
+
import { all, output } from '@pulumi/pulumi';
|
|
2
4
|
/**
|
|
3
5
|
* Provides operations on Azure Servicebus using Pulumi
|
|
4
6
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
@@ -29,25 +31,89 @@ export class AzureServiceBusManager {
|
|
|
29
31
|
createServiceBusNamespace(id, scope, props, resourceOptions) {
|
|
30
32
|
if (!props)
|
|
31
33
|
throw new Error(`Props undefined for ${id}`);
|
|
34
|
+
const { enableGeoReplication, geoReplication, ...namespaceProps } = props;
|
|
35
|
+
if (enableGeoReplication && !geoReplication) {
|
|
36
|
+
throw new Error(`enableGeoReplication is true but geoReplication config is missing for ${id}`);
|
|
37
|
+
}
|
|
32
38
|
// Get resource group name
|
|
33
|
-
const resourceGroupName =
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
39
|
+
const resourceGroupName = namespaceProps.resourceGroupName ?? scope.resourceNameFormatter.format(scope.props.resourceGroupName);
|
|
40
|
+
const sku = namespaceProps.sku ?? { name: SkuName.Standard };
|
|
41
|
+
if (enableGeoReplication) {
|
|
42
|
+
// Geo-replication requires Premium. Callers pass `sku` as a literal SBSkuArgs in
|
|
43
|
+
// practice; validate synchronously so misconfiguration fails at construct time
|
|
44
|
+
// rather than during preview/up.
|
|
45
|
+
const skuName = sku.name;
|
|
46
|
+
if (skuName !== SkuName.Premium) {
|
|
47
|
+
throw new Error(`Service Bus geo-replication requires the Premium SKU, but ${id} was configured with "${String(skuName)}"`);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
const namespace = new Namespace(`${id}-sn`, {
|
|
51
|
+
...namespaceProps,
|
|
52
|
+
namespaceName: scope.resourceNameFormatter.format(namespaceProps.namespaceName?.toString(), scope.props.resourceNameOptions?.serviceBusNamespace),
|
|
37
53
|
resourceGroupName,
|
|
38
|
-
location:
|
|
39
|
-
identity:
|
|
54
|
+
location: namespaceProps.location ?? scope.props.location,
|
|
55
|
+
identity: namespaceProps.identity ?? {
|
|
40
56
|
type: ManagedServiceIdentityType.SystemAssigned,
|
|
41
57
|
},
|
|
42
|
-
sku
|
|
43
|
-
name: SkuName.Standard,
|
|
44
|
-
},
|
|
58
|
+
sku,
|
|
45
59
|
tags: {
|
|
46
60
|
environment: scope.props.stage,
|
|
47
61
|
...scope.props.defaultTags,
|
|
48
|
-
...
|
|
62
|
+
...namespaceProps.tags,
|
|
49
63
|
},
|
|
50
64
|
}, { parent: scope, ...resourceOptions });
|
|
65
|
+
if (enableGeoReplication && geoReplication) {
|
|
66
|
+
this.createServiceBusGeoReplicationDeployment(id, scope, namespace, resourceGroupName, sku, geoReplication, resourceOptions);
|
|
67
|
+
}
|
|
68
|
+
return namespace;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Provisions the geo-replication topology for a Service Bus namespace via an ARM
|
|
72
|
+
* deployment. The deployment PATCHes the existing namespace using the 2024-01-01
|
|
73
|
+
* Service Bus API version, which exposes the `geoDataReplication` property that is
|
|
74
|
+
* not yet surfaced by `@pulumi/azure-native`'s strongly-typed `Namespace` resource.
|
|
75
|
+
*/
|
|
76
|
+
createServiceBusGeoReplicationDeployment(id, scope, namespace, resourceGroupName, sku, geoReplication, resourceOptions) {
|
|
77
|
+
const template = all([
|
|
78
|
+
namespace.name,
|
|
79
|
+
namespace.location,
|
|
80
|
+
output(sku),
|
|
81
|
+
output(geoReplication.maxReplicationLagDurationInSeconds ?? 0),
|
|
82
|
+
output(geoReplication.locations),
|
|
83
|
+
]).apply(([namespaceName, location, resolvedSku, maxLagSeconds, locations]) => ({
|
|
84
|
+
$schema: 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#',
|
|
85
|
+
contentVersion: '1.0.0.0',
|
|
86
|
+
resources: [
|
|
87
|
+
{
|
|
88
|
+
type: 'Microsoft.ServiceBus/namespaces',
|
|
89
|
+
apiVersion: '2024-01-01',
|
|
90
|
+
name: namespaceName,
|
|
91
|
+
location,
|
|
92
|
+
sku: {
|
|
93
|
+
name: resolvedSku.name,
|
|
94
|
+
tier: resolvedSku.tier ?? resolvedSku.name,
|
|
95
|
+
capacity: resolvedSku.capacity ?? 1,
|
|
96
|
+
},
|
|
97
|
+
properties: {
|
|
98
|
+
geoDataReplication: {
|
|
99
|
+
maxReplicationLagDurationInSeconds: maxLagSeconds,
|
|
100
|
+
locations: locations.map(location => ({
|
|
101
|
+
locationName: location.locationName,
|
|
102
|
+
roleType: location.roleType,
|
|
103
|
+
})),
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
],
|
|
108
|
+
}));
|
|
109
|
+
return new Deployment(`${id}-sn-geo`, {
|
|
110
|
+
resourceGroupName,
|
|
111
|
+
deploymentName: scope.resourceNameFormatter.format(`${id}-sn-geo`),
|
|
112
|
+
properties: {
|
|
113
|
+
mode: DeploymentMode.Incremental,
|
|
114
|
+
template,
|
|
115
|
+
},
|
|
116
|
+
}, { ...resourceOptions, parent: namespace, dependsOn: [namespace] });
|
|
51
117
|
}
|
|
52
118
|
/**
|
|
53
119
|
* @summary Method to create a new service bus topic
|
|
@@ -1,10 +1,55 @@
|
|
|
1
1
|
import { GetQueueOutputArgs, NamespaceArgs, QueueArgs, QueueAuthorizationRuleArgs, SubscriptionArgs, TopicArgs } from '@pulumi/azure-native/servicebus/index.js';
|
|
2
|
+
import { Input } from '@pulumi/pulumi';
|
|
3
|
+
/**
|
|
4
|
+
* Role of a replica within a Service Bus geo-replication topology. Mirrors the
|
|
5
|
+
* `roleType` values accepted by the Service Bus ARM API. Declared locally because
|
|
6
|
+
* `@pulumi/azure-native` does not yet surface a strongly-typed enum for this field;
|
|
7
|
+
* swap to the upstream enum once it ships.
|
|
8
|
+
* @category Enum
|
|
9
|
+
*/
|
|
10
|
+
export declare const ServiceBusGeoReplicationRoleType: {
|
|
11
|
+
readonly Primary: "Primary";
|
|
12
|
+
readonly Secondary: "Secondary";
|
|
13
|
+
};
|
|
14
|
+
export type ServiceBusGeoReplicationRoleType = (typeof ServiceBusGeoReplicationRoleType)[keyof typeof ServiceBusGeoReplicationRoleType];
|
|
15
|
+
/**
|
|
16
|
+
* Geo-replication replica configuration for a Service Bus namespace.
|
|
17
|
+
* @category Interface
|
|
18
|
+
*/
|
|
19
|
+
export interface ServiceBusGeoReplicationLocation {
|
|
20
|
+
/** Azure region name (e.g. "westeurope"). */
|
|
21
|
+
locationName: Input<string>;
|
|
22
|
+
/** Replica role — exactly one entry must be `Primary`, the rest `Secondary`. */
|
|
23
|
+
roleType: Input<ServiceBusGeoReplicationRoleType>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Geo-replication configuration for a Service Bus namespace.
|
|
27
|
+
* Provisioned via an ARM deployment using the 2024-01-01 Service Bus API version,
|
|
28
|
+
* which is the first stable version that exposes the `geoDataReplication` block.
|
|
29
|
+
* @category Interface
|
|
30
|
+
*/
|
|
31
|
+
export interface ServiceBusGeoReplicationProps {
|
|
32
|
+
/**
|
|
33
|
+
* Replication lag tolerance in seconds. `0` means synchronous replication.
|
|
34
|
+
* Async values typically sit in the 60–1440 range.
|
|
35
|
+
*/
|
|
36
|
+
maxReplicationLagDurationInSeconds?: Input<number>;
|
|
37
|
+
/** Primary + one or more secondary regions. */
|
|
38
|
+
locations: Input<Input<ServiceBusGeoReplicationLocation>[]>;
|
|
39
|
+
}
|
|
2
40
|
/**
|
|
3
41
|
* Properties for creating a Service Bus namespace
|
|
4
42
|
* @see [Pulumi Azure Native Service Bus Namespace]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/servicebus/namespace/}
|
|
5
43
|
* @category Interface
|
|
6
44
|
*/
|
|
7
45
|
export interface ServiceBusNamespaceProps extends NamespaceArgs {
|
|
46
|
+
/**
|
|
47
|
+
* Enables Service Bus geo-replication. Requires the namespace SKU to be `Premium`.
|
|
48
|
+
* When `true`, {@link geoReplication} must be supplied.
|
|
49
|
+
*/
|
|
50
|
+
enableGeoReplication?: boolean;
|
|
51
|
+
/** Geo-replication topology. Only consumed when {@link enableGeoReplication} is `true`. */
|
|
52
|
+
geoReplication?: ServiceBusGeoReplicationProps;
|
|
8
53
|
}
|
|
9
54
|
/**
|
|
10
55
|
* Properties for creating a Service Bus topic
|
|
@@ -1 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Role of a replica within a Service Bus geo-replication topology. Mirrors the
|
|
3
|
+
* `roleType` values accepted by the Service Bus ARM API. Declared locally because
|
|
4
|
+
* `@pulumi/azure-native` does not yet surface a strongly-typed enum for this field;
|
|
5
|
+
* swap to the upstream enum once it ships.
|
|
6
|
+
* @category Enum
|
|
7
|
+
*/
|
|
8
|
+
export const ServiceBusGeoReplicationRoleType = {
|
|
9
|
+
Primary: 'Primary',
|
|
10
|
+
Secondary: 'Secondary',
|
|
11
|
+
};
|
|
@@ -2,7 +2,7 @@ import { StorageAccount } from '@pulumi/azure-native/storage/index.js';
|
|
|
2
2
|
import * as pulumi from '@pulumi/pulumi';
|
|
3
3
|
import { ResourceOptions } from '@pulumi/pulumi';
|
|
4
4
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
5
|
-
import { ContainerSasTokenProps, ManagementPolicyProps, StorageAccountProps, StorageBlobProps, StorageContainerProps, StorageTableProps } from './types.js';
|
|
5
|
+
import { ContainerSasTokenProps, ManagementPolicyProps, ResolveStorageAccountProps, ResolveStorageContainerProps, StorageAccountProps, StorageBlobProps, StorageContainerProps, StorageTableProps } from './types.js';
|
|
6
6
|
/**
|
|
7
7
|
* Provides operations on Azure Storage using Pulumi
|
|
8
8
|
* - A new instance of this class is injected into {@link CommonAzureConstruct} constructor.
|
|
@@ -85,4 +85,20 @@ export declare class AzureStorageManager {
|
|
|
85
85
|
* @see [Pulumi Azure Native Storage Table]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/table/}
|
|
86
86
|
*/
|
|
87
87
|
createTable(id: string, scope: CommonAzureConstruct, props: StorageTableProps, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/storage/table.js").Table;
|
|
88
|
+
/**
|
|
89
|
+
* @param id scoped id of the resource
|
|
90
|
+
* @param scope scope in which this resource is defined
|
|
91
|
+
* @param props storage account properties
|
|
92
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
93
|
+
* @see [Pulumi Azure Native Storage Table]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/table/}
|
|
94
|
+
*/
|
|
95
|
+
resolveStorageAccount(id: string, scope: CommonAzureConstruct, props: ResolveStorageAccountProps, resourceOptions?: ResourceOptions): pulumi.Output<import("@pulumi/azure-native/storage/getStorageAccount.js").GetStorageAccountResult>;
|
|
96
|
+
/**
|
|
97
|
+
* @param id scoped id of the resource
|
|
98
|
+
* @param scope scope in which this resource is defined
|
|
99
|
+
* @param props storage account container properties
|
|
100
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
101
|
+
|
|
102
|
+
*/
|
|
103
|
+
resolveStorageContainer(id: string, scope: CommonAzureConstruct, props: ResolveStorageContainerProps, resourceOptions?: ResourceOptions): pulumi.Output<import("@pulumi/azure-native/storage/getBlobContainer.js").GetBlobContainerResult>;
|
|
88
104
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Blob, BlobContainer, BlobServiceProperties, HttpProtocol, Kind, listStorageAccountSAS, ManagementPolicy, MinimumTlsVersion, Permissions, PublicAccess, Services, SignedResourceTypes, SkuName, StorageAccount, Table, } from '@pulumi/azure-native/storage/index.js';
|
|
1
|
+
import { Blob, BlobContainer, BlobServiceProperties, getStorageAccountOutput, getBlobContainerOutput, HttpProtocol, Kind, listStorageAccountSAS, ManagementPolicy, MinimumTlsVersion, Permissions, PublicAccess, Services, SignedResourceTypes, SkuName, StorageAccount, Table, } from '@pulumi/azure-native/storage/index.js';
|
|
2
2
|
import * as pulumi from '@pulumi/pulumi';
|
|
3
3
|
/**
|
|
4
4
|
* Provides operations on Azure Storage using Pulumi
|
|
@@ -169,4 +169,31 @@ export class AzureStorageManager {
|
|
|
169
169
|
throw new Error(`Props undefined for ${id}`);
|
|
170
170
|
return new Table(`${id}`, props, { parent: scope, ...resourceOptions });
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* @param id scoped id of the resource
|
|
174
|
+
* @param scope scope in which this resource is defined
|
|
175
|
+
* @param props storage account properties
|
|
176
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
177
|
+
* @see [Pulumi Azure Native Storage Table]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/table/}
|
|
178
|
+
*/
|
|
179
|
+
resolveStorageAccount(id, scope, props, resourceOptions) {
|
|
180
|
+
return getStorageAccountOutput({
|
|
181
|
+
accountName: scope.resourceNameFormatter.format(props.accountName?.toString(), scope.props.resourceNameOptions?.storageAccount),
|
|
182
|
+
resourceGroupName: props.resourceGroupName ?? scope.resourceNameFormatter.format(scope.props.resourceGroupName),
|
|
183
|
+
}, { parent: scope, ...resourceOptions });
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @param id scoped id of the resource
|
|
187
|
+
* @param scope scope in which this resource is defined
|
|
188
|
+
* @param props storage account container properties
|
|
189
|
+
* @param resourceOptions Optional settings to control resource behaviour
|
|
190
|
+
|
|
191
|
+
*/
|
|
192
|
+
resolveStorageContainer(id, scope, props, resourceOptions) {
|
|
193
|
+
return getBlobContainerOutput({
|
|
194
|
+
accountName: scope.resourceNameFormatter.format(props.accountName?.toString(), scope.props.resourceNameOptions?.storageAccount),
|
|
195
|
+
containerName: props.containerName,
|
|
196
|
+
resourceGroupName: props.resourceGroupName ?? scope.resourceNameFormatter.format(scope.props.resourceGroupName),
|
|
197
|
+
}, { parent: scope, ...resourceOptions });
|
|
198
|
+
}
|
|
172
199
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BlobArgs, BlobContainerArgs, BlobServicePropertiesArgs, ListStorageAccountSASArgs, ManagementPolicyArgs, StorageAccountArgs, TableArgs } from '@pulumi/azure-native/storage/index.js';
|
|
1
|
+
import { BlobArgs, BlobContainerArgs, BlobServicePropertiesArgs, GetStorageAccountOutputArgs, GetBlobContainerOutputArgs, ListStorageAccountSASArgs, ManagementPolicyArgs, StorageAccountArgs, TableArgs } from '@pulumi/azure-native/storage/index.js';
|
|
2
2
|
import { BaseAzureConfigProps } from '../../types/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Properties for creating an Azure Storage account
|
|
@@ -58,3 +58,17 @@ export interface ContainerSasTokenProps extends ListStorageAccountSASArgs {
|
|
|
58
58
|
/** SAS expiry date in 'YYYY-MM-DD' format; defaults to 7 days from now */
|
|
59
59
|
expiry?: string;
|
|
60
60
|
}
|
|
61
|
+
/**
|
|
62
|
+
* Properties for resolving an existing Storage account
|
|
63
|
+
* @see [Pulumi Azure Native Event Grid Topic]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/getstorageaccount/}
|
|
64
|
+
* @category Interface
|
|
65
|
+
*/
|
|
66
|
+
export interface ResolveStorageAccountProps extends GetStorageAccountOutputArgs {
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Properties for resolving an existing Storage account container
|
|
70
|
+
* @see [Pulumi Azure Native Event Grid Topic]{@link https://www.pulumi.com/registry/packages/azure-native/api-docs/storage/getstorageaccount/}
|
|
71
|
+
* @category Interface
|
|
72
|
+
*/
|
|
73
|
+
export interface ResolveStorageContainerProps extends GetBlobContainerOutputArgs {
|
|
74
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gradientedge/cdk-utils-azure",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.53.1",
|
|
4
4
|
"description": "Azure Pulumi utilities for @gradientedge/cdk-utils",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"@pulumi/archive": "0.5.0",
|
|
18
18
|
"@pulumi/azure-native": "3.19.0",
|
|
19
19
|
"@pulumi/azuread": "6.9.1",
|
|
20
|
-
"@pulumi/pulumi": "3.
|
|
20
|
+
"@pulumi/pulumi": "3.246.0",
|
|
21
21
|
"@types/lodash": "4.17.24",
|
|
22
22
|
"app-root-path": "3.1.0",
|
|
23
23
|
"lodash": "4.18.1",
|