pulumi / examples

Infrastructure, containers, and serverless apps to AWS, Azure, GCP, and Kubernetes... all deployed with Pulumi
https://www.pulumi.com
Apache License 2.0
2.33k stars 874 forks source link

config-map - multiple key-value pairs? #1468

Closed opinionmachine closed 1 year ago

opinionmachine commented 1 year ago

Hello!

Issue details

So, on the github action there is a "config-map" property, and a reasonable interpretation would be that it supports some what of setting keys and values so that you can pass in values and refer to those configuration inside the stack, right? The documentation says '{name | value: some-value, secret = true/false}' or similar, and the examples I find are doing 'name: some-value, secret =false'.

Now as a consumer that needs to pass four properties in, what do I guess I should do? "name" is called "name" in both occurrences, btw, so it feels like a syntactic element rather than a made up 'name', to be replaced by one of my own, and then there is the issue of the plural.

So my request is - could there be an example on how to pass in two configuration values into the pulumi github action, and - if there is time, an example of referencing those inside the stack?

    - uses: pulumi/actions@v4
      with:
        command: preview
        stack-name: prod
        work-dir: Deploy  
        config-map: // HERE I NEED TO PUT SOMETHING, A STRING- BUT HOW? WITH MULTIPLE SETTINGS?

Affected area/feature

SO, this request is regarding documentation, around the github action..

opinionmachine commented 1 year ago

Actually, I listened to Obi-Wan and used the source:

 - uses: pulumi/actions@v4
      with:
        command: preview
        stack-name: prod
        work-dir: Deploy  
        config-map: "{tag1: {value: thing1:20230725.1, secret = false}, tag2: {value: thing2:20230725.1, secret = false}}"