mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Merge pull request #4301 from apparentlymart/rundeck-task-project-issue
Only refresh project name if Rundeck server provides it
This commit is contained in:
commit
e971688151
@ -463,7 +463,14 @@ func jobToResourceData(job *rundeck.JobDetail, d *schema.ResourceData) error {
|
||||
d.Set("id", job.ID)
|
||||
d.Set("name", job.Name)
|
||||
d.Set("group_name", job.GroupName)
|
||||
d.Set("project_name", job.ProjectName)
|
||||
|
||||
// The project name is not consistently returned in all rundeck versions,
|
||||
// so we'll only update it if it's set. Jobs can't move between projects
|
||||
// anyway, so this is harmless.
|
||||
if job.ProjectName != "" {
|
||||
d.Set("project_name", job.ProjectName)
|
||||
}
|
||||
|
||||
d.Set("description", job.Description)
|
||||
d.Set("log_level", job.LogLevel)
|
||||
d.Set("allow_concurrent_executions", job.AllowConcurrentExecutions)
|
||||
|
Loading…
Reference in New Issue
Block a user