question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to access outputs of other templates

See original GitHub issue

I have a deployment manager script as follows: cluster.py creates a kubernetes cluster and when the script was run only for the k8 cluster creation, it was successful – so it means the cluster.py had no issues in creation of a k8 cluster

cluster.py also exposes ouputs: A small snippet of the cluster.py is as follows:

outputs.append({
        	'name': 'v1endpoint' ,
        	'value': type_name + type_suffix })
    
return {'resources': resources, 'outputs': outputs}

If I try to access the exposed output inside dmnginxservice resource below as $(ref.dmcluster.v1endpoint) I get an error as resource not found

imports:
- path: cluster.py 
- path: nodeport.py

resources:
- name: dmcluster
  type: cluster.py
  properties:
   zone: us-central1-a
      
- name: dmnginxservice
  type: nodeport.py
  properties:
   cluster: $(ref.dmcluster.v1endpoint)
   image: gcr.io/pr1/nginx:latest
   port: 342
   nodeport: 32123
    
ERROR: (gcloud.deployment-manager.deployments.create) Error in Operation [operation-1519960432614-566655da89a70-a2f917ad-69eab05a]: errors:
- code: CONDITION_NOT_MET
  message: Referenced resource yaml%dmcluster could not be found. At resource
    gke-cluster-dmnginxservice.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
krwenholzcommented, Mar 5, 2018

Hi @VarunkumarManohar,

I’m working on reproducing using your gists. I’ll try to get back to you by the end of the day.

At first glance, it doesn’t look like your template is making any obvious mistakes.

Thanks,

Kyle

0reactions
varungbtcommented, Mar 7, 2018

@krwenholz thank you

Read more comments on GitHub >

github_iconTop Results From Across the Web

Refer to resource outputs in another AWS CloudFormation stack
Walkthrough: Refer to resource outputs in another AWS CloudFormation stack · Step 1: Use a sample template to create a network stack ·...
Read more >
Outputs in ARM template - Azure Resource Manager
This article describes how to define output values in your Azure Resource Manager template (ARM template). You use outputs when you need to ......
Read more >
Cannot use the output of the inner (child ) template in the ...
You can use the intrinsic function Fn::ImportValue to import only values that have been exported within the same region. For outputs, the value ......
Read more >
Managing Search and Output Templates - iCIMS
When search templates are not properly shared, users may be unable to access important information on their dashboard or run reports using specific...
Read more >
Named Templates - Helm
We'll see two ways to create them, and a few different ways to use them. ... No scope was passed in, so within...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found