:wave: Hello, team! This is Karthik, I am currentl...
# getting-started
c
👋 Hello, team! This is Karthik, I am currently working on setting up Google Kubernetes Engine using Pulumi. I have used OIDC authentication method for Google cloud provider. I have used this example, https://github.com/pulumi/examples/tree/master/gcp-py-oidc-provider-pulumi-cloud I extended this project to automatically export the output data to Pulumi ESC using its SDK. However, when resources are destroyed, I need to clean up the ESC data. A destroy hook which calls a python function is what I need. The Command provider isn't the best solution, because it would programs on the command line. I just need to execute a function just after the destroy operation.
l
Hey @curved-xylophone-1783, if you're still having trouble with this then I would suggest making use of the Pulumi Service Provider to create your ESC environment (documentation) just like you would any other resource and so when you run a destroy operation on the stack then it will also delete the ESC environment that you created.
b
@lemon-scooter-94063 but what if you don't need to delete the ESC environment because maybe multiple stacks use it so only delete some particular vairable in the environment? And also if multiple stacks want to create pulumiConfig fields in the ESC environment?
l
@curved-xylophone-1783 may have been describing a different use-case but Karthik if you can give any more context on what situation you're running into this with that would help
@bored-salesmen-65698 I would ask the same, is there a live use case that you're running into that. It would help me visualize the problem better