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

resource output lookup #41

Open
moshloop opened this issue May 4, 2021 · 0 comments
Open

resource output lookup #41

moshloop opened this issue May 4, 2021 · 0 comments
Assignees

Comments

@moshloop
Copy link
Member

moshloop commented May 4, 2021

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
@Kaitou786 Kaitou786 linked a pull request May 12, 2021 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants