cuemata/README.adoc

35 lines
2.0 KiB
Plaintext
Raw Permalink Normal View History

// SPDX-FileCopyrightText: 2023 Hoang Nguyen <folliekazetani@protonmail.com>
//
// SPDX-License-Identifier: Apache-2.0
= Cuemata
This project generates CUE schemas for Pulumi providers, based on `+schema.json+` files published with their source code. These CUE schema files are intended to be used with https://github.com/pulumi/pulumi-yaml[Pulumi's YAML language provider], when one wants to write resource definitions using CUE instead of YAML.
See link:./examples[examples/] directory for some use cases.
2023-12-10 18:00:00 +01:00
== Tools
* **cue-pulumi-gen**: a program to generate CUE definitions for Pulumi providers' JSON schemas inside link:./schemata/pulumi/provider[schemata/pulumi/provider/] directory
2023-12-15 18:00:00 +01:00
* **pulumi-schema**: a simple command to conveniently print out `+schema.json+` file, given a Pulumi provider's name
2023-12-10 18:00:00 +01:00
== Schema packages
* All CUE packages inside link:./schemata/pulumi/provider[schemata/pulumi/provider/] directory are auto-generated. See link:./internal/schema/pulumi/providers.toml[providers.toml] file for the full list of providers and their JSON schema sources.
2023-12-10 18:00:00 +01:00
* Package link:./schemata/pulumi[schemata/pulumi] defines CUE schema for:
2023-12-10 18:00:00 +01:00
2023-12-10 18:00:00 +01:00
** `Pulumi.yaml` in link:./schemata/pulumi/pulumi.cue[pulumi.cue]. It is extended upon https://github.com/SchemaStore/schemastore/blob/master/src/schemas/json/pulumi.json with support for `+pulumi-yaml+` definitions.
** `schema.json` (package metaschema) for a Pulumi provider in link:./schemata/pulumi/package.cue[package.cue]. The CUE definition is imported by `+cue+` CLI from https://github.com/pulumi/pulumi/blob/master/pkg/codegen/schema/pulumi.json.
== Reference
* https://www.pulumi.com/docs/languages-sdks/yaml/yaml-language-reference/[Pulumi's YAML specs]
* https://www.pulumi.com/docs/using-pulumi/pulumi-packages/schema/#pulumi-package-schema[Pulumi's package schema]
== Credits
Existing projects, which inspires me to create this one:
* https://github.com/tweag/tf-ncl[tf-ncl]
* https://github.com/tnarg/cue_terraform[cue_terraform]