@gradientedge/cdk-utils-azure 2.25.0 → 2.27.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.
@@ -1,4 +1,4 @@
1
- import { getApiManagementServiceOutput, HostnameType, LoggerType } from '@pulumi/azure-native/apimanagement/index.js';
1
+ import { getApiManagementServiceOutput, HostnameType, listSubscriptionSecretsOutput, LoggerType, } from '@pulumi/azure-native/apimanagement/index.js';
2
2
  import { getComponentOutput } from '@pulumi/azure-native/applicationinsights/index.js';
3
3
  import { PrincipalType } from '@pulumi/azure-native/authorization/index.js';
4
4
  import { getVaultOutput } from '@pulumi/azure-native/keyvault/index.js';
@@ -165,12 +165,19 @@ export class AzureRestApi extends CommonAzureConstruct {
165
165
  allowTracing: false,
166
166
  scope: '/apis',
167
167
  });
168
+ const subscriptionKey = pulumi
169
+ .all([this.api.apim.name, this.resourceGroup.name, apiManagementSubscription.name])
170
+ .apply(([serviceName, resourceGroupName, subscriptionName]) => listSubscriptionSecretsOutput({
171
+ serviceName,
172
+ resourceGroupName,
173
+ sid: subscriptionName,
174
+ }).apply(secrets => secrets.primaryKey ?? ''));
168
175
  this.keyVaultManager.createKeyVaultSecret(`${this.id}-key-vault-api-subscription-key-secret`, this, {
169
176
  vaultName: this.api.authKeyVault.name,
170
177
  secretName: `${this.id}-subscription-key`,
171
178
  resourceGroupName: this.props.apiAuthKeyVault.resourceGroupName,
172
179
  properties: {
173
- value: apiManagementSubscription.primaryKey.apply(key => key ?? ''),
180
+ value: subscriptionKey,
174
181
  },
175
182
  });
176
183
  }
@@ -117,8 +117,8 @@ export class SiteWithWebApp extends CommonAzureConstruct {
117
117
  */
118
118
  createWebAppSiteConfig() {
119
119
  this.site.environmentVariables = {
120
- APPINSIGHTS_INSTRUMENTATIONKEY: this.applicationInsights.instrumentationKey,
121
- APPLICATIONINSIGHTS_CONNECTION_STRING: this.applicationInsights.connectionString,
120
+ OTEL_APPINSIGHTS_INSTRUMENTATIONKEY: this.applicationInsights.instrumentationKey,
121
+ OTEL_APPLICATIONINSIGHTS_CONNECTION_STRING: this.applicationInsights.connectionString,
122
122
  ApplicationInsightsAgent_EXTENSION_VERSION: '~3',
123
123
  OTEL_SDK_DISABLED: 'false',
124
124
  BUILD_VERSION: '0.0.0',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils-azure",
3
- "version": "2.25.0",
3
+ "version": "2.27.0",
4
4
  "description": "Azure Pulumi utilities for @gradientedge/cdk-utils",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",