rundeck/terraform-provider-rundeck

Unhandled API call when creating jobs on Rundeck v5.x.x

Opened this issue · 9 comments

Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

Run terraform -v to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.

Terraform v1.5.7

Affected Resource(s)

Please list the resources as a list, for example:
rundeck_job

Terraform Configuration Files

rundeck/rundeck#8779

Debug Output

Please provider a link to a GitHub Gist containing the complete debug output: https://www.terraform.io/docs/internals/debugging.html. Please do NOT paste the debug output in the issue; just paste a link to the Gist.
rundeck/rundeck#8779

Panic Output

If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the crash.log.

Expected Behavior

Created the job without error.

Actual Behavior

What actually happened?
Since upgrading to latest rundeck, rundeck provider, and api version terraform is consistently showing EOF error and not detailing anything further. It appears to create the object to some degree in the rundeck UI but consistently fails on applies only.

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply

Important Factoids

Rundeck version 5.0.1
rundeck api version 46

References

Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
rundeck/rundeck#8779 Mentioned this initially last month to the rundeck project. Opening here to get provider assistance on this.

Ran the apply with a test job with trace logging and this is what shows for the resource when attempting to apply if it helps https://gist.github.com/bzuelke/cefd404bbc79b8448932b540589a3e77

Hi.
Same issue.

Terraform v1.7.3
on linux_amd64
...
+ provider registry.terraform.io/rundeck/rundeck v0.4.7

Same issue. Is the provider still maintained? @fdevans

It should still be maintained given the recent releases, yet it be slow. This is a pretty big deal being unable to natively create jobs from the provider which i hope has eyes on it at some point.

As a workaround, enabling the Legacy XML API behavior seems to allow job creation by the terraform provider to succeed, in Rundeck 5.1.0-20240214.

We just set the following:

rundeck.feature.legacyXml.enabled=true

Looks like the code in this repo uses the XML API format heavily, so that will need some work to migrate to JSON.

This is great thanks for this. I tested using Rundeck v5.0.2 and works well too. Tested and working as expected.

Hello,
I got the same issue too.
Adding the legacyXml help for the creation of resource however I do have now an issue with the destroy part.
Did you encounter it too ?

Thanks,

Hello, I got the same issue too. Adding the legacyXml help for the creation of resource however I do have now an issue with the destroy part. Did you encounter it too ?

Thanks,

I've not tried to destroy anything yet. I have noticed certain parts still don't work right. a base job can build out the job and even update existing ok, some reason when i add the ansible plugin for example it will fail with the same api call error. We've halted all work on rundeck atm using terraform and started uploading jobs via the api

Hi @bzuelke,

In my case I was able to found the issue which was at the DB level where constraints was not applied on some jobs. I manually cleaned them without issue on the impacted tables then I was able to delete them with Terraform.