limited-rainbow-51650
04/01/2021, 7:30 PMresource_types:
- name: pulumi
type: docker-image
source:
repository: <http://ghcr.io/ringods/pulumi-resource|ghcr.io/ringods/pulumi-resource>
tag: v0.0.6
resources:
- name: myinfracode
type: pulumi
source:
organization: companyname
project: network
stack: staging
token: pul-XXXXXXXXXXXXXXXXX
jobs:
- name: nextstack
plan:
- task: build-artifact
...
- put: myinfracode
params:
aws:region: eu-west-1
network:cidr: 'x.x.x.x'
In my Concourse resource, I want to allow anything in the params
section above which is valid Pulumi stack config (nested et all). In my resource implementation, I get this passed as JSON though:
{
"source": {
"organization": "company",
"project": "network",
"stack": "staging",
"token": "pul-XXXXXXXXXXXXXXXXX"
},
"params": {
"aws:region": "eu-west-1",
"network:cidr": "x.x.x.x"
}
}
The source
section is specific to Pulumi, but the params
is the JSON equivalent of what I configured as YAML in my pipeline. Is there any function in the Pulumi code base that can Unmarshal this to a Pulumi type representing this Config?plain-quill-22197
04/02/2021, 8:08 AM