solutions_builder/modules/restful_service/copier.yaml (44 lines of code) (raw):
_metadata:
module_name: restful_service
version: 1.0.0
destination_path: .
# questions
component_name:
type: str
help: What is the name of this component (snake_case)?
default: restful_service
validator: "{% if not component_name %}Required{% endif %}"
resource_name:
type: str
help: Resource name (lower case, alphanumeric characters, '-')?
default: "{{ component_name | to_kebab }}"
validator: "{% if not resource_name %}Required{% endif %}"
service_path:
type: str
help: "The relative path used in ingress as http://my-domain/[service_path]"
default: "{{resource_name}}"
region:
type: str
help: Which Google Cloud region?
default: us-central1
data_model:
type: str
help: Data model name? (snake_case)
default: ""
validator: "{% if not data_model %}Required{% endif %}"
data_model_plural:
type: str
help: What's the plural form of the data model name? (snake_case)
default: "{{data_model}}s"
validator: "{% if not data_model_plural %}Required{% endif %}"
deploy_method:
type: str
help: Default deploy method? (cloudrun or gke)
choices:
Cloud Run: cloudrun
GKE: gke
default: cloudrun
cloudrun_neg:
type: bool
help: Create network endpoint group (NEG) for serverless ingress?
default: yes
when: "{{deploy_method == 'cloudrun'}}"
depend_on_common:
type: bool
help: Does this component require the Common image?
default: no
_answers_file: ".sb/component_answers/{{component_name}}.yaml"
_templates_suffix: ""
_patch:
- "skaffold.yaml"
_exclude:
- "README.md"
- "copier.yaml"
- "copier_extensions"
- ".terraform*"
- ".tmp"
- ".venv"
- ".pytest_cache"
- "__pycache__"
- "*-debug.log"
- ".skip"
_jinja_extensions:
- jinja2_time.TimeExtension
- jinja2_strcase.StrcaseExtension
- copier_templates_extensions.TemplateExtensionLoader
- ../../copier_extensions/sb_helpers.py:SolutionsTemplateHelpersExtension