https://pulumi.com logo
#azure
Title
# azure
c

curved-dentist-72931

05/19/2023, 6:59 PM
#azure does anyone have idea how to update config map value in k8s from pulumi?
a

astonishing-exabyte-93491

05/19/2023, 8:13 PM
Most def. You can use the
@pulumi/kubernetes
provider to do that: https://www.pulumi.com/registry/packages/kubernetes/api-docs/core/v1/configmap/
Which programming language are you using?
There might be a caveat though: the k8s provider enforces resource replacement when specific properties change. For instance, when a secret’s data is modified the secret resource is replaced altogether.
c

curved-dentist-72931

05/20/2023, 3:19 AM
I am using typescript. Here i can create config map but unable update one of its value later. For example in config map i create env value test = abcd and I need to change that to test = drfg but its not possible with pulumi.
@astonishing-exabyte-93491 any suggestion?
f

fast-easter-23401

05/22/2023, 2:11 PM
The dynamic data must be passed to the CM constructor, I can't tell whether it forces resource replacement or not. Mind sharing your code?
a

astonishing-exabyte-93491

05/23/2023, 10:30 AM
c

curved-dentist-72931

05/24/2023, 6:36 AM
Ohh Thanks @astonishing-exabyte-93491 I will try this. Will give you sample code to get an idea about my problem.