Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

resource output lookup #41

@moshloop

Description

@moshloop

e.g. {{ s3.status.outputs.stackId" }} would lookup the the "s3" resource and

# Template provides the backing implementation for the CRD
kind: Template
metadata:
  name: CloudFront
spec:
  source:
    # this template work on CloudFront kinds
    kind: CloudFront
  # resources is a list of 1 or more resources to create for each CloudFront CRD created
  resources:
    # the RFC kind submits an AMS RFC and then waits for the results
    - id: s3
      apiVersion: ams/v1
      kind: RFC
      metadata:
        # construct an rfc title from the name passed through in the CloudFront CRD
        name: cloudfront-s3-{{.metadata.name}}
      spec:
        changeType: ct-abc
        params:
    # depends is a directive tha will wait for the specified resource (RFC) to be created and ready
    - depends: [s3]
      kind: RFC
      metadata:
        name: IngestCloudFormation
      spec:
        changeType: ct-abc
        params:
          # read common variables for the namespace (account)
          account: '{{ kget "cm/account" "accountId" }}'
          vpc: '{{ kget "cm/account" "vpcId" }}'
          region: eu-west-1
          # retrieve the output of the s3 RFC to use in the followup
          s3Bucket: '{{ s3.status.outputs.stackId" }}'
        document:
          valueFrom:
            configMapRef:
              name: cf-templates
              key: cloudfront.cf

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions