Terraform Provider Engine file APIs
The following section includes Terraform Provider Engine file APIs. You can upload Terraform plug-in files to Terraform pods by using these APIs.
- Retrieve Terraform system and user plug-ins
- Retrieve user-uploaded Terraform plug-ins
- Create a Terraform Provider Engine file
- Delete a Terraform Provider Engine file
Retrieve Terraform system and user plug-ins
curl -k -X GET \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
"https://${TSA_HOSTNAME}/cam/api/v1/providerenginefiles?tenantId=${TSA_TENANT_ID}"
Retrieve user-uploaded Terraform plug-ins
curl -k -X GET \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
"https://${TSA_HOSTNAME}/cam/api/v1/providerenginefiles?filter[where][category]=user&tenantId=${TSA_TENANT_ID}"
Create a Terraform Provider Engine file
You must have an Administrator or cluster administrator role to run this API.
curl -k -X POST -H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-F "template_type=Terraform" \
-F "type=file" \
-F "zipfile=@customer_files.zip" \
"https://${TSA_HOSTNAME}/cam/api/v1/providerenginefiles?tenantId=${TSA_TENANT_ID}"
In the previous example, the user uploads a new Terraform plug-in. The archive can contain multiple plug-ins that are copied to the following path on each provider Terraform pod when they are restarted.
/home/terraform/.terraform.d/plugins
Delete a Terraform Provider Engine file
You must have an Administrator or cluster administrator role to run this API.
curl -k -X DELETE \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
"https://${TSA_HOSTNAME}/cam/api/v1/providerenginefiles/${PROVIDERENGINEFILES_ID}?tenantId=${TSA_TENANT_ID}"