https://pulumi.com logo
b

brave-glass-88708

04/10/2020, 4:15 PM
Looking at this blog https://www.pulumi.com/blog/kubernetes-yaml-generation/ you can render the pulumi resources to yaml. I notice that for every object you need to provide it with the provider config. Is there a way to make it more dry, such that you create a provider and tell pulumi to use it for all objects?
b

bright-orange-69401

04/10/2020, 4:17 PM
AFAIK you either use the default provider or you have to specify it every time I was looking for a DRY solution too for AWS but couldn't find it for now
l

lemon-agent-27707

04/10/2020, 4:20 PM
See this recent blog post which has code examples in every language for automatically applying tags. You could try something similar for injecting a provider: https://www.pulumi.com/blog/automatically-enforcing-aws-resource-tagging-policies/#automatically-applying-tags
b

brave-glass-88708

04/10/2020, 4:30 PM
Thanks @lemon-agent-27707 one last question. I currently have 5 gke cluster that were provisioned by terraform. Is a remote state reference through pulumi the best way to create a provider to each cluster or is there a better way?