Hi all and <@U022S4W6W00> , bit of specifc one. I'...
# kubernetes
p
Hi all and @steep-sunset-89396 , bit of specifc one. I'm using python + aws_native provider and EKS to define a cluster. Looking to upgrade the version on the cluster by defining the
version='v1.22'
. However, my pulumi preview isn't working as it wants to re-create a number of resources including the k8s provider. Is it possible to specify the
version
after creating the cluster?
s
Hey Craig, good to hear from you. What code you're using to create your cluster?
p
Hey Aurelien, Something similar to:
Copy code
aws_native.eks.Cluster(
            resource_name=f"{name}-eks-cluster",
            name=f"{name}-eks-cluster",
            version="1.22",
            role_arn=eks_cluster_role.arn,
            kubernetes_network_config=#configs
            resources_vpc_config=#configs
)
 
kubeconfig="yaml here"

## k8 provider
k8.Provider(
            f"{name}-k8s-provider",
            cluster=eks_cluster.arn,
            kubeconfig=kubeconfig,
        )
My pulumi diff is then showing the kubeconfig is changing and hence the provider and other resources are falling over
s
Have you tried setting
ignore_changes
in the resource options as a way to ignore
version
? https://www.pulumi.com/docs/intro/concepts/resources/options/ignorechanges/
p
As expected,
ignore_changes
doesn't modify the version, so it stands up correctly. However, I've narrowed down the issue to the
cluster.arn
changing, when I specify the
version
prop, this occurs even when the
version
matches whats currently in the pulumi state
Did some more digging... I made a modification to the stack directly, and adding the current version as an input and the preview runs as expected. However, after updating the version, the preview shows the cluster arn wants to be re-created and the preview fails. There seems to be an issue with the version prop being specified and the cluster resource handling this. However the version should be able to update in place as per the CloudFormation docs
s
And what about the preview with
--refresh
?
As a way to bring the stack state up to date.
I''m also wondering if you had any chance to check with the classic provider? I'm curious to see if there's any differences between the two.
p
No luck with
--refresh
, same error. Switching to classic is a bit difficult, quite a few of the outputs on the native provider has I'm reliant on...
Thanks for your help with this Aurelien, found a bit of a workaround for now but wrote up the behaviour in a ticket here: https://github.com/pulumi/pulumi-aws-native/issues/464
s
Great, thank you for creating the issue.