Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/resources/job_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ resource "awx_job_template" "example" {

### Required

- `inventory_id` (String) The inventory ID to associate with the job template.
- `job_type` (String) Can be one of: `run`, `check`, or `scan`
- `name` (String) The name of the job template.
- `project_id` (Number) The project ID to associate with the job template.
Expand All @@ -55,7 +54,7 @@ resource "awx_job_template" "example" {
- `allow_simultaneous` (Boolean)
- `ask_credential_on_launch` (Boolean)
- `ask_diff_mode_on_launch` (Boolean)
- `ask_inventory_on_launch` (Boolean)
- `ask_inventory_on_launch` (Boolean) Defaults to false. Whether to ask for inventory on launch. If set to false, `inventory_id` must be set.
- `ask_job_type_on_launch` (Boolean)
- `ask_limit_on_launch` (Boolean)
- `ask_skip_tags_on_launch` (Boolean)
Expand All @@ -71,6 +70,7 @@ resource "awx_job_template" "example" {
- `force_handlers` (Boolean) Force handlers to run on the job template.
- `forks` (Number) The number of forks to associate with the job template.
- `host_config_key` (String)
- `inventory_id` (String) The inventory ID to associate with the job template. If not set, `ask_inventory_on_launch` must be true.
- `job_tags` (String) The job tags to associate with the job template.
- `limit` (String) The limit to apply to filter hosts that run on this job template.
- `playbook` (String) The playbook to associate with the job template.
Expand Down
11 changes: 6 additions & 5 deletions internal/awx/resource_job_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func resourceJobTemplate() *schema.Resource {
},
"inventory_id": {
Type: schema.TypeString,
Required: true,
Description: "The inventory ID to associate with the job template.",
Optional: true,
Description: "The inventory ID to associate with the job template. If not set, `ask_inventory_on_launch` must be true.",
},
"project_id": {
Type: schema.TypeInt,
Expand Down Expand Up @@ -142,9 +142,10 @@ func resourceJobTemplate() *schema.Resource {
Default: false,
},
"ask_inventory_on_launch": {
Type: schema.TypeBool,
Optional: true,
Default: false,
Type: schema.TypeBool,
Optional: true,
Default: false,
Description: "Defaults to false. Whether to ask for inventory on launch. If set to false, `inventory_id` must be set.",
},
"ask_variables_on_launch": {
Type: schema.TypeBool,
Expand Down