-
Notifications
You must be signed in to change notification settings - Fork 26
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 diff
and read
#20
Comments
The curl example in #27 is an example that could in principle benefit from this. The |
a use case where we need to use a command on update: in this case, the change is considered as |
I think the way that go-task does this would work. The provide https://taskfile.dev/#/usage?id=using-programmatic-checks-to-indicate-a-task-is-up-to-date The indicator isn't a diff, but rather just the exit code of the The |
I would like to see this for sending updates to configure external services via API or similar |
we defintelly need update and ideally diff. |
Another thing worth considering: For idempotent commands, it would be really nice to trigger re-running the |
Edit: If you find yourself here note that the docs are out of date and This would also be helpful in the k8s w/ helm case. I'd like to do something like: const cluster = ...;
const chart = k8s.helm.v3.Release("installation" { ... });
const rollout = new local.Command("rollout", {
// create not needed because it's the default behavior to start pods when creating the resources in the chart
update: "kubectl -n namespace rollout deployment installation-foo",
environment: {
KUBECONFIG: cluster.kubeconfig,
},
}, {
dependsOn: [chart],
}); In my actual case the types of changes I tend to be making are in permissions assigned to the service account that the deployment specifies via annotations; these sometimes cause the annotation to change value, and sometimes are purely upstream changes in my cloud provider. k8s will only automatically trigger updates to the template spec for the pods in the deployment. |
I was bit surprised this wasn't already supported. As a Pulumi newbie, I was hoping/thinking pulumi-command was just a convenience replacement for a dynamic resource providers. Ie, the logic might be in shell scripts, but most of the functionality is available. For my use case I'm going to need to write my own dynamic resource provider that shells out, just so I can run updates. I'll probably even just have diff indicate that an update always needs to happen just to keep it as simple as possible. |
diff
, update
and read
diff
and read
Cannot close issue:
Please fix these problems and try again. |
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.
These operations are supported in the Resource model, and could be delegated to commands to run on each operation. The use cases for these are not quite as rich as
create
anddelete
, but could open up additional new use cases.The text was updated successfully, but these errors were encountered: