Templates & blueprints to facilitate cloud-native development efforts. Can be imported into IntelliJ and VSCode via Cloud Code plugin.
- repository serves as a one-stop catalog hub of source files which may come handy during cloud-native endeavours
- provided template can be a code snippet solving a simple task (e.g. prometheus alerting manifest) or a fully-fledged solution (e.g. well-architected gke deployment)
- functional, rather than language or technology, folder structure. functional categories are highly opinionated and are subject to review
- flat folder structure with a single root for each functional topic, and a sub-folder for each template
- repository contains not only blueprints/battle-proven/reference solutions but also technology experiments which serve as a boostrap and may experience further improvements in terms of performance and best practices
The .cctemplate
is a Template Descriptor file that describes the contents of your repository so that Cloud Code knows where to look for your templates. It should look something like the following:
{
"metadata": {
"version": "1"
},
"templates": [
{
"path": "path/to/my/template",
"name": "My Template",
"description": "This template helps you create something amazing!"
},
...
]
}
You can learn more about the Template Descriptor schema here.
You can configure your IDE to recognize this repository and create applications based on the templates within. Follow the steps below to see Custom Templates in action:
-
Import the Custom Template repo on IntelliJ or VS Code, using this repo's Git URL:
https://github.com/shortcut/cloud-native-templates.git
Find out more at:
- https://cloud.google.com/code/docs/intellij/set-up-template-repo
- VSCode https://cloud.google.com/code/docs/vscode/create-app-from-custom-template
- IntelliJ https://cloud.google.com/code/docs/intellij/create-app-from-custom-template
- https://github.com/GoogleCloudPlatform/cloud-code-custom-templates-example
- Create a new directory containing your own template (or make changes to any of the sample templates)
- If you are not originating a template make sure a license from sourced repo is included
- Establish a feedback channel by referencing either a maintainer or a source repo in the contents section
- Make any necessary updates to the templates in the
.cctemplate
file - Import updated repository into Cloud Code