diff --git a/rundeck/job.go b/rundeck/job.go index fbd74a913..90aa56f08 100644 --- a/rundeck/job.go +++ b/rundeck/job.go @@ -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 diff --git a/rundeck/resource_job.go b/rundeck/resource_job.go index 0302b5a37..8c2a362e7 100644 --- a/rundeck/resource_job.go +++ b/rundeck/resource_job.go @@ -312,6 +312,10 @@ func resourceRundeckJob() *schema.Resource { Type: schema.TypeString, Optional: true, }, + "hidden": { + Type: schema.TypeBool, + Optional: true, + }, }, }, }, @@ -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") @@ -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) } diff --git a/website/docs/r/job.html.md b/website/docs/r/job.html.md index 0ded08dd4..9219b8af6 100644 --- a/website/docs/r/job.html.md +++ b/website/docs/r/job.html.md @@ -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.