---
title: "Edit a terraform deployment restriction"
method: PUT
path: "/terraform/{terraformId}/deploymentRestriction/{deploymentRestrictionId}"
tags: ["Terraform Deployment Restriction"]
---

# Edit a terraform deployment restriction

`PUT /terraform/{terraformId}/deploymentRestriction/{deploymentRestrictionId}`

## Request

- Base URL: `https://api.qovery.com`
- URL: `https://api.qovery.com/terraform/{terraformId}/deploymentRestriction/{deploymentRestrictionId}`
- Auth: one of:
  - API key in header `Authorization`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/qovery/apis/qovery-api/docs/terraform/:terraformId/deploymentRestriction/:deploymentRestrictionId/put.ts> (a function with typed inputs; its response is checked against the schema)

Edit a terraform deployment restriction

## Request body

- TerraformDeploymentRestrictionRequest
  - `mode` 'EXCLUDE' | 'MATCH', required: Match mode will rebuild app only if specified items are updated. Exclude mode will not rebuild app if specified items are updated.
  - `type` 'PATH', required
  - `value` string, required: ‘For `PATH` restrictions, the value must not start with `/`’

## Response `200`

Edit a terraform deployment restriction

- TerraformDeploymentRestrictionResponse
  - `id` string, uuid, required
  - `created_at` string, date-time, required
  - `updated_at` string, date-time
  - `mode` 'EXCLUDE' | 'MATCH', required: Match mode will rebuild app only if specified items are updated. Exclude mode will not rebuild app if specified items are updated.
  - `type` 'PATH', required
  - `value` string, required: ‘For `PATH` restrictions, the value must not start with `/`’

## Other responses

- `400`: Bad request
- `401`: Access token is missing or invalid
- `403`: Access forbidden
- `404`: Resource not found

---

[API](https://skmtc.dev/qovery/apis/qovery-api.md) - [All operations](https://skmtc.dev/qovery/apis/qovery-api/llms.txt) - [OpenAPI document](https://skmtc.dev/qovery/apis/qovery-api/revisions/93c4960a44ba?raw)
