https://pulumi.com logo
#general
Title
# general
b

brash-painting-89833

12/25/2021, 11:25 PM
Copy code
_, err = helm.NewChart(ctx, string(z), helm.ChartArgs{
				Path: pulumi.String("./chart"),
				Values: pulumi.Map{
					"some": pulumi.Map{
						"enabled": pulumi.Bool(false),
					},
					"someb": pulumi.Map{
						"enabled": pulumi.Bool(true),
						"loadBalancer": pulumi.Map{
							"enabled":   pulumi.Bool(true),
							"addresses": THISaddresses,
						
				},
			}, pulumi.Provider(p))
THISaddresses
I want it from the config =/
b

billowy-army-68599

12/26/2021, 8:13 AM
how is this addresses defined in config?
b

brash-painting-89833

12/27/2021, 3:58 PM
Copy code
config:
  gcp:project: xxx
  proj:clustersZones:
    - us-central1-a
    - us-west1-a
    - us-west1-c
  proj:ThisAddresses:
    - 2.2.2.2
    - 1.1.1.1
b

billowy-army-68599

12/27/2021, 3:59 PM
how are you unmarshalling your config?
b

brash-painting-89833

12/27/2021, 4:00 PM
I got it working but with a small hack:
Copy code
var bootnodeAddresses []string
		cfg.RequireObject("ThisAddresses", &ThisAddresses)
		ThisAddressesP := make([]pulumi.Input, len(ThisAddresses))
		for i, a := range ThiseAddresses {
			ThisAddressesP[i] = pulumi.String(a)
		}
and now uses like htis
Copy code
"addresses": pulumi.Array(bootnodeAddressesP),
@billowy-army-68599 if you have a better way to unmarshalling and using, I would be glad to hear
by the way, I might not even need this, cause the address may get provisioned by pulumi anyway but it would be good to know