Terraform Plan
- PATCH
- /workspaces
- /:workspace
- /projects
- /:project_name
- /pipelines
- /:pipeline_id
- /actions
- /:action_id
Update Terraform Plan action configuration
Warning
You can't change the type of an existing action. To change the type, remove the action and add it again.
Examples
Terraform Plan (TERRAFORM_PLAN)Terraform Plan with custom image from a private registry (TERRAFORM_PLAN)
Example: Terraform Plan (TERRAFORM_PLAN)
curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions/:action_id" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Terraform Plan",
"type": "TERRAFORM_PLAN",
"trigger_time": "ON_EVERY_EXECUTION",
"tool": "OPENTOFU",
"version": "1.9.0",
"working_directory": "./infrastructure/prod",
"tf_workspace": "production",
"additional_args": "-var-file=prod.tfvars -parallelism=20"
}'Example: Terraform Plan with custom image from a private registry (TERRAFORM_PLAN)
curl -X PATCH "https://api.buddy.works/workspaces/:workspace/projects/:project_name/pipelines/:pipeline_id/actions/:action_id" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "Content-Type: application/json" \
-d '{
"name": "Terraform Plan",
"type": "TERRAFORM_PLAN",
"trigger_time": "ON_EVERY_EXECUTION",
"tool": "CUSTOM",
"custom_binary_path": "/usr/local/bin/tofu",
"docker_image_name": "mycompany/terraform-runner",
"docker_image_tag": "1.9.5",
"image_location": "PRIVATE_REGISTRY",
"docker_registry": "OTHER",
"registry": "my.registry.com",
"login": "buddyworks",
"password": "secret",
"working_directory": "./infrastructure/prod"
}'STATUS200 OK