@gradientedge/cdk-utils-azure 2.17.0 → 2.18.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.
@@ -41,6 +41,8 @@ export declare class CommonAzureStack extends ComponentResource {
41
41
  * - Primary use is to have layered config for each environment which is injected into the context
42
42
  */
43
43
  protected determineStageContexts(): any;
44
+ protected createConstruct(): void;
45
+ protected registerOutputs(): void;
44
46
  /**
45
47
  * @summary Determine the fully qualified domain name based on domainName & subDomain
46
48
  */
@@ -35,6 +35,8 @@ export class CommonAzureStack extends ComponentResource {
35
35
  if (this.props.defaultTags) {
36
36
  registerTagTransformation(this.props.defaultTags);
37
37
  }
38
+ this.createConstruct();
39
+ this.registerOutputs();
38
40
  }
39
41
  /**
40
42
  * @summary Method to determine the core construct properties injected via context
@@ -111,6 +113,16 @@ export class CommonAzureStack extends ComponentResource {
111
113
  /* parse as JSON properties */
112
114
  return JSON.parse(stageContextPropsBuffer.toString('utf-8'));
113
115
  }
116
+ createConstruct() { }
117
+ registerOutputs() {
118
+ if (this.construct && this.construct.resourceGroup) {
119
+ this.outputs = {
120
+ resourceGroupId: this.construct.resourceGroup.id,
121
+ resourceGroupName: this.construct.resourceGroup.name,
122
+ };
123
+ super.registerOutputs(this.outputs);
124
+ }
125
+ }
114
126
  /**
115
127
  * @summary Determine the fully qualified domain name based on domainName & subDomain
116
128
  */
@@ -266,6 +266,7 @@ export class AzureRestApiFunction extends AzureFunctionApp {
266
266
  <inbound>
267
267
  <base />
268
268
  ${this.api.corsPolicyXmlContent ?? ''}
269
+ ${this.api.validateJwtPolicyXmlContent ?? ''}
269
270
  <set-backend-service backend-id="${this.api.backend.name}" />
270
271
  <set-header name="traceparent" exists-action="override">
271
272
  <value>@(context.Request.Headers.GetValueOrDefault("traceparent", ""))</value>
@@ -23,11 +23,12 @@ export interface AzureRestApiFunctionProps extends AzureRestApiProps, AzureFunct
23
23
  }
24
24
  /** @category Interface */
25
25
  export interface AzureApiFunction extends AzureApi {
26
- corsPolicyXmlContent?: string;
27
26
  apiOperations: {
28
27
  [operation: string]: ApiOperation;
29
28
  };
30
- managementApi: Api;
31
29
  backend: Backend;
30
+ corsPolicyXmlContent?: string;
31
+ managementApi: Api;
32
32
  namedValue: NamedValue;
33
+ validateJwtPolicyXmlContent?: string;
33
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gradientedge/cdk-utils-azure",
3
- "version": "2.17.0",
3
+ "version": "2.18.0",
4
4
  "description": "Azure Pulumi utilities for @gradientedge/cdk-utils",
5
5
  "type": "module",
6
6
  "main": "dist/src/index.js",
@@ -16,6 +16,7 @@
16
16
  "dependencies": {
17
17
  "@pulumi/archive": "0.3.7",
18
18
  "@pulumi/azure-native": "3.16.0",
19
+ "@pulumi/azuread": "6.9.0",
19
20
  "@pulumi/pulumi": "3.230.0",
20
21
  "@types/lodash": "4.17.24",
21
22
  "app-root-path": "3.1.0",