diff --git a/rundeck/job.go b/rundeck/job.go index 40fd08da6..1a610819e 100644 --- a/rundeck/job.go +++ b/rundeck/job.go @@ -207,6 +207,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 diff --git a/rundeck/resource_job.go b/rundeck/resource_job.go index e7a910a9c..d14bef086 100644 --- a/rundeck/resource_job.go +++ b/rundeck/resource_job.go @@ -280,6 +280,10 @@ func resourceRundeckJob() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "hidden": { + Type: schema.TypeBool, + Optional: true, + }, }, }, }, @@ -686,6 +690,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 == false { return nil, fmt.Errorf("Argument \"obscure_input\" must be set to `true` when \"storage_path\" is not empty.") @@ -924,6 +929,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) } diff --git a/website/docs/r/job.html.md b/website/docs/r/job.html.md index ee2b96ae9..125704402 100644 --- a/website/docs/r/job.html.md +++ b/website/docs/r/job.html.md @@ -181,6 +181,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.