@@ -73,9 +73,10 @@ func resourceWorkflowJobTemplate() *schema.Resource {
7373 Default : false ,
7474 },
7575 "inventory_id" : {
76- Type : schema .TypeInt ,
76+ Type : schema .TypeString ,
7777 Optional : true ,
78- Description : "Inventory applied as a prompt, assuming job template prompts for inventory." ,
78+ Description : "Inventory applied as a prompt, assuming job template prompts for inventory. (id, default=``)" ,
79+ Default : "" ,
7980 },
8081 "limit" : {
8182 Type : schema .TypeString ,
@@ -113,15 +114,6 @@ func resourceWorkflowJobTemplate() *schema.Resource {
113114 Default : "" ,
114115 },
115116 },
116- //Importer: &schema.ResourceImporter{
117- // State: schema.ImportStatePassthrough,
118- //},
119- //
120- //Timeouts: &schema.ResourceTimeout{
121- // Create: schema.DefaultTimeout(1 * time.Minute),
122- // Update: schema.DefaultTimeout(1 * time.Minute),
123- // Delete: schema.DefaultTimeout(1 * time.Minute),
124- //},
125117 }
126118}
127119
@@ -134,7 +126,7 @@ func resourceWorkflowJobTemplateCreate(ctx context.Context, d *schema.ResourceDa
134126 "name" : d .Get ("name" ).(string ),
135127 "description" : d .Get ("description" ).(string ),
136128 "organization" : d .Get ("organization_id" ).(int ),
137- "inventory" : d .Get ("inventory_id" ).(int ),
129+ "inventory" : AtoipOr ( d .Get ("inventory_id" ).(string ), nil ),
138130 "extra_vars" : d .Get ("variables" ).(string ),
139131 "survey_enabled" : d .Get ("survey_enabled" ).(bool ),
140132 "allow_simultaneous" : d .Get ("allow_simultaneous" ).(bool ),
@@ -180,7 +172,7 @@ func resourceWorkflowJobTemplateUpdate(ctx context.Context, d *schema.ResourceDa
180172 "name" : d .Get ("name" ).(string ),
181173 "description" : d .Get ("description" ).(string ),
182174 "organization" : d .Get ("organization_id" ).(int ),
183- "inventory" : d .Get ("inventory_id" ).(int ),
175+ "inventory" : AtoipOr ( d .Get ("inventory_id" ).(string ), nil ),
184176 "extra_vars" : d .Get ("variables" ).(string ),
185177 "survey_enabled" : d .Get ("survey_enabled" ).(bool ),
186178 "allow_simultaneous" : d .Get ("allow_simultaneous" ).(bool ),
0 commit comments