@gradientedge/cdk-utils-azure 2.5.0 → 2.7.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/src/common/construct.js +1 -1
- package/dist/src/construct/event-handler/main.js +1 -1
- package/dist/src/construct/event-handler/types.d.ts +2 -1
- package/dist/src/construct/rest-api/main.js +4 -4
- package/dist/src/construct/rest-api/types.d.ts +2 -2
- package/dist/src/construct/rest-api-function/main.js +3 -3
- package/dist/src/construct/rest-api-with-cache/main.js +1 -1
- package/dist/src/services/api-management/types.d.ts +2 -1
- package/dist/src/services/authorisation/main.d.ts +2 -2
- package/dist/src/services/cosmosdb/main.d.ts +1 -1
- package/dist/src/services/key-vault/main.d.ts +2 -2
- package/package.json +1 -1
|
@@ -82,7 +82,7 @@ export class CommonAzureConstruct extends ComponentResource {
|
|
|
82
82
|
if (this.resourceGroup)
|
|
83
83
|
return;
|
|
84
84
|
this.resourceGroup = this.resourceGroupManager.createResourceGroup(`${this.id}`, this, {
|
|
85
|
-
resourceGroupName: this.
|
|
85
|
+
resourceGroupName: this.id,
|
|
86
86
|
location: this.props.location,
|
|
87
87
|
});
|
|
88
88
|
this.registerOutputs({
|
|
@@ -144,7 +144,7 @@ export class AzureEventHandler extends AzureFunctionApp {
|
|
|
144
144
|
*/
|
|
145
145
|
createServiceBusDiagnosticLog() {
|
|
146
146
|
this.monitorManager.createMonitorDiagnosticSettings(this.id, this, {
|
|
147
|
-
name: `${this.
|
|
147
|
+
name: `${this.id}-servicebus`,
|
|
148
148
|
resourceUri: this.serviceBus.namespace.id,
|
|
149
149
|
workspaceId: this.commonLogAnalyticsWorkspace.id,
|
|
150
150
|
logAnalyticsDestinationType: 'Dedicated',
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EventSubscription } from '@pulumi/azure-native/eventgrid/index.js';
|
|
2
2
|
import { Namespace, Queue } from '@pulumi/azure-native/servicebus/index.js';
|
|
3
3
|
import { BlobContainer, StorageAccount } from '@pulumi/azure-native/storage/index.js';
|
|
4
|
+
import { Input } from '@pulumi/pulumi';
|
|
4
5
|
import { DefenderForStorageProps, EventgridEventSubscriptionProps, EventgridTopicProps, ServiceBusNamespaceProps, ServiceBusQueueProps, StorageAccountProps, StorageContainerProps } from '../../services/index.js';
|
|
5
6
|
import { AzureFunctionAppProps } from '../function-app/index.js';
|
|
6
7
|
/** @category Interface */
|
|
@@ -29,7 +30,7 @@ export interface EventHandlerEventGridTopicProps extends EventgridTopicProps {
|
|
|
29
30
|
useExistingTopic: boolean;
|
|
30
31
|
existingSubscriptionId?: string;
|
|
31
32
|
existingTopicName?: string;
|
|
32
|
-
existingResourceGroupName?: string
|
|
33
|
+
existingResourceGroupName?: Input<string>;
|
|
33
34
|
}
|
|
34
35
|
/** @category Interface */
|
|
35
36
|
export interface AzureEventHandlerProps extends AzureFunctionAppProps {
|
|
@@ -89,7 +89,7 @@ export class AzureRestApi extends CommonAzureConstruct {
|
|
|
89
89
|
}
|
|
90
90
|
this.api.apim = this.apiManagementManager.createApiManagementService(this.id, this, {
|
|
91
91
|
...this.props.apiManagement,
|
|
92
|
-
serviceName: this.
|
|
92
|
+
serviceName: this.id,
|
|
93
93
|
location: this.resourceGroup.location,
|
|
94
94
|
resourceGroupName: this.resourceGroup.name,
|
|
95
95
|
hostnameConfigurations,
|
|
@@ -131,7 +131,7 @@ export class AzureRestApi extends CommonAzureConstruct {
|
|
|
131
131
|
return;
|
|
132
132
|
this.api.namedValueSecret = this.keyVaultManager.createKeyVaultSecret(`${this.id}-key-vault-api-namespace-secret`, this, {
|
|
133
133
|
vaultName: this.api.authKeyVault.name,
|
|
134
|
-
secretName: `${this.applicationInsights.name}-${this.
|
|
134
|
+
secretName: `${this.applicationInsights.name}-${this.id}-key`,
|
|
135
135
|
resourceGroupName: this.resourceGroup.name,
|
|
136
136
|
properties: {
|
|
137
137
|
value: this.applicationInsights.instrumentationKey,
|
|
@@ -154,7 +154,7 @@ export class AzureRestApi extends CommonAzureConstruct {
|
|
|
154
154
|
});
|
|
155
155
|
this.keyVaultManager.createKeyVaultSecret(`${this.id}-key-vault-api-subscription-key-secret`, this, {
|
|
156
156
|
vaultName: this.api.authKeyVault.name,
|
|
157
|
-
secretName: `${this.
|
|
157
|
+
secretName: `${this.id}-subscription-key`,
|
|
158
158
|
resourceGroupName: this.resourceGroup.name,
|
|
159
159
|
properties: {
|
|
160
160
|
value: apiManagementSubscription.primaryKey.apply(key => key ?? ''),
|
|
@@ -209,7 +209,7 @@ export class AzureRestApi extends CommonAzureConstruct {
|
|
|
209
209
|
return;
|
|
210
210
|
this.monitorManager.createMonitorDiagnosticSettings(`${this.id}-apim-diagnostic`, this, {
|
|
211
211
|
...this.props.apiManagementDiagnosticSettings,
|
|
212
|
-
name: `${this.
|
|
212
|
+
name: `${this.id}-api-management`,
|
|
213
213
|
resourceUri: this.api.apim.id,
|
|
214
214
|
workspaceId: this.commonLogAnalyticsWorkspace.id,
|
|
215
215
|
});
|
|
@@ -5,8 +5,8 @@ import { Input, Output } from '@pulumi/pulumi';
|
|
|
5
5
|
import { ApiDiagnosticProps, ApiManagementProps, CommonAzureStackProps, MonitorDiagnosticSettingProps } from '../../index.js';
|
|
6
6
|
/** @category Interface */
|
|
7
7
|
export interface ApiAuthKeyVault {
|
|
8
|
-
name: string
|
|
9
|
-
resourceGroupName: string
|
|
8
|
+
name: Input<string>;
|
|
9
|
+
resourceGroupName: Input<string>;
|
|
10
10
|
}
|
|
11
11
|
/** @category Interface */
|
|
12
12
|
export interface AzureRestApiProps extends CommonAzureStackProps {
|
|
@@ -111,7 +111,7 @@ export class AzureRestApiFunction extends AzureFunctionApp {
|
|
|
111
111
|
}
|
|
112
112
|
this.api.apim = this.apiManagementManager.createApiManagementService(this.id, this, {
|
|
113
113
|
...this.props.apiManagement,
|
|
114
|
-
serviceName: this.
|
|
114
|
+
serviceName: this.id,
|
|
115
115
|
location: this.resourceGroup.location,
|
|
116
116
|
resourceGroupName: this.resourceGroup.name,
|
|
117
117
|
hostnameConfigurations,
|
|
@@ -143,7 +143,7 @@ export class AzureRestApiFunction extends AzureFunctionApp {
|
|
|
143
143
|
});
|
|
144
144
|
this.api.backend = this.apiManagementManager.createBackend(this.id, this, {
|
|
145
145
|
...this.props.apiManagementBackend,
|
|
146
|
-
title: this.
|
|
146
|
+
title: this.id,
|
|
147
147
|
resourceGroupName: this.api.resourceGroupName,
|
|
148
148
|
serviceName: this.api.name,
|
|
149
149
|
url: pulumi.interpolate `https://${this.app.name}.azurewebsites.net/${this.props.apiManagementBackend.backendUrlPath}`,
|
|
@@ -161,7 +161,7 @@ export class AzureRestApiFunction extends AzureFunctionApp {
|
|
|
161
161
|
createApiManagementRoutes() {
|
|
162
162
|
this.api.managementApi = this.apiManagementManager.createApi(`${this.id}-apim-api`, this, {
|
|
163
163
|
...this.props.apiManagementApi,
|
|
164
|
-
displayName: this.props.apiManagementApi.displayName ?? this.
|
|
164
|
+
displayName: this.props.apiManagementApi.displayName ?? this.id,
|
|
165
165
|
serviceName: this.api.name,
|
|
166
166
|
resourceGroupName: this.api.resourceGroupName,
|
|
167
167
|
isCurrent: this.props.apiManagementApi.isCurrent ?? true,
|
|
@@ -37,7 +37,7 @@ export class AzureRestApiWithCache extends AzureRestApi {
|
|
|
37
37
|
createRedisCache() {
|
|
38
38
|
this.api.redis = this.redisManager.createManagedRedis(this.id, this, {
|
|
39
39
|
...this.props.apiManagementManagedRedis,
|
|
40
|
-
name: this.
|
|
40
|
+
name: this.id,
|
|
41
41
|
location: this.resourceGroup.location,
|
|
42
42
|
resourceGroupName: this.resourceGroup.name,
|
|
43
43
|
}, { ignoreChanges: ['location'] });
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { ApiArgs, ApiDiagnosticArgs, ApiManagementServiceArgs, ApiOperationArgs, ApiOperationPolicyArgs, ApiPolicyArgs, BackendArgs, CacheArgs, GetApiManagementServiceOutputArgs, LoggerArgs, NamedValueArgs, SubscriptionArgs } from '@pulumi/azure-native/apimanagement/index.js';
|
|
2
|
+
import { Input } from '@pulumi/pulumi';
|
|
2
3
|
/** @category Interface */
|
|
3
4
|
export interface ApiManagementProps extends ApiManagementServiceArgs {
|
|
4
|
-
certificateKeyVaultId?: string
|
|
5
|
+
certificateKeyVaultId?: Input<string>;
|
|
5
6
|
apiStackName?: string;
|
|
6
7
|
useExistingApiManagement?: boolean;
|
|
7
8
|
}
|
|
@@ -40,7 +40,7 @@ export declare class AzureAuthorisationManager {
|
|
|
40
40
|
* @param roleDefinitionId the role definition id
|
|
41
41
|
* @param resourceOptions Optional settings to control resource behaviour
|
|
42
42
|
*/
|
|
43
|
-
grantRoleAssignmentToKeyVault(id: string, scope: CommonAzureConstruct, vaultName: string, resourceGroupName: string
|
|
43
|
+
grantRoleAssignmentToKeyVault(id: string, scope: CommonAzureConstruct, vaultName: string, resourceGroupName: Input<string>, principalId: Input<string>, roleDefinitionId: RoleDefinitionId, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/authorization/roleAssignment.js").RoleAssignment;
|
|
44
44
|
/**
|
|
45
45
|
* @summary Method to grant a role assignment to event grid topic
|
|
46
46
|
* @param id scoped id of the resource
|
|
@@ -51,7 +51,7 @@ export declare class AzureAuthorisationManager {
|
|
|
51
51
|
* @param roleDefinitionId the role definition id
|
|
52
52
|
* @param resourceOptions Optional settings to control resource behaviour
|
|
53
53
|
*/
|
|
54
|
-
grantRoleAssignmentToEventgridTopic(id: string, scope: CommonAzureConstruct, topicName: string, resourceGroupName: string
|
|
54
|
+
grantRoleAssignmentToEventgridTopic(id: string, scope: CommonAzureConstruct, topicName: string, resourceGroupName: Input<string>, principalId: Input<string>, roleDefinitionId: RoleDefinitionId, resourceOptions?: ResourceOptions): import("@pulumi/azure-native/authorization/roleAssignment.js").RoleAssignment;
|
|
55
55
|
/**
|
|
56
56
|
* @summary Method to grant a role assignment to application configuration
|
|
57
57
|
* @param id scoped id of the resource
|
|
@@ -73,7 +73,7 @@ export declare class AzureCosmosDbManager {
|
|
|
73
73
|
* @param roleDefinitionId the role definition id
|
|
74
74
|
* @param resourceOptions Optional settings to control resource behaviour
|
|
75
75
|
*/
|
|
76
|
-
resolveSqlRoleDefinition(scope: CommonAzureConstruct, accountName: Input<string>, resourceGroupName: string
|
|
76
|
+
resolveSqlRoleDefinition(scope: CommonAzureConstruct, accountName: Input<string>, resourceGroupName: Input<string>, roleDefinitionId: string, resourceOptions?: ResourceOptions): import("@pulumi/pulumi").Output<import("@pulumi/azure-native/cosmosdb/getSqlResourceSqlRoleDefinition.js").GetSqlResourceSqlRoleDefinitionResult>;
|
|
77
77
|
/**
|
|
78
78
|
* @summary Method to assign a sql role assignment
|
|
79
79
|
* @param id scoped id of the resource
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ResourceOptions } from '@pulumi/pulumi';
|
|
1
|
+
import { Input, ResourceOptions } from '@pulumi/pulumi';
|
|
2
2
|
import { CommonAzureConstruct } from '../../common/index.js';
|
|
3
3
|
import { KeyVaultProps, SecretProps } from './types.js';
|
|
4
4
|
/**
|
|
@@ -46,5 +46,5 @@ export declare class AzureKeyVaultManager {
|
|
|
46
46
|
* @param resourceGroupName the resource group name
|
|
47
47
|
* @param resourceOptions Optional settings to control resource behaviour
|
|
48
48
|
*/
|
|
49
|
-
resolveKeyVault(scope: CommonAzureConstruct, vaultName: string, resourceGroupName: string
|
|
49
|
+
resolveKeyVault(scope: CommonAzureConstruct, vaultName: string, resourceGroupName: Input<string>, resourceOptions?: ResourceOptions): import("@pulumi/pulumi").Output<import("@pulumi/azure-native/keyvault/getVault.js").GetVaultResult>;
|
|
50
50
|
}
|