awx_job_template_associate_credential import failed
Closed this issue · 2 comments
I was trying to import my manually created templates credentials and getting below error. can you please guide me here
import {
to = awx_job_template_associate_credential.fetch_sdts
id = 18
}
│ Error: Unable to import state for JobTemplate association, invalid format.
│
│ requires the identifier to be set to <job_template_id>/<credential_id>, currently set to 18
sametime i could successfully import templates using below import
import {
to = awx_job_template.fetch_sdts
id = 18
}
The ID for import is a combination of two things. If you check https://github.com/ilijamt/terraform-provider-awx/blob/main/docs/resources/job_template_associate_credential.md
Then the ID should be <job_template_id>/<credential_id>
import {
to = awx_job_template_associate_credential.fetch_sdts
id = "${awx_job_template.fetch_sdts.id}/{awx_credential.cred.id}"
}
or another example
import {
to = awx_job_template_associate_credential.fetch_sdts
id = "29/18"
}
Where
- job_template_id =
29
- credential_id =
18
Can you try this and let me know if it works?
Thank you so much its working.