Skip to main content

sng template

Available

Deployed and supported. The fields and commands described here are stable within version v1alpha1.

sng template queries the API's template catalog: an annotated example manifest per kind, ready to adapt. It is not the list of your resources (for that: sng kind list).

All subcommands require an identity (sng sso login), not a tenant session.

sng template list​

sng template list

Shows the catalog, grouped by category.

apps Applications
App Application
secrets Secrets
SSMSecret Secret … déclaré
iam Identité
IAMApplication Application IAM
IAMRole Rôle IAM
IAMGroup Groupe IAM
cdn CDN
CDNSite Site CDN
registry Registre
RegistryRepository Dépôt du registre
RegistryAccessKey Clé d'accès au registre

With --json: {"categories":[{"id":"apps","title":"Applications","templates":[{"kind":"App","category":"apps","title":"Application","description":"…"}]}]}.

sng template search QUERY

Filters the catalog on the kind, title, or description (case-insensitive).

sng template search secret
SSMSecret [secrets] Secret … déclaré

Without results: aucun gabarit.

sng template gen​

sng template gen KIND [NAME] [-o FILE]

Writes a local manifest of the requested kind, with metadata.name: NAME.

Argument / flagDefaultEffect
KIND—Catalog kind (App, SSMSecret, …), case-insensitive
NAMEderived from the kind (for example app, iam-application)Name of the resource, and of the file
-o, --output FILE<NAME>.ymlOutput file
sng template gen App web
sng template gen SSMSecret db-password -o secrets/db-password.yml
créé /home/jane/projet/web.yml (kind=App)

The file is created with mode 0600. If it already exists, it is overwritten.

The kinds available in the catalog are those in the output above. Other kinds (DNSRecord, Monitor, …) are written from the minimal example on their reference page, or with the dedicated command (sng dns record set, sng monitor create --dry-run).

Typical errors​

MessageCause
not foundKind unknown to the catalog: check sng template list
session expired: run sng tenant use NAME (or sng sso login if identity is expired)Identity expired: sng sso login