sparse-intern-71089
02/07/2022, 7:10 PMbored-table-20691
02/07/2022, 7:11 PMbored-table-20691
02/07/2022, 7:12 PMmyConfigMap, err := corev1.NewConfigMap(ctx, "my-configmap", &corev1.ConfigMapArgs{
And then use it like this:
corev1.EnvFromSourceArray{
&corev1.EnvFromSourceArgs{
ConfigMapRef: &corev1.ConfigMapEnvSourceArgs{
Name: DefaultConfig.Metadata.Name(),
},
},
&corev1.EnvFromSourceArgs{
ConfigMapRef: &corev1.ConfigMapEnvSourceArgs{
Name: Config.Metadata.Name(),
},
},
bored-table-20691
02/07/2022, 7:14 PMDefaultConfig
and Config
are basically the myConfigMap
(just exported in anoher variable)chilly-plastic-75584
02/07/2022, 7:18 PMchilly-plastic-75584
02/07/2022, 7:23 PMResourceNames: pulumi.StringArray{
cfgMap.Metadata.Name(), // 👈 THIS cannot use cfgMap.Metadata.Name() (value of type pulumi.StringPtrOutput) as pulumi.StringInput value in array or slice literal: missing method ToStringOutput
},
chilly-plastic-75584
02/07/2022, 7:23 PMbored-table-20691
02/07/2022, 7:23 PMgeneratedConfigMapName
but doesn’t set it anywherebored-table-20691
02/07/2022, 7:24 PMMetadata.Name().Elem()
bored-table-20691
02/07/2022, 7:29 PMchilly-plastic-75584
02/07/2022, 7:31 PMbored-table-20691
02/07/2022, 7:31 PMbored-table-20691
02/07/2022, 7:31 PMchilly-plastic-75584
02/07/2022, 7:31 PMResourceNames: pulumi.StringArray{
// CfgMap.Metadata.Name(),.
cfgMap.Metadata.Name().Elem(),
},
This gave no errorchilly-plastic-75584
02/07/2022, 7:31 PMchilly-plastic-75584
02/07/2022, 7:32 PMchilly-plastic-75584
02/07/2022, 7:32 PMchilly-plastic-75584
02/07/2022, 7:33 PMbored-table-20691
02/07/2022, 7:33 PM@itay
chilly-plastic-75584
02/07/2022, 7:34 PMbored-table-20691
02/07/2022, 7:35 PMchilly-plastic-75584
02/07/2022, 7:36 PMbored-table-20691
02/07/2022, 7:40 PM