1
votes

Since the templates can store values themselves (in addition to receiving values from the configuration yaml file), is a schema required when we create a template?

If not, is the use of the schema just to enforce which values are required, and the type of values that need to be provided to the template?

EDIT
I'm referring to template schemas, not resource properties schema: https://cloud.google.com/deployment-manager/docs/configuration/templates/using-schemas

2
I am not sure I understand your question. Deployment Manager has a built-in schema for its templates. You do not provide your own schema. The format and values (or types of values) accepted are defined in the documentation.John Hanley
@JohnHanley I believe you're referring to properties schema. This is different. It's the schema for the templates you create: cloud.google.com/deployment-manager/docs/configuration/…Pedro Gordo
I have never included a template schema in my deployments.John Hanley
@JohnHanley do you just use a yaml file, or do include a python/jinja file as well?Pedro Gordo
Just YAML. I use DM everyday and I like the product. Very easy to work with.John Hanley

2 Answers

2
votes

Google Deployment Manager does not require that you specify a schema, but you can create one for specific use cases. I use Deployment Manager often, and I just use the standard YAML syntax for my deployments.

For those interested in learning more:

Cloud Deployment Manager: Using Schemas

0
votes

I know it is old, but it's wrong. Question was about templates, not configs. If you create a template (.jinja) and import it from config (.yaml) during deployment using gcloud, it DOES require a .jinja.schema file for each imported .jinja.

Schemas are used by gcloud during packaging of your deployment, they are not required if you use plain yaml (no imports=no schema), they are also not required if you deploy directly using API.