@intentius/chant-lexicon-azure 0.124.38 → 0.124.40

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.
Files changed (44) hide show
  1. package/dist/components/arm-deploy.d.ts +80 -0
  2. package/dist/components/arm-deploy.d.ts.map +1 -0
  3. package/dist/components/arm-deploy.js +398 -0
  4. package/dist/components/capability-plugin.d.ts +6 -0
  5. package/dist/components/capability-plugin.d.ts.map +1 -0
  6. package/dist/components/capability-plugin.js +17 -0
  7. package/dist/components/index.d.ts +3 -0
  8. package/dist/components/index.d.ts.map +1 -0
  9. package/dist/components/index.js +2 -0
  10. package/dist/composites/catalog.d.ts.map +1 -1
  11. package/dist/composites/catalog.js +120 -0
  12. package/dist/composites/container-app.d.ts +102 -0
  13. package/dist/composites/container-app.d.ts.map +1 -0
  14. package/dist/composites/container-app.js +130 -0
  15. package/dist/composites/index.d.ts +2 -0
  16. package/dist/composites/index.d.ts.map +1 -1
  17. package/dist/composites/index.js +1 -0
  18. package/dist/deep-observe.d.ts +30 -0
  19. package/dist/deep-observe.d.ts.map +1 -1
  20. package/dist/deep-observe.js +1 -1
  21. package/dist/index.d.ts +2 -1
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/index.js +4 -1
  24. package/dist/integrity.json +5 -5
  25. package/dist/manifest.json +1 -1
  26. package/dist/skills/chant-azure-patterns.md +16 -0
  27. package/dist/skills/chant-azure-security.md +1 -0
  28. package/dist/skills/chant-azure.md +2 -0
  29. package/package.json +7 -2
  30. package/src/components/arm-deploy-floci.e2e.test.ts +80 -0
  31. package/src/components/arm-deploy.test.ts +256 -0
  32. package/src/components/arm-deploy.ts +491 -0
  33. package/src/components/capability-plugin.ts +26 -0
  34. package/src/components/index.ts +9 -0
  35. package/src/composites/catalog.ts +120 -0
  36. package/src/composites/composites.test.ts +128 -0
  37. package/src/composites/container-app.ts +230 -0
  38. package/src/composites/index.ts +5 -0
  39. package/src/deep-observe.ts +2 -2
  40. package/src/index.ts +5 -0
  41. package/src/plugin.test.ts +10 -0
  42. package/src/skills/chant-azure-patterns.md +16 -0
  43. package/src/skills/chant-azure-security.md +1 -0
  44. package/src/skills/chant-azure.md +2 -0
@@ -0,0 +1,102 @@
1
+ /**
2
+ * ContainerAppNetwork and ContainerAppSite composites: a website on Azure
3
+ * Container Apps and the network it sits in.
4
+ *
5
+ * Split the way the aws lexicon splits VpcDefault from FargateAlb, so several
6
+ * sites can share one network. Container Apps brings its own ingress and load
7
+ * balancing, so there is no load balancer to declare.
8
+ */
9
+ import { VirtualNetwork, Subnet, LogAnalyticsWorkspace, ManagedIdentity, managedEnvironments, containerApps } from "../generated/index.js";
10
+ export interface ContainerAppNetworkProps {
11
+ /** Network name prefix: the VNet is `<name>-vnet`, its subnet `apps`. */
12
+ name: string;
13
+ /** Azure region (default: resource group location). */
14
+ location?: string;
15
+ /** VNet address space (default: "10.0.0.0/16"). */
16
+ addressSpace?: string;
17
+ /** The environment subnet's prefix, a /23 or larger (default: "10.0.0.0/23"). */
18
+ subnetPrefix?: string;
19
+ /** Resource tags. */
20
+ tags?: Record<string, string>;
21
+ /** Per-member defaults. */
22
+ defaults?: {
23
+ virtualNetwork?: Partial<ConstructorParameters<typeof VirtualNetwork>[0]>;
24
+ subnet?: Partial<ConstructorParameters<typeof Subnet>[0]>;
25
+ };
26
+ }
27
+ export interface ContainerAppNetworkResult {
28
+ virtualNetwork: InstanceType<typeof VirtualNetwork>;
29
+ subnet: InstanceType<typeof Subnet>;
30
+ }
31
+ /**
32
+ * A VNet with a subnet delegated to `Microsoft.App/environments`, for
33
+ * ContainerAppSite environments to sit in.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * import { ContainerAppNetwork } from "@intentius/chant-lexicon-azure";
38
+ *
39
+ * export const network = ContainerAppNetwork({ name: "web" });
40
+ * ```
41
+ */
42
+ export declare const ContainerAppNetwork: import("@intentius/chant").CompositeDefinition<ContainerAppNetworkProps, {
43
+ virtualNetwork: import("@intentius/chant").Declarable & Record<string, string>;
44
+ subnet: import("@intentius/chant").Declarable & Record<string, string>;
45
+ }>;
46
+ export interface ContainerAppSiteProps {
47
+ /** Environment name; the workspace is `<name>-logs` and the identity `<name>-<app>`. */
48
+ name: string;
49
+ /** Container app name. */
50
+ app: string;
51
+ /** Subnet resource ID for the environment, such as a ContainerAppNetwork's `subnet.id`. */
52
+ subnetId: string;
53
+ /** Azure region (default: resource group location). */
54
+ location?: string;
55
+ /** Container image (default: "mcr.microsoft.com/k8se/quickstart:latest"). */
56
+ image?: string;
57
+ /** Port the container listens on; ingress forwards to it (default: 80). */
58
+ port?: number;
59
+ /** Fixed replica count (default: 1). */
60
+ replicas?: number;
61
+ /** Make the environment reachable only from its VNet (default: false). */
62
+ internal?: boolean;
63
+ /** Resource tags. */
64
+ tags?: Record<string, string>;
65
+ /** Per-member defaults. */
66
+ defaults?: {
67
+ workspace?: Partial<ConstructorParameters<typeof LogAnalyticsWorkspace>[0]>;
68
+ identity?: Partial<ConstructorParameters<typeof ManagedIdentity>[0]>;
69
+ environment?: Partial<ConstructorParameters<typeof managedEnvironments>[0]>;
70
+ containerApp?: Partial<ConstructorParameters<typeof containerApps>[0]>;
71
+ };
72
+ }
73
+ export interface ContainerAppSiteResult {
74
+ workspace: InstanceType<typeof LogAnalyticsWorkspace>;
75
+ identity: InstanceType<typeof ManagedIdentity>;
76
+ environment: InstanceType<typeof managedEnvironments>;
77
+ containerApp: InstanceType<typeof containerApps>;
78
+ }
79
+ /**
80
+ * A Container Apps environment in a subnet, shipping logs to its own Log
81
+ * Analytics workspace, with one app running as a user-assigned identity.
82
+ *
83
+ * @example
84
+ * ```ts
85
+ * import { ContainerAppNetwork, ContainerAppSite } from "@intentius/chant-lexicon-azure";
86
+ *
87
+ * export const network = ContainerAppNetwork({ name: "web" });
88
+ * export const site = ContainerAppSite({
89
+ * name: "web",
90
+ * app: "frontend",
91
+ * subnetId: network.subnet.id,
92
+ * image: "nginx:1.27",
93
+ * });
94
+ * ```
95
+ */
96
+ export declare const ContainerAppSite: import("@intentius/chant").CompositeDefinition<ContainerAppSiteProps, {
97
+ workspace: import("@intentius/chant").Declarable & Record<string, string>;
98
+ identity: import("@intentius/chant").Declarable & Record<string, string>;
99
+ environment: import("@intentius/chant").Declarable & Record<string, string>;
100
+ containerApp: import("@intentius/chant").Declarable & Record<string, string>;
101
+ }>;
102
+ //# sourceMappingURL=container-app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-app.d.ts","sourceRoot":"","sources":["../../src/composites/container-app.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EACL,cAAc,EACd,MAAM,EACN,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,aAAa,EACd,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,wBAAwB;IACvC,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iFAAiF;IACjF,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qBAAqB;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9B,2BAA2B;IAC3B,QAAQ,CAAC,EAAE;QACT,cAAc,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1E,MAAM,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;KAC3D,CAAC;CACH;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;IACpD,MAAM,EAAE,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;CACrC;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,mBAAmB;;;EAyCP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;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,gBAAgB;;;;;EAsEP,CAAC"}
@@ -0,0 +1,130 @@
1
+ /**
2
+ * ContainerAppNetwork and ContainerAppSite composites: a website on Azure
3
+ * Container Apps and the network it sits in.
4
+ *
5
+ * Split the way the aws lexicon splits VpcDefault from FargateAlb, so several
6
+ * sites can share one network. Container Apps brings its own ingress and load
7
+ * balancing, so there is no load balancer to declare.
8
+ */
9
+ import { Composite, mergeDefaults } from "@intentius/chant";
10
+ import { VirtualNetwork, Subnet, LogAnalyticsWorkspace, ManagedIdentity, managedEnvironments, containerApps, } from "../generated/index.js";
11
+ /**
12
+ * A VNet with a subnet delegated to `Microsoft.App/environments`, for
13
+ * ContainerAppSite environments to sit in.
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * import { ContainerAppNetwork } from "@intentius/chant-lexicon-azure";
18
+ *
19
+ * export const network = ContainerAppNetwork({ name: "web" });
20
+ * ```
21
+ */
22
+ export const ContainerAppNetwork = Composite((props) => {
23
+ const { name, location = "[resourceGroup().location]", addressSpace = "10.0.0.0/16", subnetPrefix = "10.0.0.0/23", tags = {}, defaults, } = props;
24
+ const mergedTags = { "managed-by": "chant", ...tags };
25
+ const vnetName = `${name}-vnet`;
26
+ const delegations = [{ name: "apps", properties: { serviceName: "Microsoft.App/environments" } }];
27
+ const subnet = new Subnet(mergeDefaults({
28
+ name: `${vnetName}/apps`,
29
+ addressPrefix: subnetPrefix,
30
+ delegations,
31
+ }, defaults?.subnet), { apiVersion: "2023-05-01" });
32
+ // The subnet is also listed inline, as VnetDefault does, so a later
33
+ // deployment of the VNet does not try to remove it. The inline entry is
34
+ // built from the Subnet resource's merged props, so `defaults.subnet`
35
+ // reaches both copies. The apps entry always comes first; a caller's
36
+ // `defaults.virtualNetwork.subnets` adds the other subnets after it, and
37
+ // an entry of theirs named "apps" is replaced by this one.
38
+ const { subnets: extraSubnets, ...vnetDefaults } = (defaults?.virtualNetwork ?? {});
39
+ const virtualNetwork = new VirtualNetwork(mergeDefaults({
40
+ name: vnetName,
41
+ location,
42
+ tags: mergedTags,
43
+ addressSpace: { addressPrefixes: [addressSpace] },
44
+ subnets: [
45
+ inlineSubnet("apps", subnetProps(subnet)),
46
+ ...(extraSubnets ?? []).filter((s) => s?.name !== "apps"),
47
+ ],
48
+ }, vnetDefaults), { apiVersion: "2023-05-01" });
49
+ return { virtualNetwork, subnet };
50
+ }, "ContainerAppNetwork");
51
+ /** A Subnet resource's props, flat or under `properties`. */
52
+ function subnetProps(subnet) {
53
+ return subnet.props;
54
+ }
55
+ /** The VNet's inline entry for a subnet, from that Subnet resource's props. */
56
+ function inlineSubnet(name, props) {
57
+ const { name: _name, id: _id, properties, ...flat } = props;
58
+ return { name, properties: { ...flat, ...properties } };
59
+ }
60
+ /**
61
+ * A Container Apps environment in a subnet, shipping logs to its own Log
62
+ * Analytics workspace, with one app running as a user-assigned identity.
63
+ *
64
+ * @example
65
+ * ```ts
66
+ * import { ContainerAppNetwork, ContainerAppSite } from "@intentius/chant-lexicon-azure";
67
+ *
68
+ * export const network = ContainerAppNetwork({ name: "web" });
69
+ * export const site = ContainerAppSite({
70
+ * name: "web",
71
+ * app: "frontend",
72
+ * subnetId: network.subnet.id,
73
+ * image: "nginx:1.27",
74
+ * });
75
+ * ```
76
+ */
77
+ export const ContainerAppSite = Composite((props) => {
78
+ const { name, app, subnetId, location = "[resourceGroup().location]", image = "mcr.microsoft.com/k8se/quickstart:latest", port = 80, replicas = 1, internal = false, tags = {}, defaults, } = props;
79
+ const mergedTags = { "managed-by": "chant", ...tags };
80
+ const workspaceName = `${name}-logs`;
81
+ const identityName = `${name}-${app}`;
82
+ const workspaceId = `resourceId('Microsoft.OperationalInsights/workspaces', '${workspaceName}')`;
83
+ const workspace = new LogAnalyticsWorkspace(mergeDefaults({
84
+ name: workspaceName,
85
+ location,
86
+ tags: mergedTags,
87
+ // A workspace's sku sits inside its properties, not beside them, so it is
88
+ // passed there rather than hoisted to the resource like other skus.
89
+ properties: { sku: { name: "PerGB2018" } },
90
+ retentionInDays: 30,
91
+ }, defaults?.workspace), { apiVersion: "2023-09-01" });
92
+ const identity = new ManagedIdentity(mergeDefaults({
93
+ name: identityName,
94
+ location,
95
+ tags: mergedTags,
96
+ }, defaults?.identity), { apiVersion: "2023-01-31" });
97
+ const environment = new managedEnvironments(mergeDefaults({
98
+ name,
99
+ location,
100
+ tags: mergedTags,
101
+ vnetConfiguration: { infrastructureSubnetId: subnetId, internal },
102
+ appLogsConfiguration: {
103
+ destination: "log-analytics",
104
+ logAnalyticsConfiguration: {
105
+ customerId: `[reference(${workspaceId}, '2023-09-01').customerId]`,
106
+ sharedKey: `[listKeys(${workspaceId}, '2023-09-01').primarySharedKey]`,
107
+ },
108
+ },
109
+ workloadProfiles: [{ name: "Consumption", workloadProfileType: "Consumption" }],
110
+ }, defaults?.environment), { apiVersion: "2024-03-01" });
111
+ const containerApp = new containerApps(mergeDefaults({
112
+ name: app,
113
+ location,
114
+ tags: mergedTags,
115
+ identity: {
116
+ type: "UserAssigned",
117
+ userAssignedIdentities: {
118
+ [`[resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', '${identityName}')]`]: {},
119
+ },
120
+ },
121
+ managedEnvironmentId: environment.id,
122
+ workloadProfileName: "Consumption",
123
+ configuration: { ingress: { external: true, targetPort: port, transport: "auto" } },
124
+ template: {
125
+ containers: [{ name: app, image, resources: { cpu: 0.25, memory: "0.5Gi" } }],
126
+ scale: { minReplicas: replicas, maxReplicas: replicas },
127
+ },
128
+ }, defaults?.containerApp), { apiVersion: "2024-03-01" });
129
+ return { workspace, identity, environment, containerApp };
130
+ }, "ContainerAppSite");
@@ -28,6 +28,8 @@ export { RedisCache } from "./redis-cache.js";
28
28
  export type { RedisCacheProps, RedisCacheResult } from "./redis-cache.js";
29
29
  export { PrivateEndpoint } from "./private-endpoint.js";
30
30
  export type { PrivateEndpointProps, PrivateEndpointResult } from "./private-endpoint.js";
31
+ export { ContainerAppNetwork, ContainerAppSite } from "./container-app.js";
32
+ export type { ContainerAppNetworkProps, ContainerAppNetworkResult, ContainerAppSiteProps, ContainerAppSiteResult, } from "./container-app.js";
31
33
  export { GovernanceFoundation, GovernanceBaseline, LocationRestriction, ActivityLogSink } from "./landing-zone.js";
32
34
  export type { GovernanceFoundationProps, GovernanceFoundationResult, GovernanceBaselineProps, GovernanceBaselineResult, LocationRestrictionProps, LocationRestrictionResult, ActivityLogSinkProps, ActivityLogSinkResult, } from "./landing-zone.js";
33
35
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/composites/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,yBAAyB,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/F,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAC5E,O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c,EAAE,MAAM,mBAAmB,CAAC;AACnD,YAAY,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AAC/F,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,YAAY,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AACtF,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxE,YAAY,EACV,wBAAwB,EAAE,yBAAyB,EACnD,qBAAqB,EAAE,sBAAsB,GAC9C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAChH,YAAY,EACV,yBAAyB,EAAE,0BAA0B,EACrD,uBAAuB,EAAE,wBAAwB,EACjD,wBAAwB,EAAE,yBAAyB,EACnD,oBAAoB,EAAE,qBAAqB,GAC5C,MAAM,gBAAgB,CAAC"}
@@ -13,4 +13,5 @@ export { ApplicationGateway } from "./application-gateway.js";
13
13
  export { ContainerInstance } from "./container-instance.js";
14
14
  export { RedisCache } from "./redis-cache.js";
15
15
  export { PrivateEndpoint } from "./private-endpoint.js";
16
+ export { ContainerAppNetwork, ContainerAppSite } from "./container-app.js";
16
17
  export { GovernanceFoundation, GovernanceBaseline, LocationRestriction, ActivityLogSink } from "./landing-zone.js";
@@ -49,6 +49,36 @@
49
49
  */
50
50
  import { type AzHttp } from "./op/activities/az-apply.js";
51
51
  import type { DeepNormalizationHooks, DeepObservationResult } from "@intentius/chant/lexicon";
52
+ /** The full `az resource show -o json` shape this reader reads (a superset of the thin path's `AzResourceShowResponse`). */
53
+ export interface ArmResourceShowResponse {
54
+ id?: string;
55
+ name?: string;
56
+ type?: string;
57
+ location?: string;
58
+ kind?: string;
59
+ sku?: unknown;
60
+ identity?: unknown;
61
+ tags?: Record<string, string>;
62
+ zones?: string[];
63
+ plan?: unknown;
64
+ etag?: string;
65
+ systemData?: unknown;
66
+ properties?: Record<string, unknown>;
67
+ }
68
+ /**
69
+ * Reshape one `az resource show` response into chant's own flat declared
70
+ * vocabulary: the resource-level fields ARM returns as siblings of
71
+ * `properties`, plus every `properties.*` field spread onto that same top
72
+ * level (see the module doc). `id`/`type`/`etag`/`systemData` are envelope
73
+ * bookkeeping with no declared counterpart and are never read in at all.
74
+ *
75
+ * `queriedName` is the declared name the GET was addressed by. A child
76
+ * resource is declared as `vnet/subnet` while ARM answers with the leaf
77
+ * (`name: "subnet"`) — the same identity in two spellings, since the URL that
78
+ * returned 200 is the declared name. The leaf is folded back to the declared
79
+ * spelling; a name that is not the leaf of the query is kept as returned.
80
+ */
81
+ export declare function buildLiveProperties(obj: ArmResourceShowResponse, queriedName?: string): Record<string, unknown>;
52
82
  /**
53
83
  * Server-populated wherever they appear — matched on the final path segment,
54
84
  * the same technique AWS's `AWS_READ_ONLY_NAMES` uses, because ARM repeats
@@ -1 +1 @@
1
- {"version":3,"file":"deep-observe.d.ts","sourceRoot":"","sources":["../src/deep-observe.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AAIH,OAAO,EAA4B,KAAK,MAAM,EAAE,MAAM,0BAA0B,CAAC;AACjF,OAAO,KAAK,EAGV,sBAAsB,EACtB,qBAAqB,EAGtB,MAAM,0BAA0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,QAAQ,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;CAC/E;AAED;;;;;;GAMG;AACH,wBAAsB,yBAAyB,CAC7C,OAAO,EAAE,uBAAuB,GAC/B,OAAO,CAAC,qBAAqB,CAAC,CAkEhC"}
@@ -68,7 +68,7 @@ import { AZURE_TAG_OWNERSHIP_KEYS } from "./ownership.js";
68
68
  * returned 200 is the declared name. The leaf is folded back to the declared
69
69
  * spelling; a name that is not the leaf of the query is kept as returned.
70
70
  */
71
- function buildLiveProperties(obj, queriedName) {
71
+ export function buildLiveProperties(obj, queriedName) {
72
72
  const out = {};
73
73
  if (obj.name !== undefined) {
74
74
  out.name =
package/dist/index.d.ts CHANGED
@@ -8,6 +8,7 @@ export { defaultTags, type TagEntry, type DefaultTags } from "./default-tags.js"
8
8
  export { deploymentScope, isDeploymentScope, type DeploymentScope, type DeployScope } from "./deploy-scopes.js";
9
9
  export { azureSerializer } from "./serializer.js";
10
10
  export { azurePlugin } from "./plugin.js";
11
+ export { azureCapabilityPlugin } from "./components/capability-plugin.js";
11
12
  export { Parameter } from "./parameter.js";
12
13
  export { observeResourcesDeepAzure, azureDeepNormalizationHooks, AZURE_READ_ONLY_NAMES, AZURE_SERVER_COMPUTED_NAMES, AZURE_SERVICE_DEFAULTS, } from "./deep-observe.js";
13
14
  export { ResourceId, ResourceIdIntrinsic, Reference, ReferenceIntrinsic, Concat, ConcatIntrinsic, ResourceGroup, ResourceGroupIntrinsic, Subscription, SubscriptionIntrinsic, UniqueString, UniqueStringIntrinsic, Format, FormatIntrinsic, If, IfIntrinsic, ListKeys, ListKeysIntrinsic, } from "./intrinsics.js";
@@ -16,7 +17,7 @@ export { isChildProject, type ChildProjectInstance } from "@intentius/chant/chil
16
17
  export { stackOutput, isStackOutput, type StackOutput } from "@intentius/chant/stack-output";
17
18
  export { LexiconOutput, output, isLexiconOutput } from "@intentius/chant/lexicon-output";
18
19
  export * from "./generated/index.js";
19
- export { StorageAccountSecure, type StorageAccountSecureProps, type StorageAccountSecureResult, VnetDefault, type VnetDefaultProps, type VnetDefaultResult, VmLinux, type VmLinuxProps, type VmLinuxResult, AppService, type AppServiceProps, type AppServiceResult, AksCluster, type AksClusterProps, type AksClusterResult, SqlDatabase, type SqlDatabaseProps, type SqlDatabaseResult, KeyVaultSecure, type KeyVaultSecureProps, type KeyVaultSecureResult, ContainerRegistrySecure, type ContainerRegistrySecureProps, type ContainerRegistrySecureResult, FunctionApp, type FunctionAppProps, type FunctionAppResult, ServiceBusPipeline, type ServiceBusPipelineProps, type ServiceBusPipelineResult, CosmosDatabase, type CosmosDatabaseProps, type CosmosDatabaseResult, ApplicationGateway, type ApplicationGatewayProps, type ApplicationGatewayResult, ContainerInstance, type ContainerInstanceProps, type ContainerInstanceResult, RedisCache, type RedisCacheProps, type RedisCacheResult, PrivateEndpoint, type PrivateEndpointProps, type PrivateEndpointResult, GovernanceFoundation, type GovernanceFoundationProps, type GovernanceFoundationResult, GovernanceBaseline, type GovernanceBaselineProps, type GovernanceBaselineResult, LocationRestriction, type LocationRestrictionProps, type LocationRestrictionResult, ActivityLogSink, type ActivityLogSinkProps, type ActivityLogSinkResult, } from "./composites/index.js";
20
+ export { StorageAccountSecure, type StorageAccountSecureProps, type StorageAccountSecureResult, VnetDefault, type VnetDefaultProps, type VnetDefaultResult, VmLinux, type VmLinuxProps, type VmLinuxResult, AppService, type AppServiceProps, type AppServiceResult, AksCluster, type AksClusterProps, type AksClusterResult, SqlDatabase, type SqlDatabaseProps, type SqlDatabaseResult, KeyVaultSecure, type KeyVaultSecureProps, type KeyVaultSecureResult, ContainerRegistrySecure, type ContainerRegistrySecureProps, type ContainerRegistrySecureResult, FunctionApp, type FunctionAppProps, type FunctionAppResult, ServiceBusPipeline, type ServiceBusPipelineProps, type ServiceBusPipelineResult, CosmosDatabase, type CosmosDatabaseProps, type CosmosDatabaseResult, ApplicationGateway, type ApplicationGatewayProps, type ApplicationGatewayResult, ContainerInstance, type ContainerInstanceProps, type ContainerInstanceResult, RedisCache, type RedisCacheProps, type RedisCacheResult, PrivateEndpoint, type PrivateEndpointProps, type PrivateEndpointResult, ContainerAppNetwork, type ContainerAppNetworkProps, type ContainerAppNetworkResult, ContainerAppSite, type ContainerAppSiteProps, type ContainerAppSiteResult, GovernanceFoundation, type GovernanceFoundationProps, type GovernanceFoundationResult, GovernanceBaseline, type GovernanceBaselineProps, type GovernanceBaselineResult, LocationRestriction, type LocationRestrictionProps, type LocationRestrictionResult, ActivityLogSink, type ActivityLogSinkProps, type ActivityLogSinkResult, } from "./composites/index.js";
20
21
  export { landingZoneConfig, locationRestriction, DENY_CLASSIC_RESOURCES, DENY_UNMANAGED_DISKS, ACTIVITY_LOG_TO_LOG_ANALYTICS_DEFINITION_ID, FOUNDATION_MANAGEMENT_GROUPS, } from "./governance.js";
21
22
  export type { AzureGovernanceConfig, LandingZoneConfigProps, ManagementGroupConfig, PolicyConfig, SubscriptionConfig, } from "./governance.js";
22
23
  export { StorageRoles, ComputeRoles, NetworkRoles, KeyVaultRoles, SqlRoles, ContainerRoles, AppServiceRoles, IdentityRoles, } from "./actions/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGxG,OAAO,EAAE,WAAW,EAAE,KAAK,QAAQ,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,KAAK,eAAe,EAAE,KAAK,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC7G,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/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,wBAAwB,EAAE,KAAK,yBAAyB,EAClF,eAAe,EAAE,KAAK,oBAAoB,EAAE,KAAK,qBAAqB,GACvE,MAAM,oBAAoB,CAAC;AAI5B,OAAO,EACL,iBAAiB,EAAE,mBAAmB,EACtC,sBAAsB,EAAE,oBAAoB,EAC5C,2CAA2C,EAAE,4BAA4B,GAC1E,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,qBAAqB,EAAE,sBAAsB,EAC7C,qBAAqB,EAAE,YAAY,EAAE,kBAAkB,GACxD,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,GACd,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,QAAQ,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC"}
package/dist/index.js CHANGED
@@ -15,6 +15,9 @@ export { defaultTags } from "./default-tags.js";
15
15
  export { deploymentScope, isDeploymentScope } from "./deploy-scopes.js";
16
16
  export { azureSerializer } from "./serializer.js";
17
17
  export { azurePlugin } from "./plugin.js";
18
+ // Core's capability-plugin loader scans this package's exports and loads
19
+ // `azureCapabilityPlugin` when a project's chant.config lists this lexicon (#4273).
20
+ export { azureCapabilityPlugin } from "./components/capability-plugin.js";
18
21
  export { Parameter } from "./parameter.js";
19
22
  // Deep observation (#1086): the `az resource show` reader and the noise
20
23
  // rules it shares with core's normalization pass.
@@ -30,7 +33,7 @@ export { LexiconOutput, output, isLexiconOutput } from "@intentius/chant/lexicon
30
33
  // --- Generated resource classes ---
31
34
  export * from "./generated/index.js";
32
35
  // --- Composites ---
33
- export { StorageAccountSecure, VnetDefault, VmLinux, AppService, AksCluster, SqlDatabase, KeyVaultSecure, ContainerRegistrySecure, FunctionApp, ServiceBusPipeline, CosmosDatabase, ApplicationGateway, ContainerInstance, RedisCache, PrivateEndpoint, GovernanceFoundation, GovernanceBaseline, LocationRestriction, ActivityLogSink, } from "./composites/index.js";
36
+ export { StorageAccountSecure, VnetDefault, VmLinux, AppService, AksCluster, SqlDatabase, KeyVaultSecure, ContainerRegistrySecure, FunctionApp, ServiceBusPipeline, CosmosDatabase, ApplicationGateway, ContainerInstance, RedisCache, PrivateEndpoint, ContainerAppNetwork, ContainerAppSite, GovernanceFoundation, GovernanceBaseline, LocationRestriction, ActivityLogSink, } from "./composites/index.js";
34
37
  // Azure governance authoring: the desired-state config the Azure
35
38
  // external governance reconciler applies, and the typed landing-zone authoring layer.
36
39
  export { landingZoneConfig, locationRestriction, DENY_CLASSIC_RESOURCES, DENY_UNMANAGED_DISKS, ACTIVITY_LOG_TO_LOG_ANALYTICS_DEFINITION_ID, FOUNDATION_MANAGEMENT_GROUPS, } from "./governance.js";
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "algorithm": "sha256",
3
3
  "artifacts": {
4
- "manifest.json": "6d96e57d05d492a3402cf1747adb5bea4cb892aa0c471a8a762f64965657a8fe",
4
+ "manifest.json": "bc610c4143712ac195d56822a922054f5f94b9251a30403488a71c273bae7278",
5
5
  "meta.json": "d2521221ed616d882ded4296f0071685bd74e4b645d55dabc9685733c37dc419",
6
6
  "types/index.d.ts": "29631032bda9533849178968290e65d72250eab0b8bab424f2d9ef9b4e8546a4",
7
7
  "rules/hardcoded-location.ts": "0b895449c8c94066e81721c46be24249231029fe13b471477456df5c4e45b8bf",
@@ -32,10 +32,10 @@
32
32
  "rules/azr031.ts": "7f0654c9dce1e3a1a86818d8b4d0201fb4600021f7a4a757c36b1513fe16e0fd",
33
33
  "rules/azr032.ts": "ea94cc7fdece0812c43898c76c4b8a115a306157b741fe3b76fe726335f6c2d2",
34
34
  "rules/azr033.ts": "d440ec79a1563160bb7c8cc29c81880da71997c872215f14ec3be18f05a07ed3",
35
- "skills/chant-azure.md": "86399e4fafd35cdf56670b32dbff5db42a4bfa1453b25231c4ee15eea9a2a1b9",
36
- "skills/chant-azure-security.md": "95ab789202662f60b43cf2fce1ae549cbcf5b689306481dabb656847281879ff",
37
- "skills/chant-azure-patterns.md": "1a3bacfac612826b77332d2692a59195638db9f1b5e8ea2eda7579621d25f603",
35
+ "skills/chant-azure.md": "e81c3a12c31196e3eebe399443328caacf65db61380a621d1fb6f1c359f6a077",
36
+ "skills/chant-azure-security.md": "d9a7a99c861dcab1ff6d0653f1e13e28d907babd045ae67c524b32b6ab80691e",
37
+ "skills/chant-azure-patterns.md": "2d8cb8bbeda73b695856cec4ddaf5b3a0efce76e4ee6e3cf14b90ca69dee5757",
38
38
  "skills/chant-azure-aks.md": "2d4e0098c1a22b54ffadd410564d9df0f3a04cb4eb7c6261f20ae33106e7aca8"
39
39
  },
40
- "composite": "170c51b22ffa7e7a75bdfa326ad514cf831357abb659803cd217edf6102f2925"
40
+ "composite": "f5d39f472b9337b9f6729b1a6adf719e59ad3dada43de344bdf112c2f0b3b409"
41
41
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azure",
3
- "version": "0.124.38",
3
+ "version": "0.124.40",
4
4
  "chantVersion": ">=0.1.0",
5
5
  "namespace": "Azure",
6
6
  "intrinsics": [
@@ -408,6 +408,22 @@ const { privateEndpoint, privateDnsZone, dnsZoneGroup, vnetLink } = PrivateEndpo
408
408
  export { storageAccount, privateEndpoint, privateDnsZone, dnsZoneGroup, vnetLink };
409
409
  ```
410
410
 
411
+ ### ContainerAppNetwork and ContainerAppSite
412
+ A Container Apps site in its own delegated subnet; one network can carry several sites:
413
+
414
+ ```ts
415
+ import { ContainerAppNetwork, ContainerAppSite } from "@intentius/chant-lexicon-azure";
416
+
417
+ export const network = ContainerAppNetwork({ name: "web" });
418
+
419
+ export const site = ContainerAppSite({
420
+ name: "web",
421
+ app: "frontend",
422
+ subnetId: network.subnet.id,
423
+ image: "nginx:1.27",
424
+ });
425
+ ```
426
+
411
427
  ## ARM Template Intrinsic Reference
412
428
 
413
429
  | Function | Description | Example |
@@ -267,6 +267,7 @@ Use the secure composite variants which apply these patterns automatically:
267
267
  - `ContainerInstance` — Managed identity, no public IP by default
268
268
  - `RedisCache` — Non-SSL port disabled, TLS 1.2
269
269
  - `PrivateEndpoint` — Private connectivity pattern with DNS zone
270
+ - `ContainerAppSite`: user-assigned identity, app logs to Log Analytics, optional VNet-only environment
270
271
 
271
272
  ## Post-Synth Check Reference
272
273
 
@@ -157,6 +157,8 @@ Composites group related Azure resources with secure defaults. Each returns an o
157
157
  | `ContainerInstance` | ContainerGroup | No public IP by default, resource limits set |
158
158
  | `RedisCache` | RedisCache | TLS 1.2 required, non-SSL port disabled |
159
159
  | `PrivateEndpoint` | PrivateEndpoint + PrivateDnsZone + VnetLink | DNS zone auto-registration, manual approval disabled |
160
+ | `ContainerAppNetwork` | VirtualNetwork + Subnet | Subnet delegated to Container Apps, /23 by default |
161
+ | `ContainerAppSite` | LogAnalyticsWorkspace + ManagedIdentity + ManagedEnvironment + ContainerApp | App logs to Log Analytics, user-assigned identity, Consumption profile |
160
162
  | `AksCluster` | ManagedCluster + AgentPool | RBAC enabled, network policy (calico), managed identity, Azure CNI |
161
163
  | `SqlDatabase` | SQLServer + Database + FirewallRule + AuditingSettings | TDE enabled, auditing enabled, TLS 1.2, no Azure-wide firewall rule |
162
164
  | `KeyVaultSecure` | KeyVault + AccessPolicy | Soft delete, purge protection, RBAC authorization, network ACLs |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intentius/chant-lexicon-azure",
3
- "version": "0.124.38",
3
+ "version": "0.124.40",
4
4
  "description": "Azure lexicon for chant — declarative IaC in TypeScript",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://intentius.io/chant",
@@ -39,6 +39,11 @@
39
39
  "types": "./dist/*.d.ts",
40
40
  "default": "./dist/*.js"
41
41
  },
42
+ "./components": {
43
+ "development": "./src/components/index.ts",
44
+ "types": "./dist/components/index.d.ts",
45
+ "default": "./dist/components/index.js"
46
+ },
42
47
  "./detect": {
43
48
  "development": "./src/detect.ts",
44
49
  "types": "./dist/detect.d.ts",
@@ -74,6 +79,6 @@
74
79
  "typescript": "^5.9.3"
75
80
  },
76
81
  "peerDependencies": {
77
- "@intentius/chant": "^0.124.38"
82
+ "@intentius/chant": "^0.124.40"
78
83
  }
79
84
  }
@@ -0,0 +1,80 @@
1
+ /**
2
+ * `arm-deploy`'s plan and apply against floci-az (#4273), over `fetch`. Set
3
+ * CHANT_FLOCI_AZ_ENDPOINT to a running floci-az, for example
4
+ * `docker run -d --name chant-floci-az-e2e -p 4577:4577 floci/floci-az:0.10.0`
5
+ * and `CHANT_FLOCI_AZ_ENDPOINT=http://localhost:4577`. Skipped without it.
6
+ */
7
+
8
+ import { afterAll, beforeAll, describe, expect, it } from "vitest";
9
+ import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
10
+ import { tmpdir } from "node:os";
11
+ import { join } from "node:path";
12
+ import { azDelete } from "../op/activities/az-apply";
13
+ import { ArmDeployPlanMovedError, createArmDeployCapability } from "./arm-deploy";
14
+
15
+ const endpoint = process.env.CHANT_FLOCI_AZ_ENDPOINT;
16
+
17
+ describe.skipIf(!endpoint)("arm-deploy plan against floci-az (#4273)", () => {
18
+ const resourceGroup = `chant-arm-plan-${process.pid}`;
19
+ const ctx = { env: "local", component: resourceGroup };
20
+ const saved = { ...process.env };
21
+ let dir: string;
22
+ let template: string;
23
+ const account = (accessTier: string) => ({
24
+ type: "Microsoft.Storage/storageAccounts",
25
+ apiVersion: "2023-01-01",
26
+ name: `chantplan${process.pid}`,
27
+ location: "[resourceGroup().location]",
28
+ sku: { name: "Standard_LRS" },
29
+ kind: "StorageV2",
30
+ properties: { accessTier },
31
+ });
32
+ const write = (accessTier: string): void =>
33
+ writeFileSync(
34
+ template,
35
+ JSON.stringify({
36
+ resources: [account(accessTier)],
37
+ outputs: { group: { type: "string", value: "[resourceGroup().name]" } },
38
+ }),
39
+ );
40
+
41
+ beforeAll(() => {
42
+ process.env.AZURE_ENDPOINT_URL = endpoint;
43
+ dir = mkdtempSync(join(tmpdir(), "arm-plan-floci-az-"));
44
+ template = join(dir, "deploymentTemplate.json");
45
+ });
46
+
47
+ afterAll(async () => {
48
+ try {
49
+ await azDelete({ templatePath: template, resourceGroup, endpoint });
50
+ } catch { /* never created */ }
51
+ process.env = saved;
52
+ rmSync(dir, { recursive: true, force: true });
53
+ });
54
+
55
+ it("plans a create, applies it, plans no change, plans an update and refuses a plan the template moved past", async () => {
56
+ const capability = createArmDeployCapability();
57
+ const input = { template, resourceGroup };
58
+
59
+ write("Hot");
60
+ const created = await capability.plan!(ctx, input);
61
+ expect(created.changeSet!.entries.map((e) => e.action)).toEqual(["create"]);
62
+ const first = await capability.run({ ...ctx, plans: { [resourceGroup]: created.artifact } }, input);
63
+ expect(first.applied).toHaveLength(1);
64
+ expect(first.outputs).toEqual({ group: resourceGroup });
65
+
66
+ const same = await capability.plan!(ctx, input);
67
+ expect(same.changeSet!.entries.map((e) => e.action)).toEqual(["no-op"]);
68
+
69
+ write("Cool");
70
+ const updated = await capability.plan!(ctx, input);
71
+ expect(updated.changeSet!.entries.map((e) => [e.action, e.attributes])).toEqual([
72
+ ["update", [{ path: "accessTier", before: "Hot", after: "Cool" }]],
73
+ ]);
74
+
75
+ // The template moves after the plan: run refuses and changes nothing.
76
+ write("Hot");
77
+ await expect(capability.run({ ...ctx, plans: { [resourceGroup]: updated.artifact } }, input)).rejects.toBeInstanceOf(ArmDeployPlanMovedError);
78
+ expect((await capability.plan!(ctx, input)).changeSet!.entries.map((e) => e.action)).toEqual(["no-op"]);
79
+ }, 120_000);
80
+ });