{
  "name": "hosting",
  "version": "0.2.0",
  "description": "Who provides the infrastructure and which of their products realise your design: cloud providers and cloud services, attached to environments, datastores, queues and components with details. Say that the operations database runs on RDS in AWS without changing the design underneath. Also where things sit: the regions the system runs in, the network zones within them, and the rule that a datastore never lives in a public zone.",
  "license": "Apache-2.0",
  "publisher": "trumly",
  "namespace": "hst",
  "tier": "verified",
  "role": "enrichment",
  "useWhen": "When you need to say who provides the infrastructure, which of their services realise a datastore, queue or component, and where things sit (regions and network zones), for example that the operations database runs on RDS in AWS in a private zone in London.",
  "enriches": [
    "environment",
    "datastore",
    "queue",
    "component"
  ],
  "requires": [
    "core@^1.0.0"
  ],
  "optional": [
    "data-model@^0.5.0",
    "containers@^0.1.0",
    "kubernetes@^0.1.0"
  ],
  "includes": [],
  "sha256": "7054ba46367928a1ec2f660f8dd7505f5aa23ef8ee33a03598515b0b55bb10fb",
  "files": [
    [
      "hst--hosting",
      "---\nid: hst--hosting\ntype: plane\ntitle: Hosting\nfields:\n  order: 1\n  stack: Hosting\n  shapes:\n    cloud-provider: cloud\n    cloud-service: hexagon 2d\n  pack: hosting@0.2.0\n---\nWho provides the infrastructure and the products that realise the design. Attached to core nodes with details; core stays whole without it.\n"
    ],
    [
      "hst--link-type-connects-to",
      "---\nid: hst--link-type-connects-to\ntype: link-type\ntitle: connects-to\nfields:\n  name: connects-to\n  description: Traffic may flow from this zone to that one.\n  inverse: connected from\n  from:\n  - network-zone\n  to:\n  - network-zone\n  pack: hosting@0.2.0\n---\n"
    ],
    [
      "hst--link-type-in-region",
      "---\nid: hst--link-type-in-region\ntype: link-type\ntitle: in-region\nfields:\n  name: in-region\n  description: A zone, environment or cloud service lies in this region.\n  inverse: contains\n  from:\n  - network-zone\n  - environment\n  - cloud-service\n  to:\n  - region\n  pack: hosting@0.2.0\n---\n"
    ],
    [
      "hst--link-type-placed-in",
      "---\nid: hst--link-type-placed-in\ntype: link-type\ntitle: placed-in\nfields:\n  name: placed-in\n  description: Sits in this zone.\n  inverse: holds\n  from:\n  - component\n  - datastore\n  - queue\n  to:\n  - network-zone\n  pack: hosting@0.2.0\n---\n"
    ],
    [
      "hst--names",
      "---\nid: hst--names\ntype: plane\ntitle: Hosting names\nfields:\n  order: 6\n  stack: Naming\n  shapes:\n    name-pattern: document\n    name-token: circle 2d\n  pack: hosting@0.2.0\n---\nHow Hosting things are named: the patterns the hosting pack ships and the tokens that fill them. Descriptive only.\n"
    ],
    [
      "hst--pack",
      "---\nid: hst--pack\ntype: pack\ntitle: Hosting\nfields:\n  name: hosting\n  namespace: hst\n  version: 0.2.0\n  license: Apache-2.0\n  publisher: trumly\n  role: enrichment\n  enriches:\n  - environment\n  - datastore\n  - queue\n  - component\n  description: 'Who provides the infrastructure and which of their products realise your design: cloud\n    providers and cloud services, attached to environments, datastores, queues and components with details.\n    Say that the operations database runs on RDS in AWS without changing the design underneath. Also where\n    things sit: the regions the system runs in, the network zones within them, and the rule that a datastore\n    never lives in a public zone.'\n  use-when: When you need to say who provides the infrastructure, which of their services realise a datastore,\n    queue or component, and where things sit (regions and network zones), for example that the operations\n    database runs on RDS in AWS in a private zone in London.\n  requires:\n  - core@^1.0.0\n  optional:\n  - data-model@^0.5.0\n  - containers@^0.1.0\n  - kubernetes@^0.1.0\n---\n"
    ],
    [
      "hst--rule-component-placed",
      "---\nid: hst--rule-component-placed\ntype: rule\ntitle: Components are placed\nfields:\n  name: Components are placed\n  statement: Every component is placed in a zone\n  severity: warn\n  applies_to:\n    type: component\n  check:\n    require_link:\n      type: placed-in\n      node_type: network-zone\n  pack: hosting@0.2.0\n---\n"
    ],
    [
      "hst--rule-provider-used",
      "---\nid: hst--rule-provider-used\ntype: rule\ntitle: Providers host something\nfields:\n  name: Providers host something\n  statement: Every cloud provider hosts at least one service\n  severity: warn\n  applies_to:\n    type: cloud-provider\n  check:\n    require_link:\n      dir: in\n      min: 1\n      node_type: cloud-service\n      type: runs-in\n  pack: hosting@0.2.0\n---\n**Why:** a provider nothing runs in is an unused account.\n\n**Fix:** add `runs-in` from the services it provides.\n"
    ],
    [
      "hst--rule-service-details",
      "---\nid: hst--rule-service-details\ntype: rule\ntitle: Services realise a design node\nfields:\n  name: Services realise a design node\n  statement: Every cloud service details a design node\n  severity: warn\n  applies_to:\n    type: cloud-service\n  check:\n    require_link:\n      min: 1\n      type: details\n  pack: hosting@0.2.0\n---\n**Why:** a service that realises nothing in the design is unexplained cost.\n\n**Fix:** add a `details` link to the datastore, queue or component it realises.\n"
    ],
    [
      "hst--rule-service-name-length",
      "---\nid: hst--rule-service-name-length\ntype: rule\ntitle: Names fit the cloud's limit\nfields:\n  name: Names fit the cloud's limit\n  statement: A cloud service's name is at most 63 characters\n  severity: warn\n  applies_to:\n    type: cloud-service\n  check:\n    field_is:\n      handle:\n        max_length: 63\n        optional: true\n  pack: hosting@0.2.0\n---\n**Why:** AWS, Azure and Google Cloud all limit most resource names to 63 characters, and a name over the limit is refused at creation, usually in the middle of a deployment.\n\nThe check reads the service's calculated `handle` (the naming patterns in this pack add one), so a project without a handle for cloud services is not affected. Some services have a tighter limit, such as 24 characters for an Azure storage account: copy this rule with a lower number and an `applies_to` that names those services.\n"
    ],
    [
      "hst--rule-service-provider",
      "---\nid: hst--rule-service-provider\ntype: rule\ntitle: Services have a provider\nfields:\n  name: Services have a provider\n  statement: Every cloud service runs in exactly one provider\n  severity: warn\n  applies_to:\n    type: cloud-service\n  check:\n    require_link:\n      max: 1\n      min: 1\n      node_type: cloud-provider\n      type: runs-in\n  pack: hosting@0.2.0\n---\n**Why:** a product has to come from somewhere, and the provider decides where the data lives.\n\n**Fix:** add a `runs-in` link to a cloud provider.\n"
    ],
    [
      "hst--rule-service-region",
      "---\nid: hst--rule-service-region\ntype: rule\ntitle: Services name a region\nfields:\n  name: Services name a region\n  statement: Every cloud service says which region it runs in\n  severity: warn\n  applies_to:\n    type: cloud-service\n  check:\n    require_link:\n      type: in-region\n      node_type: region\n  pack: hosting@0.2.0\n---\n**Why:** the region decides where data lives, which is often a legal constraint.\n\n**Fix:** add an `in-region` link from the service to its region (use the region you already modelled; the provider's own code, such as eu-west-2, is the region's `code`).\n"
    ],
    [
      "hst--rule-store-not-public",
      "---\nid: hst--rule-store-not-public\ntype: rule\ntitle: Stores never in public zones\nfields:\n  name: Stores never in public zones\n  statement: A datastore is never in a public zone\n  severity: error\n  applies_to:\n    type: datastore\n  check:\n    forbid_link:\n      type: placed-in\n      node_type: network-zone\n      node_fields:\n        exposure: public\n  pack: hosting@0.2.0\n---\n\nData lives behind something.\n"
    ],
    [
      "hst--rule-store-placed",
      "---\nid: hst--rule-store-placed\ntype: rule\ntitle: Data stores are placed\nfields:\n  name: Data stores are placed\n  statement: Every datastore is placed in a zone\n  severity: warn\n  applies_to:\n    type: datastore\n  check:\n    require_link:\n      type: placed-in\n      node_type: network-zone\n  pack: hosting@0.2.0\n---\n"
    ],
    [
      "hst--rule-zone-region",
      "---\nid: hst--rule-zone-region\ntype: rule\ntitle: Zones are in a region\nfields:\n  name: Zones are in a region\n  statement: Every network zone is in a region\n  severity: warn\n  applies_to:\n    type: network-zone\n  check:\n    require_link:\n      type: in-region\n      node_type: region\n  pack: hosting@0.2.0\n---\n"
    ],
    [
      "hst--topology",
      "---\nid: hst--topology\ntype: plane\ntitle: Topology\nfields:\n  order: 2\n  pack: hosting@0.2.0\n  stack: Hosting\n---\n\nRegions and the network zones inside them.\n"
    ],
    [
      "hst--type-cloud-provider",
      "---\nid: hst--type-cloud-provider\ntype: type\ntitle: cloud-provider\nfields:\n  name: cloud-provider\n  plane: hst--hosting\n  description: 'Use for the company or platform that provides the infrastructure: a public cloud, a private\n    data centre or a SaaS vendor. Link it to the environment it hosts with details.'\n  shape: cloud\n  fields:\n  - name: kind\n    kind: choice\n    required: true\n    values:\n    - public-cloud\n    - private-cloud\n    - on-premises\n    - saas\n  - name: account\n    kind: text\n    label: Account or subscription\n  pack: hosting@0.2.0\n---\n**Ask:** Who provides the infrastructure for this environment? Is there one account or several?\n\nA provider is a vendor, not a product. The products it sells are cloud services. Link it to the environment it hosts with `details`.\n\n**Watch:** a provider nothing runs in.\n"
    ],
    [
      "hst--type-cloud-service",
      "---\nid: hst--type-cloud-service\ntype: type\ntitle: cloud-service\nfields:\n  name: cloud-service\n  plane: hst--hosting\n  description: 'Use for one product from a provider that realises part of the design: a managed database,\n    a container platform, a queue or an object store. Link it to the design node it realises with details.'\n  shape: hexagon 2d\n  fields:\n  - name: service\n    kind: text\n    label: Product name\n    required: true\n  - name: kind\n    kind: choice\n    required: true\n    values:\n    - compute\n    - database\n    - storage\n    - queue\n    - network\n    - identity\n    - observability\n    - other\n  pack: hosting@0.2.0\n---\n**Ask:** Which product from the provider realises this datastore, queue or component? Which region does it run in?\n\nSay what the product is (for example RDS for PostgreSQL), put it in the provider with `runs-in` and in its region with `in-region`. Link it to the design node it realises with `details`, so removing this pack leaves the design intact. Vendor tuning (instance sizes, settings) belongs in an infrastructure repository, not here.\n\n**Watch:** a service that realises nothing in the design, or one in no region when data residency matters.\n"
    ],
    [
      "hst--type-network-zone",
      "---\nid: hst--type-network-zone\ntype: type\ntitle: network-zone\nfields:\n  name: network-zone\n  plane: hst--topology\n  description: A part of the network with one level of exposure.\n  shape: square 2d\n  fields:\n  - name: exposure\n    kind: choice\n    values:\n    - public\n    - private\n    - restricted\n    required: true\n  pack: hosting@0.2.0\n---\n"
    ],
    [
      "hst--type-region",
      "---\nid: hst--type-region\ntype: type\ntitle: region\nfields:\n  name: region\n  plane: hst--topology\n  description: Use for a geographic location the system runs in, such as London or Virginia. The company that provides it is a cloud provider in the hosting pack.\n  shape: folder 2d\n  fields:\n  - name: code\n    kind: text\n    label: Provider's own code, e.g. eu-west-2\n  pack: hosting@0.2.0\n---\n"
    ],
    [
      "examples/ops-api-hosting/acceptance-criterion-jobs-listed",
      "---\nid: acceptance-criterion-jobs-listed\ntype: acceptance-criterion\ntitle: Jobs listed\nplane: def--requirements\nfields:\n  given: A job has just changed state\n  when: Ops staff open the job list\n  then: The job and its new state are shown within 60 seconds\n  method: test\n---\n"
    ],
    [
      "examples/ops-api-hosting/actor-ops-staff",
      "---\nid: actor-ops-staff\ntype: actor\ntitle: Ops staff\nplane: def--capabilities\nlinks:\n- type: uses\n  to: component-ops-api\n---\n"
    ],
    [
      "examples/ops-api-hosting/assumption-job-volume",
      "---\nid: assumption-job-volume\ntype: assumption\ntitle: Job volume stays modest\nplane: def--intent\nfields:\n  statement: No more than 5,000 jobs run each night.\n  how-to-check: Count the nightly jobs for a month\n  owner: Platform\n  state: open\n---\n"
    ],
    [
      "examples/ops-api-hosting/capability-view-job-status",
      "---\nid: capability-view-job-status\ntype: capability\ntitle: View job status\nplane: def--capabilities\nfields:\n  statement: view the current status of every job\n  scope: in\n  priority: must\n  status: proposed\nlinks:\n- type: performed-by\n  to: actor-ops-staff\n- type: derives-from\n  to: goal-timely-visibility\n- type: refers-to\n  to: concept-job\n- type: relies-on\n  to: assumption-job-volume\n---\n"
    ],
    [
      "examples/ops-api-hosting/cloud-provider-aws",
      "---\nid: cloud-provider-aws\ntype: cloud-provider\ntitle: AWS\nplane: hst--hosting\nfields:\n  kind: public-cloud\n  account: ops-production\nlinks:\n- type: details\n  to: environment-production\n---\nThe account that hosts production.\n"
    ],
    [
      "examples/ops-api-hosting/cloud-provider-home-server",
      "---\nid: cloud-provider-home-server\ntype: cloud-provider\ntitle: Home server\nplane: hst--hosting\nfields:\n  kind: on-premises\nlinks:\n- type: details\n  to: environment-lab\n---\nA machine we own and run ourselves. The same shape fits a rented server from any hosting company: a provider that gives a machine, not a managed product.\n"
    ],
    [
      "examples/ops-api-hosting/cloud-service-fargate",
      "---\nid: cloud-service-fargate\ntype: cloud-service\ntitle: ECS Fargate\nplane: hst--hosting\nfields:\n  service: ECS Fargate\n  kind: compute\nlinks:\n- type: runs-in\n  to: cloud-provider-aws\n- type: details\n  to: component-ops-api\n- type: in-region\n  to: region-london\n---\nRuns the API service.\n"
    ],
    [
      "examples/ops-api-hosting/cloud-service-home-vm",
      "---\nid: cloud-service-home-vm\ntype: cloud-service\ntitle: Virtual machine\nplane: hst--hosting\nfields:\n  service: KVM virtual machine\n  kind: compute\nlinks:\n- type: runs-in\n  to: cloud-provider-home-server\n- type: runs-in\n  to: environment-lab\n- type: details\n  to: component-ops-api\n- type: in-region\n  to: region-home-lab\n---\nRuns a development copy of the API. Swap it for any virtual machine or bare server and nothing in the design changes.\n"
    ],
    [
      "examples/ops-api-hosting/cloud-service-rds",
      "---\nid: cloud-service-rds\ntype: cloud-service\ntitle: RDS for PostgreSQL\nplane: hst--hosting\nfields:\n  service: RDS for PostgreSQL\n  kind: database\nlinks:\n- type: runs-in\n  to: cloud-provider-aws\n- type: details\n  to: datastore-ops-db\n- type: in-region\n  to: region-london\n---\nManaged database that holds the operations data.\n"
    ],
    [
      "examples/ops-api-hosting/component-ops-api",
      "---\nid: component-ops-api\ntype: component\ntitle: Ops API\nplane: dsn--design\nfields:\n  kind: service\n  owner: Platform\n  status: planned\nlinks:\n- type: satisfies\n  to: requirement-list-jobs\n- type: writes\n  to: datastore-ops-db\n- type: runs-in\n  to: environment-production\n- type: exposes\n  to: interface-ops-api\n- type: placed-in\n  to: zone-private\n---\n\nServes the list of jobs and their status to operations staff.\n"
    ],
    [
      "examples/ops-api-hosting/concept-job",
      "---\nid: concept-job\ntype: concept\ntitle: Job\nplane: def--capabilities\nfields:\n  definition: A scheduled piece of work run for a customer.\n---\n"
    ],
    [
      "examples/ops-api-hosting/consequence-one-engine",
      "---\nid: consequence-one-engine\ntype: consequence\ntitle: Vertical scaling\nplane: gov--decisions\nfields:\n  effect: negative\n---\nThe database scales up before it scales out, so growth in jobs costs more.\n"
    ],
    [
      "examples/ops-api-hosting/constraint-uk-eu-data",
      "---\nid: constraint-uk-eu-data\ntype: constraint\ntitle: Data stays in UK/EU\nplane: def--intent\nfields:\n  statement: Customer data stays in the UK or the EU.\n  kind: legal\n  source: Customer contracts\n  status: proposed\nlinks:\n- type: governs\n  to: capability-view-job-status\n---\n"
    ],
    [
      "examples/ops-api-hosting/convention-short-titles",
      "---\nid: convention-short-titles\ntype: convention\ntitle: Short titles\nplane: abt--about\nlinks:\n- type: describes\n  to: overview\n---\nKeep a title to a short label and put the long text in the description.\n"
    ],
    [
      "examples/ops-api-hosting/datastore-ops-db",
      "---\nid: datastore-ops-db\ntype: datastore\ntitle: Ops db\nplane: dsn--design\nfields:\n  kind: relational\n  owner: Platform\nlinks:\n- type: placed-in\n  to: zone-private\n---\n\nHolds every job and its latest status.\n"
    ],
    [
      "examples/ops-api-hosting/decision-option-document-store",
      "---\nid: decision-option-document-store\ntype: decision-option\ntitle: Managed document store\nplane: gov--decisions\nfields:\n  chosen: false\n  summary: Documents, managed\n---\nScales out easily but the reports would need joins in code.\n"
    ],
    [
      "examples/ops-api-hosting/decision-option-managed-postgres",
      "---\nid: decision-option-managed-postgres\ntype: decision-option\ntitle: Managed PostgreSQL\nplane: gov--decisions\nfields:\n  chosen: true\n  summary: Relational, managed\n---\nJoins and constraints come for free; scaling is mostly vertical.\n"
    ],
    [
      "examples/ops-api-hosting/decision-use-postgres",
      "---\nid: decision-use-postgres\ntype: decision\ntitle: Database choice\nplane: gov--decisions\nfields:\n  status: accepted\n  accepted-by: Mat\n  accepted-on: '2026-11-03'\n  review-by: '2027-05-01'\nlinks:\n- type: considers\n  to: decision-option-managed-postgres\n- type: considers\n  to: decision-option-document-store\n- type: has-consequence\n  to: consequence-one-engine\n- type: governs\n  to: datastore-ops-db\n- type: derives-from\n  to: requirement-list-jobs\n- type: complies-with\n  to: principle-prefer-managed\n- type: relies-on\n  to: assumption-job-volume\n---\nUse a managed relational database. Job data is highly structured and the reports need joins.\n"
    ],
    [
      "examples/ops-api-hosting/environment-lab",
      "---\nid: environment-lab\ntype: environment\ntitle: Home lab\nplane: dsn--design\nfields:\n  kind: development\n---\nA development copy of the system that runs on a machine we own.\n"
    ],
    [
      "examples/ops-api-hosting/environment-production",
      "---\nid: environment-production\ntype: environment\ntitle: Production\nplane: dsn--design\nfields:\n  kind: production\n---\n\nThe live system that operations staff use.\n"
    ],
    [
      "examples/ops-api-hosting/example",
      "---\nid: example\ntype: example\ntitle: The ops API on AWS\nfields:\n  title: The ops API on AWS\n  description: The operations database on RDS and the services on Fargate, both in an AWS account that\n    hosts production, attached to the design with details. The parts and the database sit in a private\n    zone in London.\n  use: starter\n  requires:\n  - hosting\n  - core\n---\n"
    ],
    [
      "examples/ops-api-hosting/goal-timely-visibility",
      "---\nid: goal-timely-visibility\ntype: goal\ntitle: Timely ops visibility\nplane: def--intent\nfields:\n  statement: Operations staff see the state of every job within a minute.\n  status: proposed\nlinks:\n- type: measured-by\n  to: metric-status-freshness\n---\n"
    ],
    [
      "examples/ops-api-hosting/increment-live-status",
      "---\nid: increment-live-status\ntype: increment\ntitle: Live job status\nplane: pln--plan\nfields:\n  status: planned\nlinks:\n- type: enables\n  to: capability-view-job-status\n---\n\nThe first slice: staff can see live job status.\n"
    ],
    [
      "examples/ops-api-hosting/interface-ops-api",
      "---\nid: interface-ops-api\ntype: interface\ntitle: Ops API\nplane: dsn--design\nfields:\n  protocol: http\n---\nThe boundary operations tools call to read job status.\n"
    ],
    [
      "examples/ops-api-hosting/metric-status-freshness",
      "---\nid: metric-status-freshness\ntype: metric\ntitle: Job status age\nplane: def--intent\nfields:\n  kind: success\n  unit: seconds\n  direction: lower-is-better\n  target: 60\n  how-measured: Age of the newest status for each job, sampled every minute\n---\n"
    ],
    [
      "examples/ops-api-hosting/overview",
      "---\nid: overview\ntype: overview\ntitle: Ops API\nplane: abt--about\nfields:\n  purpose: A status API so operations staff can see what every job is doing.\n  audience: The build team and operations staff\n  owner: Platform\n  stage: design\nlinks:\n- type: starts-at\n  to: goal-timely-visibility\n---\n"
    ],
    [
      "examples/ops-api-hosting/principle-prefer-managed",
      "---\nid: principle-prefer-managed\ntype: principle\ntitle: Prefer managed services\nplane: gov--decisions\nfields:\n  statement: Prefer managed services over running our own.\n  status: accepted\n  accepted-by: Mat\n  accepted-on: '2026-11-03'\n---\nWe would rather pay for a managed service than operate one ourselves.\n"
    ],
    [
      "examples/ops-api-hosting/region-home-lab",
      "---\nid: region-home-lab\ntype: region\ntitle: Home lab\nplane: hst--topology\nfields:\n  code: home-lab\n---\n"
    ],
    [
      "examples/ops-api-hosting/region-london",
      "---\nid: region-london\ntype: region\ntitle: London\nplane: hst--topology\nfields:\n  code: eu-west-2\n---\n"
    ],
    [
      "examples/ops-api-hosting/requirement-list-jobs",
      "---\nid: requirement-list-jobs\ntype: requirement\ntitle: List jobs\nplane: def--requirements\nfields:\n  statement: The system shall list every job with its current status.\n  kind: functional\n  priority: must\n  status: proposed\nlinks:\n  - type: verified-by\n    to: acceptance-criterion-jobs-listed\n  - type: derives-from\n    to: capability-view-job-status\n---\n"
    ],
    [
      "examples/ops-api-hosting/risk-job-volume-growth",
      "---\nid: risk-job-volume-growth\ntype: risk\ntitle: Job volume growth\nplane: pln--plan\nfields:\n  likelihood: medium\n  impact: high\n  mitigation: Recount nightly jobs every month\n  state: open\nlinks:\n- type: owned-by\n  to: team-platform\n- type: about\n  to: assumption-job-volume\n- type: arises-from\n  to: assumption-job-volume\n---\nIf job volume grows past the assumption, the database may need a bigger plan.\n"
    ],
    [
      "examples/ops-api-hosting/team-dev",
      "---\nid: team-dev\ntype: team\ntitle: Dev\nplane: pln--plan\nfields:\n  kind: agent\n  focus: Implements work packages for review\n---\n\nAn AI agent that writes code and hands it to people to review.\n"
    ],
    [
      "examples/ops-api-hosting/team-platform",
      "---\nid: team-platform\ntype: team\ntitle: Platform\nplane: pln--plan\nfields:\n  kind: human\n  focus: Builds and runs the platform\n---\n\nThe people who own the system.\n"
    ],
    [
      "examples/ops-api-hosting/work-package-build-status-api",
      "---\nid: work-package-build-status-api\ntype: work-package\ntitle: Build status API\nplane: pln--plan\nfields:\n  status: planned\nlinks:\n  - type: owned-by\n    to: team-dev\n  - type: reviewed-by\n    to: team-platform\n  - type: delivers\n    to: component-ops-api\n  - type: part-of\n    to: increment-live-status\n---\n\nBuild the service that lists job status.\n"
    ],
    [
      "examples/ops-api-hosting/zone-private",
      "---\nid: zone-private\ntype: network-zone\ntitle: Private zone\nplane: hst--topology\nfields:\n  exposure: private\nlinks:\n- type: in-region\n  to: region-london\n---\n"
    ],
    [
      "patterns/naming-aws/app",
      "---\nid: app\ntype: name-token\nparent: aws\ntitle: app\nplane: hst--names\nfields:\n  value: app\n  slot: workload\nlinks:\n- type: used-in\n  to: aws\n---\nThe short name of the workload. Rename the value to yours, then link it to the component or datastore it stands for with `stands-for`, so every cloud service that details them gets it in its name.\n"
    ],
    [
      "patterns/naming-aws/aws",
      "---\nid: aws\ntype: name-pattern\ntitle: AWS resources\nplane: hst--names\nfields:\n  scope: AWS resources (databases, services, queues)\n  pattern: '{details/^stands-for/value}-{details/runs-in/^stands-for/value}-{details/runs-in/in-region/^stands-for/value}-{details/@type/^stands-for/value}'\n  example: app-prd-euw2-db\n  case: kebab\n  max-length: 63\nlinks:\n- type: describes\n  to: hst--type-cloud-service\n---\nAWS has no official abbreviation list, so the type token says what the resource is for in the design (db, svc, q), not which AWS product it is. The workload, environment and region parts come from their name tokens. Put the same parts in tags (Workload, Environment) so names and billing agree.\n"
    ],
    [
      "patterns/naming-aws/db",
      "---\nid: db\ntype: name-token\nparent: aws\ntitle: db\nplane: hst--names\nfields:\n  value: db\n  slot: kind\nlinks:\n- type: stands-for\n  to: dsn--type-datastore\n- type: used-in\n  to: aws\n---\nA datastore in the design.\n"
    ],
    [
      "patterns/naming-aws/euw2",
      "---\nid: euw2\ntype: name-token\nparent: aws\ntitle: euw2\nplane: hst--names\nfields:\n  value: euw2\n  slot: region\nlinks:\n- type: used-in\n  to: aws\n---\nAWS eu-west-2 (London). Point it at your region with stands-for.\n"
    ],
    [
      "patterns/naming-aws/name",
      "---\nid: name\ntype: derived\ntitle: AWS resource handle\nfields:\n  name: handle\n  label: AWS resource handle\n  template: '{details/^stands-for/value}-{details/runs-in/^stands-for/value}-{details/runs-in/in-region/^stands-for/value}-{details/@type/^stands-for/value}'\n  applies_to:\n    type: cloud-service\n  enabled: true\nlinks:\n- type: details\n  to: aws\n---\nEvery part is found through the design node the cloud service details: where it runs, that environment's region, and its type. The workload part is the token that stands for the design node (`app` until you rename it). The region part follows `in-region` from the environment to its region.\n"
    ],
    [
      "patterns/naming-aws/pattern",
      "---\nid: pattern\ntype: pattern\ntitle: Naming – AWS\nfields:\n  title: Naming – AWS\n  description: 'Name AWS resources after what they do in the design: workload, environment code, region\n    code and what the resource is for (app-prd-euw2-db), calculated onto every cloud service. Point\n    the app token at your component or datastore, and the region token at your region.'\n  use: starter\n  requires:\n  - hosting\n  - naming\n  optional:\n  - design\n  root: aws\n  prefix: aws\n---\n\n"
    ],
    [
      "patterns/naming-aws/q",
      "---\nid: q\ntype: name-token\nparent: aws\ntitle: q\nplane: hst--names\nfields:\n  value: q\n  slot: kind\nlinks:\n- type: stands-for\n  to: dsn--type-queue\n- type: used-in\n  to: aws\n---\nA queue in the design.\n"
    ],
    [
      "patterns/naming-aws/svc",
      "---\nid: svc\ntype: name-token\nparent: aws\ntitle: svc\nplane: hst--names\nfields:\n  value: svc\n  slot: kind\nlinks:\n- type: stands-for\n  to: dsn--type-component\n- type: used-in\n  to: aws\n---\nA component in the design.\n"
    ],
    [
      "patterns/naming-azure/aks",
      "---\nid: aks\ntype: name-token\nparent: azure\ntitle: aks\nplane: hst--names\nfields:\n  value: aks\n  slot: kind\nlinks:\n- type: stands-for\n  to: k8s--type-cluster\n- type: used-in\n  to: azure\n---\nAzure Kubernetes Service cluster. Needs the kubernetes pack.\n"
    ],
    [
      "patterns/naming-azure/azure-storage",
      "---\nid: azure-storage\ntype: name-pattern\nparent: azure\ntitle: Azure storage and registries\nplane: hst--names\nfields:\n  scope: Azure resources whose names allow only lower-case letters and digits (storage accounts, container registries)\n  pattern: '{@type/^stands-for/value}{title}{runs-in/^stands-for/value}{runs-in/in-region/^stands-for/value}'\n  example: crapprduks\n  case: lower\n  max-length: 24\nlinks:\n- type: describes\n  to: ctr--type-registry\n---\nStorage accounts and container registries reject hyphens and must be globally unique, so the same parts run together with no separator. Storage accounts cap at 24 characters, so keep the title's workload part to four letters or fewer. Where a resource has its own pattern, that one wins.\n"
    ],
    [
      "patterns/naming-azure/azure",
      "---\nid: azure\ntype: name-pattern\ntitle: Azure resources\nplane: hst--names\nfields:\n  scope: Azure resources that allow hyphens (database servers, clusters, subnets)\n  pattern: '{@type/^stands-for/value}-{title}-{runs-in/^stands-for/value}-{runs-in/in-region/^stands-for/value}'\n  example: psql-app-prd-uks\n  case: kebab\n  max-length: 63\nlinks:\n- type: describes\n  to: dm--type-data-db-server\n- type: describes\n  to: k8s--type-cluster\n- type: describes\n  to: hst--type-network-zone\n---\nThe node's title carries the free part: the short name of the system the resource serves (`app`). Microsoft's order ends with a three-digit instance counter; where you run several, add it to the title, which puts it before the environment. The kind, environment and region parts come from name tokens, reached by the link paths in the pattern; the environment and region paths differ for some of the types it describes. Storage accounts and container registries have their own pattern, Azure storage and registries.\n"
    ],
    [
      "patterns/naming-azure/cr",
      "---\nid: cr\ntype: name-token\nparent: azure\ntitle: cr\nplane: hst--names\nfields:\n  value: cr\n  slot: kind\nlinks:\n- type: stands-for\n  to: ctr--type-registry\n- type: used-in\n  to: azure-storage\n---\nAzure Container Registry. Needs the containers pack.\n"
    ],
    [
      "patterns/naming-azure/pattern",
      "---\nid: pattern\ntype: pattern\ntitle: Naming – Azure\nfields:\n  title: Naming – Azure\n  description: 'Microsoft Cloud Adoption Framework names for Azure resources (kind-workload-environment-region-instance),\n    with kind tokens for database servers, clusters, subnets and container registries, and a run-together form for storage and registries. Guidance only: the types it names reach their environment\n    and region by different links.'\n  use: starter\n  requires:\n  - hosting\n  - naming\n  optional:\n  - containers\n  - data-model\n  - kubernetes\n  root: azure\n  prefix: az\n---\n\n"
    ],
    [
      "patterns/naming-azure/psql",
      "---\nid: psql\ntype: name-token\nparent: azure\ntitle: psql\nplane: hst--names\nfields:\n  value: psql\n  slot: kind\nlinks:\n- type: stands-for\n  to: dm--type-data-db-server\n- type: used-in\n  to: azure\n---\nAzure Database for PostgreSQL server. Needs the data-model pack.\n"
    ],
    [
      "patterns/naming-azure/snet",
      "---\nid: snet\ntype: name-token\nparent: azure\ntitle: snet\nplane: hst--names\nfields:\n  value: snet\n  slot: kind\nlinks:\n- type: stands-for\n  to: hst--type-network-zone\n- type: used-in\n  to: azure\n---\nVirtual network subnet; each network zone is one subnet. Needs the network zones in the hosting pack.\n"
    ],
    [
      "patterns/naming-azure/uks",
      "---\nid: uks\ntype: name-token\nparent: azure\ntitle: uks\nplane: hst--names\nfields:\n  value: uks\n  slot: region\nlinks:\n- type: used-in\n  to: azure\n- type: used-in\n  to: azure-storage\n---\nAzure UK South. Point it at your region with stands-for.\n"
    ],
    [
      "patterns/naming-gcp/gcp",
      "---\nid: gcp\ntype: name-pattern\ntitle: Google Cloud resources\nplane: hst--names\nfields:\n  scope: Google Cloud resources (databases, services, queues)\n  pattern: '{details/title}-{details/runs-in/^stands-for/value}-{details/@type/^stands-for/value}'\n  example: ops-prd-db\n  case: kebab\n  max-length: 63\nlinks:\n- type: describes\n  to: hst--type-cloud-service\n---\nLower case letters, digits and hyphens, starting with a letter, 63 characters at most. The first part is the title of the design node the service realises, then the environment code and what the resource is for. The region is set on the resource, not in its name.\n"
    ],
    [
      "patterns/naming-gcp/pattern",
      "---\nid: pattern\ntype: pattern\ntitle: Naming – Google Cloud\nfields:\n  title: Naming – Google Cloud\n  description: Name Google Cloud resources by workload, environment code and what the resource is for (ops-prd-db). Google puts the region in the resource's location, so it stays out of the name.\n  use: starter\n  requires:\n  - hosting\n  - naming\n  root: gcp\n  prefix: gcp\n---\n"
    ],
    [
      "patterns/naming-self-hosted/machines",
      "---\nid: machines\ntype: name-pattern\ntitle: Machines\nplane: hst--names\nfields:\n  scope: Virtual machines and servers you run yourself\n  pattern: '{title}-{details/runs-in/^stands-for/value}'\n  example: api-lab\n  case: kebab\n  max-length: 63\nlinks:\n- type: describes\n  to: hst--type-cloud-service\n---\nTitle the machine for the job it does (`api`, `db`) and its name adds the code of the environment it serves. Host names are DNS labels: lower case, digits and -, 63 characters at most. Provider-neutral, so it fits a home server, a rented server or a virtual machine anywhere.\n"
    ],
    [
      "patterns/naming-self-hosted/pattern",
      "---\nid: pattern\ntype: pattern\ntitle: Naming – Self-hosted\nfields:\n  title: Naming – Self-hosted\n  description: Name machines you run yourself, on your own hardware or rented from any hosting company, by what they do and where they sit, so a machine can be found by its name.\n  use: starter\n  requires:\n  - hosting\n  - naming\n  root: machines\n  prefix: vm\n---\n"
    ]
  ]
}
