Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding support for Read #432

Open
Tracked by #449
thomas11 opened this issue May 14, 2024 · 4 comments
Open
Tracked by #449

Consider adding support for Read #432

thomas11 opened this issue May 14, 2024 · 4 comments
Labels
kind/enhancement Improvements or new features

Comments

@thomas11
Copy link
Contributor

thomas11 commented May 14, 2024

The Read operation is defined in the Pulumi resource model.

The Read method is responsible for reading the current inputs and state Objects for a resource. Read may be called during a refresh or import of a managed resource or during a preview or update for an external resource.

Allowing users to define a specific command to run on Read could open up new use cases. If you have such a case, please comment below!

This issue is a follow-up from #20.

@thomas11 thomas11 added the kind/enhancement Improvements or new features label May 14, 2024
@lukehoban lukehoban mentioned this issue May 18, 2024
12 tasks
@danielrbradley
Copy link
Member

Perhaps this should be modelled as "refresh"

thomas11 pushed a commit that referenced this issue Jul 15, 2024
The README points to #20
and says `Update` isn't implemented.

[Diff](#433) and
[Read](#432) are still
not done, but [Update is
implemented](https://github.com/pulumi/pulumi-command/blob/e7e39fd913708c3e5255d8399c87a736553fec43/sdk/python/pulumi_command/remote/command.py#L196)

The example code could be updated (hah!) to include an `update` (maybe
with Luke's `color`/`description` example), but this PR just removes
information that misled me.
@vnghia
Copy link

vnghia commented Jan 23, 2025

Hi do we have any update regarding this issue ? A lot of my resources depend on the output of one command provider and they are deleted and re-created everytime I run pulumi up even though nothing has changed :(

If you could give some pointers, I would love to give this feature a try by myself. Pulumi is perfect for me with this feature :D

@thomas11
Copy link
Contributor Author

Hi @vnghia, I'm not quite sure how a custom Read would solve your problem. Could you elaborate? Unless pulumi up is run with --refresh, it won't call Read.

You might consider changing your command to modify the output, for instance, by piping it to another program.

You could also use ignoreChanges if the output doesn't matter.

@vnghia
Copy link

vnghia commented Jan 24, 2025

I see. Probably something off in my configuration :/ Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Improvements or new features
Projects
None yet
Development

No branches or pull requests

3 participants