Source

Implementation

Provisioner Type

Resource Type

Flavor

Tool

static-service

Outputs the name of the Workload dependency if it exists in the list of Workloads.

type: service
expected_outputs:
  - name

10-service.provisioners.yaml (view on GitHub) :

- uri: template://community-provisioners/static-service
  type: service
  description: Outputs the name of the Workload dependency if it exists in the list of Workloads.
  init: |
    name: {{ splitList "." .Id | last }}    
  outputs: |
    {{ $w := (index .WorkloadServices .Init.name) }}
    {{ if or (not $w) (not $w.ServiceName) }}{{ fail "unknown workload" }}{{ end }}
    name: {{ $w.ServiceName | quote }}    
  expected_outputs:
    - name