@intentius/behold 0.30.2 → 0.32.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.
Files changed (102) hide show
  1. package/AGENTS.md +791 -16
  2. package/README.md +78 -23
  3. package/THIRD_PARTY.md +6 -5
  4. package/demos.json +14 -9
  5. package/dist/cli.js +51926 -20221
  6. package/example-carve/README.md +19 -23
  7. package/example-carve/app/package.json +1 -1
  8. package/example-carve/app/src/carved.ts +3 -3
  9. package/example-carve/carve-report.json +1 -1
  10. package/example-carve/{legacy-tf → tf-root}/terraform.tfstate +1 -1
  11. package/example-choudoufu-estate/README.md +7 -0
  12. package/example-choudoufu-estate/chant.workspace.json +1 -1
  13. package/example-choudoufu-estate/scripts/choudoufu-down.sh +2 -1
  14. package/example-choudoufu-estate/scripts/choudoufu-up.sh +10 -3
  15. package/example-terraform-estate/README.md +32 -5
  16. package/example-terraform-estate/chant.workspace.json +1 -1
  17. package/example-terraform-estate/recorded/adoption/platform.json +72 -0
  18. package/example-terraform-estate/recorded/adoption/prod.json +224 -0
  19. package/example-three-cloud/README.md +111 -18
  20. package/example-three-cloud/aws/Pulumi.yaml +15 -0
  21. package/example-three-cloud/aws/index.ts +174 -0
  22. package/example-three-cloud/aws/package-lock.json +2725 -0
  23. package/example-three-cloud/aws/package.json +14 -0
  24. package/example-three-cloud/aws/tsconfig.json +17 -0
  25. package/example-three-cloud/azure/main.tf +48 -0
  26. package/example-three-cloud/azure/site.tf +104 -0
  27. package/example-three-cloud/chant.config.json +9 -0
  28. package/example-three-cloud/chant.workspace.json +30 -4
  29. package/example-three-cloud/dns/chant.config.ts +26 -1
  30. package/example-three-cloud/dns/src/records.component.ts +32 -6
  31. package/example-three-cloud/package-lock.json +48 -27
  32. package/example-three-cloud/package.json +8 -6
  33. package/example-three-cloud/scripts/emulators-up.sh +28 -1
  34. package/example-three-cloud/scripts/front-door.ts +679 -86
  35. package/package.json +26 -8
  36. package/schemas/graph/v1/graph.schema.json +140 -0
  37. package/web/adopt-pulumi.js +114 -0
  38. package/web/adopt-pulumi.test.js +28 -0
  39. package/web/adopt.js +203 -0
  40. package/web/adopt.test.js +27 -0
  41. package/web/app.js +367 -14
  42. package/web/boot-motion.js +6 -0
  43. package/web/carve-steps.js +1 -1
  44. package/web/carve-steps.test.js +2 -2
  45. package/web/change-set-overlay.js +12 -5
  46. package/web/change-set-overlay.test.js +22 -0
  47. package/web/cut-around.d.ts +30 -0
  48. package/web/cut-around.js +138 -0
  49. package/web/drift-stream.js +241 -0
  50. package/web/drift-stream.test.js +146 -0
  51. package/web/edge-weight.d.ts +8 -2
  52. package/web/edge-weight.js +38 -4
  53. package/web/edge-weight.test.js +55 -1
  54. package/web/graph-query.js +180 -0
  55. package/web/graph-query.test.js +49 -0
  56. package/web/graph.html +107 -0
  57. package/web/index-diff.js +109 -0
  58. package/web/index-diff.test.js +39 -0
  59. package/web/index.html +45 -20
  60. package/web/kiosk-ask-tips.js +15 -5
  61. package/web/kiosk-ask-tips.test.js +14 -1
  62. package/web/kiosk-estate-scene.js +72 -8
  63. package/web/kiosk-light-frame.js +1 -0
  64. package/web/kiosk-light.js +41 -3
  65. package/web/kiosk-member-kind.test.js +140 -0
  66. package/web/kiosk-popover.js +4 -1
  67. package/web/kiosk-side.js +296 -0
  68. package/web/kiosk-side.test.js +249 -0
  69. package/web/kiosk-watch.js +12 -0
  70. package/web/kiosk-watch.test.js +15 -1
  71. package/web/kiosk.html +47 -1
  72. package/web/kiosk.js +106 -7
  73. package/web/member-kind.js +31 -0
  74. package/web/neighbourhood.js +105 -0
  75. package/web/neighbourhood.test.js +131 -0
  76. package/web/outside-refs.js +515 -0
  77. package/web/outside-refs.test.js +249 -0
  78. package/web/template-apps.js +245 -0
  79. package/web/template-apps.test.js +252 -0
  80. package/web/templates.js +285 -0
  81. package/web/templates.test.js +155 -0
  82. package/web/terragucci-lifecycle.js +112 -62
  83. package/web/terragucci-lifecycle.test.js +29 -1
  84. package/web/terragucci-timeline.js +39 -2
  85. package/web/terragucci-timeline.test.js +42 -1
  86. package/web/theme-paint.js +14 -0
  87. package/example-three-cloud/aws/chant.config.ts +0 -8
  88. package/example-three-cloud/aws/site.component.ts +0 -13
  89. package/example-three-cloud/aws/src/site.ts +0 -27
  90. package/example-three-cloud/azure/chant.config.ts +0 -1
  91. package/example-three-cloud/azure/src/site.component.ts +0 -13
  92. package/example-three-cloud/azure/src/site.ts +0 -18
  93. /package/example-carve/{legacy-tf → tf-root}/cdn.tf +0 -0
  94. /package/example-carve/{legacy-tf → tf-root}/compute.tf +0 -0
  95. /package/example-carve/{legacy-tf → tf-root}/floci-override.tf.disabled +0 -0
  96. /package/example-carve/{legacy-tf → tf-root}/modules/cdn/main.tf +0 -0
  97. /package/example-carve/{legacy-tf → tf-root}/naming.tf +0 -0
  98. /package/example-carve/{legacy-tf → tf-root}/network.tf +0 -0
  99. /package/example-carve/{legacy-tf → tf-root}/observability.tf +0 -0
  100. /package/example-carve/{legacy-tf → tf-root}/outputs.tf +0 -0
  101. /package/example-carve/{legacy-tf → tf-root}/storage.tf +0 -0
  102. /package/example-carve/{legacy-tf → tf-root}/versions.tf +0 -0
@@ -0,0 +1,14 @@
1
+ {
2
+ "name": "three-cloud-aws",
3
+ "private": true,
4
+ "main": "index.ts",
5
+ "description": "The three-cloud demo's aws member: a Pulumi program run by plunge against the floci emulator. pulumi-aws is pinned as the plunge corpus pins it (plunge tests/plunge-corpus/aws-ts).",
6
+ "devDependencies": {
7
+ "@types/node": "^22.0.0",
8
+ "typescript": "^5.6.0"
9
+ },
10
+ "dependencies": {
11
+ "@pulumi/aws": "7.51.1",
12
+ "@pulumi/pulumi": "3.272.0"
13
+ }
14
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "outDir": "bin",
5
+ "target": "es2020",
6
+ "module": "commonjs",
7
+ "moduleResolution": "node",
8
+ "sourceMap": true,
9
+ "experimentalDecorators": true,
10
+ "pretty": true,
11
+ "noFallthroughCasesInSwitch": true,
12
+ "noImplicitReturns": true,
13
+ "forceConsistentCasingInFileNames": true,
14
+ "skipLibCheck": true
15
+ },
16
+ "files": ["index.ts"]
17
+ }
@@ -0,0 +1,48 @@
1
+ # The azure member as a choudoufu estate on floci-az (INTENTIUS/choudoufu#2246).
2
+ # The live block makes this a choudoufu root: ownership is the tofu-estate
3
+ # tag on each resource, and the subnet, which takes no tags, is held by its
4
+ # record in the local record store (.tofu-records beside this file).
5
+ #
6
+ # The provider block is written the way choudoufu's own floci-az estates
7
+ # write theirs (choudoufu live/e2e/lib/floci-az.sh, floci_az_azurerm_args):
8
+ # every endpoint and credential argument stated, so nothing in the shell can
9
+ # aim azurerm at a real subscription. metadata_host alone picks the cloud,
10
+ # and it can only be a loopback host:port. floci-az never checks the client
11
+ # secret; the value says it is a fake one, which is also what lets chant's
12
+ # TF008 (no literal credential in a provider block) tell it from a real one.
13
+ terraform {
14
+ required_providers {
15
+ azurerm = {
16
+ source = "hashicorp/azurerm"
17
+ version = "= 5.10.0"
18
+ }
19
+ }
20
+ live {
21
+ estate = "three-cloud-azure"
22
+ }
23
+ }
24
+
25
+ variable "floci_az_host" {
26
+ type = string
27
+ default = "localhost:4577"
28
+ description = "The floci-az container's host:port. scripts/front-door.ts sets TF_VAR_floci_az_host from AZURE_ENDPOINT_URL; never a real Azure host."
29
+ validation {
30
+ condition = can(regex("^(localhost|127\\.0\\.0\\.1):[0-9]+$", var.floci_az_host))
31
+ error_message = "floci_az_host must be a loopback host:port: this estate talks only to floci-az."
32
+ }
33
+ }
34
+
35
+ provider "azurerm" {
36
+ features {}
37
+ subscription_id = "00000000-0000-0000-0000-000000000001"
38
+ tenant_id = "00000000-0000-0000-0000-000000000002"
39
+ client_id = "00000000-0000-0000-0000-000000000003"
40
+ client_secret = "floci-az-fake-secret"
41
+ metadata_host = var.floci_az_host
42
+ use_cli = false
43
+ use_msi = false
44
+ use_oidc = false
45
+ use_aks_workload_identity = false
46
+ resource_provider_registrations = "none"
47
+ disable_terraform_partner_id = true
48
+ }
@@ -0,0 +1,104 @@
1
+ # The website on Azure Container Apps in West Europe: what the chant azure
2
+ # lexicon's ContainerAppNetwork and ContainerAppSite composites declared,
3
+ # resource for resource. The resource group is `local`, named after the
4
+ # environment, and the app is `web`, so scripts/front-door.ts finds the app
5
+ # at the same ARM path as before.
6
+
7
+ resource "azurerm_resource_group" "site" {
8
+ name = "local"
9
+ location = "westeurope"
10
+ }
11
+
12
+ # The network: a VNet, and a subnet delegated to Container Apps environments.
13
+ resource "azurerm_virtual_network" "network" {
14
+ name = "three-cloud-vnet"
15
+ location = azurerm_resource_group.site.location
16
+ resource_group_name = azurerm_resource_group.site.name
17
+ address_space = ["10.40.0.0/16"]
18
+ }
19
+
20
+ resource "azurerm_subnet" "apps" {
21
+ name = "apps"
22
+ resource_group_name = azurerm_resource_group.site.name
23
+ virtual_network_name = azurerm_virtual_network.network.name
24
+ address_prefixes = ["10.40.0.0/23"]
25
+
26
+ delegation {
27
+ name = "apps"
28
+ service_delegation {
29
+ name = "Microsoft.App/environments"
30
+ actions = ["Microsoft.Network/virtualNetworks/subnets/join/action"]
31
+ }
32
+ }
33
+ }
34
+
35
+ # The site: an environment in that subnet shipping logs to its own
36
+ # workspace, and one app running as a user-assigned identity.
37
+ resource "azurerm_log_analytics_workspace" "logs" {
38
+ name = "three-cloud-logs"
39
+ location = azurerm_resource_group.site.location
40
+ resource_group_name = azurerm_resource_group.site.name
41
+ sku = "PerGB2018"
42
+ retention_in_days = 30
43
+ }
44
+
45
+ resource "azurerm_user_assigned_identity" "web" {
46
+ name = "three-cloud-web"
47
+ location = azurerm_resource_group.site.location
48
+ resource_group_name = azurerm_resource_group.site.name
49
+ }
50
+
51
+ resource "azurerm_container_app_environment" "site" {
52
+ name = "three-cloud"
53
+ location = azurerm_resource_group.site.location
54
+ resource_group_name = azurerm_resource_group.site.name
55
+ infrastructure_subnet_id = azurerm_subnet.apps.id
56
+ logs_destination = "log-analytics"
57
+ log_analytics_workspace_id = azurerm_log_analytics_workspace.logs.id
58
+
59
+ workload_profile {
60
+ name = "Consumption"
61
+ workload_profile_type = "Consumption"
62
+ }
63
+ }
64
+
65
+ resource "azurerm_container_app" "web" {
66
+ name = "web"
67
+ resource_group_name = azurerm_resource_group.site.name
68
+ container_app_environment_id = azurerm_container_app_environment.site.id
69
+ revision_mode = "Single"
70
+ workload_profile_name = "Consumption"
71
+
72
+ identity {
73
+ type = "UserAssigned"
74
+ identity_ids = [azurerm_user_assigned_identity.web.id]
75
+ }
76
+
77
+ ingress {
78
+ external_enabled = true
79
+ target_port = 80
80
+ transport = "auto"
81
+ traffic_weight {
82
+ latest_revision = true
83
+ percentage = 100
84
+ }
85
+ }
86
+
87
+ template {
88
+ min_replicas = 1
89
+ max_replicas = 1
90
+ container {
91
+ name = "web"
92
+ image = "traefik/whoami:v1.10"
93
+ cpu = 0.25
94
+ memory = "0.5Gi"
95
+ }
96
+ }
97
+ }
98
+
99
+ # The dns member reads this as its `azureEndpoint` parameter. The name is the
100
+ # one the chant member published, so the join stays the same; wiring a
101
+ # choudoufu output into a chant parameter is INTENTIUS/chant#4455 (C5).
102
+ output "azureEndpoint" {
103
+ value = azurerm_container_app.web.ingress[0].fqdn
104
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "lexicons": ["terraform"],
3
+ "terraform": {
4
+ "binary": "choudoufu",
5
+ "roots": {
6
+ "azure": { "dir": "azure" }
7
+ }
8
+ }
9
+ }
@@ -1,10 +1,36 @@
1
1
  {
2
2
  "name": "three-cloud",
3
3
  "schema": 1,
4
+ "pins": [
5
+ {
6
+ "package": "@intentius/chant-lexicon-terraform",
7
+ "version": "0.124.98"
8
+ },
9
+ {
10
+ "package": "@intentius/chant-lexicon-pulumi",
11
+ "version": "0.124.98"
12
+ }
13
+ ],
4
14
  "members": [
5
- { "name": "dns", "dir": "dns", "kind": "chant" },
6
- { "name": "aws", "dir": "aws", "kind": "chant" },
7
- { "name": "azure", "dir": "azure", "kind": "chant" },
8
- { "name": "gcp", "dir": "gcp", "kind": "chant" }
15
+ {
16
+ "name": "dns",
17
+ "dir": "dns",
18
+ "kind": "chant"
19
+ },
20
+ {
21
+ "name": "aws",
22
+ "dir": "aws",
23
+ "kind": "pulumi"
24
+ },
25
+ {
26
+ "name": "azure",
27
+ "dir": "azure",
28
+ "kind": "choudoufu"
29
+ },
30
+ {
31
+ "name": "gcp",
32
+ "dir": "gcp",
33
+ "kind": "chant"
34
+ }
9
35
  ]
10
36
  }
@@ -1 +1,26 @@
1
- export default { lexicons: ["aws"], sourceDir: "src", environments: [{ name: "local", endpoint: "http://localhost:4566" }] };
1
+ import { terraformRootSchema } from "@intentius/chant-lexicon-terraform/config";
2
+
3
+ // terraform and pulumi are listed for the azure and aws components'
4
+ // member-outputs steps: the terraform lexicon is what reads a choudoufu
5
+ // member's outputs, and the pulumi lexicon a Pulumi member's (chant#4455,
6
+ // pulumiOutputSource, which runs plunge for a member on plunge). terraform's
7
+ // one root is the azure estate, so a change under ../azure names the azure
8
+ // component as a changed unit and brings dns into the change with it.
9
+ //
10
+ // The azure root is the azure member's, not dns's, so it is marked
11
+ // signalOnly (chant#4484): change detection still counts it, and chant
12
+ // neither builds it nor reads it live as dns's own. chant 0.124.52 and older
13
+ // predate the key, and their strict root schema refuses it, so the key is
14
+ // dropped below when the installed terraform lexicon's root schema does not
15
+ // take it. With that chant, dns draws the azure root as its own, as it did
16
+ // before the key existed. The key is written as a literal so chant's static
17
+ // config read, which never runs this file, sees it too.
18
+ const AZURE_ROOT: { dir: string; signalOnly?: boolean } = { dir: "../azure", signalOnly: true };
19
+ if (!terraformRootSchema.safeParse(AZURE_ROOT).success) delete AZURE_ROOT.signalOnly;
20
+
21
+ export default {
22
+ lexicons: ["aws", "terraform", "pulumi"],
23
+ sourceDir: "src",
24
+ environments: [{ name: "local", endpoint: "http://localhost:4566" }],
25
+ terraform: { binary: "choudoufu", roots: { azure: AZURE_ROOT } },
26
+ };
@@ -1,14 +1,40 @@
1
- import { phase, type Component } from "@intentius/chant/components";
1
+ import { memberOutputsComponent, phase, stackOutput, type Component } from "@intentius/chant/components";
2
+
3
+ // The azure member of chant.workspace.json, a choudoufu estate, as a
4
+ // component of this project (chant#4455): its one step reads the estate's
5
+ // outputs through choudoufu and never applies it. A change that touches
6
+ // azure/ plans dns against the azureEndpoint azure's own plan says it will
7
+ // have; while that is known only after azure applies, dns's plan names azure
8
+ // under its unresolved inputs, and dns applies once azure has.
9
+ export const azure = memberOutputsComponent("azure");
10
+
11
+ // The aws member, a Pulumi program on plunge (behold#1000), the same way: its
12
+ // one step reads the stack's outputs with `plunge stack output --json
13
+ // --show-secrets=false` (planned ones from `plunge preview --json`) and never
14
+ // applies it. While aws's preview still has changes the step refuses, so dns
15
+ // never applies against an awsEndpoint from before aws's own change.
16
+ export const aws = memberOutputsComponent("aws");
2
17
 
3
18
  // The dns member as one component, applied after the three sites: its
4
- // parameters are the endpoints they publish. The step is the emulator apply in
5
- // scripts/front-door.ts, which reads those endpoints from what is applied and
6
- // points each health check at the emulator that answers for it.
19
+ // parameters are the endpoints they publish. azureEndpoint and awsEndpoint
20
+ // are wired from the two components above. gcpEndpoint is still read from
21
+ // what is applied by the Build step (scripts/front-door.ts build-dns), which
22
+ // also points each health check at the emulator that answers for it and
23
+ // writes the template cfn-deploy applies as the stack named after the
24
+ // environment.
7
25
  export const records: Component = {
8
26
  name: "records",
9
27
  archetype: "infra",
10
- dependsOn: [],
28
+ dependsOn: ["azure", "aws"],
11
29
  deploy: [
12
- phase("Apply", [{ kind: "shell", cmd: "npx tsx ../scripts/front-door.ts apply-dns", reason: "the checks probe emulator addresses that only exist on this machine" }]),
30
+ phase("Build", [{ kind: "shell", cmd: "npx tsx ../scripts/front-door.ts build-dns", reason: "the checks probe emulator addresses that only exist on this machine" }]),
31
+ phase("Apply", [
32
+ {
33
+ kind: "cfn-deploy",
34
+ stack: "local",
35
+ template: "dist/dns.json",
36
+ inputs: { azureEndpoint: stackOutput("azure", "azureEndpoint"), awsEndpoint: stackOutput("aws", "awsEndpoint") },
37
+ },
38
+ ]),
13
39
  ],
14
40
  };
@@ -6,10 +6,11 @@
6
6
  "": {
7
7
  "name": "behold-example-three-cloud",
8
8
  "dependencies": {
9
- "@intentius/chant": "^0.124.52",
10
- "@intentius/chant-lexicon-aws": "^0.124.52",
11
- "@intentius/chant-lexicon-azure": "^0.124.52",
12
- "@intentius/chant-lexicon-gcp": "^0.124.52"
9
+ "@intentius/chant": "^0.124.98",
10
+ "@intentius/chant-lexicon-aws": "^0.124.98",
11
+ "@intentius/chant-lexicon-gcp": "^0.124.98",
12
+ "@intentius/chant-lexicon-pulumi": "^0.124.98",
13
+ "@intentius/chant-lexicon-terraform": "^0.124.98"
13
14
  }
14
15
  },
15
16
  "node_modules/@dagrejs/dagre": {
@@ -444,9 +445,9 @@
444
445
  }
445
446
  },
446
447
  "node_modules/@intentius/chant": {
447
- "version": "0.124.52",
448
- "resolved": "https://registry.npmjs.org/@intentius/chant/-/chant-0.124.52.tgz",
449
- "integrity": "sha512-+njDb55CwzB0LxvNmUU3LA8iuE0qljahDl48/N73PIYOqcP9z+ec/kMVXgBOjNE85VOdiy2//oB6liMipANsTA==",
448
+ "version": "0.124.98",
449
+ "resolved": "https://registry.npmjs.org/@intentius/chant/-/chant-0.124.98.tgz",
450
+ "integrity": "sha512-Tf1RKkcmrtRd8JOVs73ZxHsXBlnGzpvqat4LvwOBU0zKwKXtd8GaBvJPPoL4qsPbRIu18wpP+q8wr3QcW6N+og==",
450
451
  "license": "Apache-2.0",
451
452
  "dependencies": {
452
453
  "@dagrejs/dagre": "^3.0.0",
@@ -464,43 +465,43 @@
464
465
  "chant-wave": "dist/wave-runtime.mjs"
465
466
  },
466
467
  "peerDependencies": {
468
+ "@aws-sdk/credential-providers": "^3.0.0",
469
+ "@azure/identity": "^4.0.0",
470
+ "google-auth-library": "^9.0.0 || ^10.0.0",
467
471
  "vitest": ">=2"
468
472
  },
469
473
  "peerDependenciesMeta": {
474
+ "@aws-sdk/credential-providers": {
475
+ "optional": true
476
+ },
477
+ "@azure/identity": {
478
+ "optional": true
479
+ },
480
+ "google-auth-library": {
481
+ "optional": true
482
+ },
470
483
  "vitest": {
471
484
  "optional": true
472
485
  }
473
486
  }
474
487
  },
475
488
  "node_modules/@intentius/chant-lexicon-aws": {
476
- "version": "0.124.52",
477
- "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-aws/-/chant-lexicon-aws-0.124.52.tgz",
478
- "integrity": "sha512-i8UOQwlTUBukICNeLtG1RZCjsp/BoKxEVszdEvffw8nlA3pzD3snqfNzrtjoxs03MSfuVSyRlhdJ+TORBMjCjg==",
489
+ "version": "0.124.98",
490
+ "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-aws/-/chant-lexicon-aws-0.124.98.tgz",
491
+ "integrity": "sha512-8Mi66mguNuN1+oGl7Y4eQUXZvuO2kZHOzvy8HoV+QezLkHqcrLI6RfHGIYJmhGz3oDeLGR7LZUE3OU418khg9w==",
479
492
  "license": "Apache-2.0",
480
493
  "dependencies": {
481
494
  "fflate": "^0.8.2",
482
495
  "js-yaml": "^4.3.1"
483
496
  },
484
497
  "peerDependencies": {
485
- "@intentius/chant": "^0.124.52"
486
- }
487
- },
488
- "node_modules/@intentius/chant-lexicon-azure": {
489
- "version": "0.124.52",
490
- "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-azure/-/chant-lexicon-azure-0.124.52.tgz",
491
- "integrity": "sha512-ZyEXZQWjx90BZJuO9WAZTKAgbwQ30pjyQxWmlP9uOdhIfKm609+8PJwJSYLK6XrfeAG9HHHSkZUKHToa2AQG9g==",
492
- "license": "Apache-2.0",
493
- "dependencies": {
494
- "fflate": "^0.8.2"
495
- },
496
- "peerDependencies": {
497
- "@intentius/chant": "^0.124.52"
498
+ "@intentius/chant": "^0.124.98"
498
499
  }
499
500
  },
500
501
  "node_modules/@intentius/chant-lexicon-gcp": {
501
- "version": "0.124.52",
502
- "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-gcp/-/chant-lexicon-gcp-0.124.52.tgz",
503
- "integrity": "sha512-Sr+Kd8yBSC8kp0SRtVlnlH5gvthu6SRHw4tGb2wQnkrWqWSqITMMOb/+fk1WMNxz86xOPJVMDUrnmcLjhO0VxA==",
502
+ "version": "0.124.98",
503
+ "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-gcp/-/chant-lexicon-gcp-0.124.98.tgz",
504
+ "integrity": "sha512-mqKQJbO8Zucych1v2u35iWkflBkBZt3uutk4MfhFukH3PzGBRDl/7CtCBRT+dKbqbYxxhp6XvXeSCLj/Znb/WQ==",
504
505
  "license": "Apache-2.0",
505
506
  "dependencies": {
506
507
  "@types/js-yaml": "^4.0.9",
@@ -508,7 +509,27 @@
508
509
  "js-yaml": "^4.3.1"
509
510
  },
510
511
  "peerDependencies": {
511
- "@intentius/chant": "^0.124.52"
512
+ "@intentius/chant": "^0.124.98"
513
+ }
514
+ },
515
+ "node_modules/@intentius/chant-lexicon-pulumi": {
516
+ "version": "0.124.98",
517
+ "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-pulumi/-/chant-lexicon-pulumi-0.124.98.tgz",
518
+ "integrity": "sha512-I/oTgB0qF0P+9pXHTyFUsHMbt7Lza9cptFr9h5bTmj87w+wo/TGFz1MPSbacmdIvhJGc1cLEpEgedfMjZjNxLQ==",
519
+ "license": "Apache-2.0",
520
+ "peerDependencies": {
521
+ "@intentius/chant": "^0.124.98",
522
+ "zod": "^4.3.6"
523
+ }
524
+ },
525
+ "node_modules/@intentius/chant-lexicon-terraform": {
526
+ "version": "0.124.98",
527
+ "resolved": "https://registry.npmjs.org/@intentius/chant-lexicon-terraform/-/chant-lexicon-terraform-0.124.98.tgz",
528
+ "integrity": "sha512-X5/JRKWT/EQctpeonIzNqPEhpn9QmxsKTg7BtOy89pxaurP/ktAE1VIwjAv/uDSGOG8zwNcbSfmZpQ/S4h+DYA==",
529
+ "license": "Apache-2.0",
530
+ "peerDependencies": {
531
+ "@intentius/chant": "^0.124.98",
532
+ "zod": "^4.3.6"
512
533
  }
513
534
  },
514
535
  "node_modules/@types/js-yaml": {
@@ -2,15 +2,17 @@
2
2
  "name": "behold-example-three-cloud",
3
3
  "private": true,
4
4
  "type": "module",
5
- "description": "A website in three clouds behind Route 53, as a chant workspace on the floci emulators: behold's three-cloud demo and its exported page.",
5
+ "description": "A website in three clouds behind Route 53, as a chant workspace on the floci emulators: AWS and GCP as chant members, Azure as a choudoufu estate. behold's three-cloud demo and its exported page.",
6
6
  "scripts": {
7
7
  "emulators": "bash scripts/emulators-up.sh",
8
- "front-door": "tsx scripts/front-door.ts all --out export"
8
+ "front-door": "tsx scripts/front-door.ts all --out export",
9
+ "change-set": "tsx scripts/front-door.ts plan --out .front-door/change-set.json"
9
10
  },
10
11
  "dependencies": {
11
- "@intentius/chant": "^0.124.52",
12
- "@intentius/chant-lexicon-aws": "^0.124.52",
13
- "@intentius/chant-lexicon-azure": "^0.124.52",
14
- "@intentius/chant-lexicon-gcp": "^0.124.52"
12
+ "@intentius/chant": "^0.124.98",
13
+ "@intentius/chant-lexicon-aws": "^0.124.98",
14
+ "@intentius/chant-lexicon-gcp": "^0.124.98",
15
+ "@intentius/chant-lexicon-pulumi": "^0.124.98",
16
+ "@intentius/chant-lexicon-terraform": "^0.124.98"
15
17
  }
16
18
  }
@@ -11,6 +11,17 @@
11
11
  # socket, and floci-az is told to run Container Apps for real rather than mock
12
12
  # them. A container that is already running is left as it is.
13
13
  #
14
+ # floci-az also serves TLS, since the azure member is a choudoufu estate and
15
+ # azurerm reaches its metadata host over https (azure/main.tf). The
16
+ # certificate is the one choudoufu's scripts/floci-az-mac-cert.sh makes, from
17
+ # FLOCI_AZ_TLS_DIR (default ~/.config/choudoufu/floci-az-tls), when it is
18
+ # there: Go on macOS trusts only the keychain, so on a Mac run that script
19
+ # once and trust what it prints. Without one, floci-az makes its own CA,
20
+ # which scripts/front-door.ts adds to SSL_CERT_FILE on Linux. Plain http on
21
+ # the same port keeps answering. Then, when choudoufu (or CHOUDOUFU_BIN) is
22
+ # on PATH, `choudoufu init` fetches the estate's provider schemas, which
23
+ # behold reads the estate with.
24
+ #
14
25
  # Names, ports and images can be overridden, so a second copy can run beside
15
26
  # the first: FLOCI_CONTAINER, FLOCI_AZ_CONTAINER, FLOCI_GCP_CONTAINER,
16
27
  # FLOCI_PORT, FLOCI_AZ_PORT, FLOCI_GCP_PORT, FLOCI_IMAGE, FLOCI_AZ_IMAGE,
@@ -39,8 +50,24 @@ boot() {
39
50
 
40
51
  boot "${FLOCI_CONTAINER:-chant-floci}" "${FLOCI_PORT:-4566}" 4566 \
41
52
  "${FLOCI_IMAGE:-ghcr.io/lex00/floci:48c6e47}" /_floci/health
53
+ TLS_DIR="${FLOCI_AZ_TLS_DIR:-$HOME/.config/choudoufu/floci-az-tls}"
54
+ TLS=(-e FLOCI_AZ_TLS_ENABLED=true)
55
+ if [ -s "$TLS_DIR/cert.pem" ] && [ -s "$TLS_DIR/key.pem" ]; then
56
+ TLS+=(-v "$TLS_DIR/cert.pem:/etc/floci-az-tls/cert.pem:ro" -v "$TLS_DIR/key.pem:/etc/floci-az-tls/key.pem:ro"
57
+ -e FLOCI_AZ_TLS_CERT_PATH=/etc/floci-az-tls/cert.pem -e FLOCI_AZ_TLS_KEY_PATH=/etc/floci-az-tls/key.pem)
58
+ elif [ "$(uname -s)" = "Darwin" ]; then
59
+ echo "three-cloud: no floci-az certificate at $TLS_DIR/cert.pem, so choudoufu cannot reach floci-az from macOS: run choudoufu's scripts/floci-az-mac-cert.sh once and trust what it prints" >&2
60
+ fi
42
61
  boot "${FLOCI_AZ_CONTAINER:-chant-floci-az}" "${FLOCI_AZ_PORT:-4577}" 4577 \
43
62
  "${FLOCI_AZ_IMAGE:-ghcr.io/lex00/floci-az:7f079c2}" /_floci/health \
44
- -e FLOCI_AZ_SERVICES_CONTAINER_APPS_MOCKED=false
63
+ -e FLOCI_AZ_SERVICES_CONTAINER_APPS_MOCKED=false "${TLS[@]}"
45
64
  boot "${FLOCI_GCP_CONTAINER:-chant-floci-gcp}" "${FLOCI_GCP_PORT:-4588}" 4588 \
46
65
  "${FLOCI_GCP_IMAGE:-ghcr.io/lex00/floci-gcp:641e6e8}" /_floci-gcp/health
66
+
67
+ CHOUDOUFU="${CHOUDOUFU_BIN:-choudoufu}"
68
+ if command -v "$CHOUDOUFU" >/dev/null 2>&1; then
69
+ echo "three-cloud: choudoufu init in azure (provider schemas; downloads azurerm the first time)"
70
+ (cd "$(dirname "$0")/../azure" && "$CHOUDOUFU" init -input=false -no-color >/dev/null)
71
+ else
72
+ echo "three-cloud: ${CHOUDOUFU} is not on PATH (or set CHOUDOUFU_BIN), so the azure estate has no provider schemas and behold cannot read it" >&2
73
+ fi