GoogleCloudPlatform / GoogleCloudPlatform/deploymentmanager-samples

Error when templates are retrieved from cloud storage

Open
#364 2 comments 0 reactions 1 assignee Claimed by @ocsig View on GitHub
Dominant language
Jinja
Stars
951
Forks
700
PR merge metrics
No merged PRs in 30d

Description

Hi,

I'am storing the templates into cloud storage. For exemple to create a bucket, my config looks like this :
resources:
````yaml
- name: my-bucket
type: gs://MY TEMPLATES BUCKET/templates/gcs_bucket/gcs_bucket.py
properties:
name: my-bucket
location: us-east1
````
When running the deployment manager, I'm geeting the following error:

````
ERROR: (gcloud.deployment-manager.deployments.update) Error in Operation [operation-XXX]: errors:
- code: MANIFEST_EXPANSION_USER_ERROR
location: /deployments/resources/manifests/manifest-XXXX
message: |-
Manifest expansion encountered the following errors: Invalid properties for 'gs://gto-deployment-manager-templates/templates/gcs_bucket/gcs_bucket.py':
File 'gcs_bucket.py' requested in schema 'gs://gto-deployment-manager-templates/templates/gcs_bucket/gcs_bucket.py.schema' but not included with imports.
Resource: gto-deployment-manager-templates Resource: config
````

In fact, the schema is referencing ``gcs_bucket.py`` which the deployment likely cannot find (I presume because it's not stored localy):

`````
imports:
- path: gcs_bucket.py
`````

A workaround for this is to simply remove the import.

Is this import mandatory? Can we get rid of it ? (This import is not present in all templates)

Thanks for your help,

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.