-
Notifications
You must be signed in to change notification settings - Fork 63
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
An option to run terraform apply only once / on demand #210
Comments
Hi @lewyg - Now that Composition Functions are available I expect that a lot of the things that were being done with one-shot It might be possible to use the Granular Management Policies to do something like this if you specify just |
I just had a discussion about it with @mergenci . It looks like |
@bobh66 thank you for the clarification, "plan" is definitely better than "apply", but still, as you said, not optimal for one-shot workspaces. I would like to learn more about how to use the composition function in this case. Do you have anything specific in mind with available functions, or to develop a new one for this case? @ytsarev Yes, a new function sounds good to me |
Another way to solve this using Composition Functions - if the Sample logic: if .observed.composite.resource.status.workspacedata == "": if workspace-key in .observed.composed.resources and output is available: This would result in the |
What problem are you facing?
Hi, I am working with a terraform provider and it does
terraform apply
automatically during each reconciliation. Sometimes I use terraform code as some kind of workaround, for example like here to import resources by name:https://github.com/upbound/provider-terraform/tree/main/examples/importer
and in this case, I am interested only in the first run of
terraform apply
, only to get the resource ID I want to import.After that, I don't need to run my code again in the reconciliation loop to not waste resources when unnecessary.
How could Official Terraform Provider help solve your problem?
Is it possible to have an option to run terraform only once or on demand?
Or maybe you have any other solution how to deal with this example? I was thinking of adding
crossplane.io/paused: "true"
annotation to the MR, but this needs to be added automatically after resource is Ready.The text was updated successfully, but these errors were encountered: