Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…-rundeck into 0.4.7
  • Loading branch information
fdevans committed Oct 30, 2023
2 parents 5b98f00 + 7bc3aed commit 25af7ca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rundeck/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ type JobOption struct {

// Description of the value to be shown in the Rundeck UI.
Description string `xml:"description,omitempty"`

// Option should be hidden from job run page
Hidden bool `xml:"hidden,omitempty"`
}

// JobValueChoices is a specialization of []string representing a sequence of predefined values
Expand Down
6 changes: 6 additions & 0 deletions rundeck/resource_job.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,10 @@ func resourceRundeckJob() *schema.Resource {
Type: schema.TypeString,
Optional: true,
},
"hidden": {
Type: schema.TypeBool,
Optional: true,
},
},
},
},
Expand Down Expand Up @@ -761,6 +765,7 @@ func jobFromResourceData(d *schema.ResourceData) (*JobDetail, error) {
ObscureInput: optionMap["obscure_input"].(bool),
ValueIsExposedToScripts: optionMap["exposed_to_scripts"].(bool),
StoragePath: optionMap["storage_path"].(string),
Hidden: optionMap["hidden"].(bool),
}
if option.StoragePath != "" && !option.ObscureInput {
return nil, fmt.Errorf("argument \"obscure_input\" must be set to `true` when \"storage_path\" is not empty")
Expand Down Expand Up @@ -999,6 +1004,7 @@ func jobToResourceData(job *JobDetail, d *schema.ResourceData) error {
"obscure_input": option.ObscureInput,
"exposed_to_scripts": option.ValueIsExposedToScripts,
"storage_path": option.StoragePath,
"hidden": option.Hidden,
}
optionConfigsI = append(optionConfigsI, optionConfigI)
}
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/job.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,9 @@ The following arguments are supported:
`true` when using this. This results in `Secure Remote Authentication` input type. Setting `exposed_to_scripts` also
`true` results in `Secure` input type.

* `hidden`: (Optional) Boolean controlling whether this option should be hidden from the UI on the job run page.
Defaults to `false`.

`command` blocks must have any one of the following combinations of arguments as contents:

* `description`: (Optional) gives a description to the command block.
Expand Down

0 comments on commit 25af7ca

Please sign in to comment.