https://cloud.google.com/deployment-manager/docs/configuration/templates/define-template-properties
--properties is only supported for jinja templates:
gcloud deployment-manager deployments create a-single-vm --template vm_template.jinja \
--properties zone:us-central1-a
How do I pass properties to python templates the same way with --config
EDIT: more info about my use case. I have a top level yaml config
that pulls in multiple templates and sets properties. I can just create separate top level configs for dev and prod deployments with diff values for those environments but it would be nice to set these via command line. Also I may need to dynamically change some of these params at deploy time in my deployment automation- for example when users click a button to deploy they are given the option to set some params to change. Is there any native support for transforming configs? I dont want to have to resort to wrapping my configs with a makefile :(
context.properties['variable']
and it should work, are you getting an error when you try? – Patrick W--config
with--properties
it tells me--properties
can only be used against a template – red888--template
flag and specify yourtemplate.py
. Within the template, there should be variables that usecontext.properties['varialble']
so when you do--properties variable:new-value
the variable in the template will be replaced with new-value – Patrick W