Chapter 5: Runbook for Writing YAML

This runbook provides guidance on writing YAML files for custom resources in the Facets platform. It explains the structure, fields, and conventions required to define new resources, ensuring clarity and consistency across implementations.

Key Fields in facets.yaml:

  • intent: High-level capability or resource type (e.g., "database", "storage").
  • flavor: Specific implementation of the intent (e.g., "AWS RDS", "Google AlloyDB").
  • version: Version of the module, allowing for version control and updates.
  • description: Briefly describes the purpose or function of the resource.
  • clouds: List of supported cloud providers (e.g., AWS, GCP).
  • inputs: Input parameters that the Terraform module requires to function correctly.
  • outputs: Outputs that the Terraform module produces.
  • spec:
    • Define the spec properties using JSON Schema for validation.
    • Include fields like type, properties, required, and validation rules (e.g., enum, pattern).
    • This section can be quite extensive and depends on the nature of the intent, flavour and version.
  • sample: Provide a sample configuration to serve as a default template when the resource is created in UI.

Let us now talk about input, output and spec section in detail.

By following this runbook, you can create robust YAML definitions for custom resources in the Facets platform, ensuring consistency, usability, and compliance with platform standards.