rundeck/terraform-provider-rundeck

rundeck job file extension option

Closed this issue · 1 comments

I’ve created some jobs for rundeck through terraform code for a windows machine.

The documentation page for terraform rundeck job is is [https://registry.terraform.io/providers/rundeck/rundeck/latest/docs/resources/job]

One of my jobs provisions an inline powershell script however the default file extension for windows is .bat however I need to have it as PS1. This can be easily solved through gui by editing the job, going on the workflow tab and in the script section and provide input for the file extension as PS1 however I did not see this option within the terraform documentation (to provide it in an automated manner through terraform as all is being done that way) or I missed that somehow

image

Below is the code that I am using:

resource "rundeck_job" "powershell_lab" {
count = var.no_of_windows_instances != 0 && var.disable_deletion == 1 ? 1 : 0
name = "Run powershell script on server"
project_name = rundeck_project.windows_lab[count.index].name
node_filter_query = "tags:running"
description = "Windows Powershell Script job"

command {
description = "Execute Powershell script"
#file_extension = "PS1"
inline_script = file("${path.module}/scripts/powershell_lab.ps1")
}
}

I would expect to be able to have that implemented through the code for the job itself so that you can set it in an automated manner without the need to go to GUI and add the file_extension as per your needs, manually

Duplicate. This is covered in Issue #9 and PR #10. Waiting for the community to finalize that PR and we can review and merge it.