infracost_cloud_update_guardrail
Modify cost guardrail thresholds and settings in Infracost Cloud to control infrastructure spending by setting budget limits, configuring notifications, and managing pull request actions.
Instructions
Update an existing guardrail in Infracost Cloud. Requires INFRACOST_SERVICE_TOKEN environment variable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orgSlug | No | Organization slug from Infracost Cloud (defaults to INFRACOST_ORG env var) | |
| guardrailId | Yes | Guardrail ID | |
| name | No | Name for the guardrail | |
| filters | No | Filters to limit scope of the guardrail | |
| increaseThreshold | No | Threshold for cost increases (monthly dollar amount) | |
| increasePercentThreshold | No | Threshold for cost increases (percentage) | |
| totalThreshold | No | Threshold for total cost (monthly dollar amount) | |
| message | No | Custom message to display when threshold is exceeded | |
| webhookUrl | No | Webhook URL to notify when threshold is exceeded | |
| blockPullRequest | No | Whether to block PR when threshold is exceeded | |
| commentOnPullRequest | No | Whether to comment on PR when threshold is exceeded |
Input Schema (JSON Schema)
{
"properties": {
"blockPullRequest": {
"description": "Whether to block PR when threshold is exceeded",
"type": "boolean"
},
"commentOnPullRequest": {
"description": "Whether to comment on PR when threshold is exceeded",
"type": "boolean"
},
"filters": {
"description": "Filters to limit scope of the guardrail",
"items": {
"properties": {
"type": {
"description": "Filter type",
"enum": [
"project",
"repository"
],
"type": "string"
},
"value": {
"description": "Filter value",
"type": "string"
}
},
"required": [
"type",
"value"
],
"type": "object"
},
"type": "array"
},
"guardrailId": {
"description": "Guardrail ID",
"type": "string"
},
"increasePercentThreshold": {
"description": "Threshold for cost increases (percentage)",
"type": "number"
},
"increaseThreshold": {
"description": "Threshold for cost increases (monthly dollar amount)",
"type": "number"
},
"message": {
"description": "Custom message to display when threshold is exceeded",
"type": "string"
},
"name": {
"description": "Name for the guardrail",
"type": "string"
},
"orgSlug": {
"description": "Organization slug from Infracost Cloud (defaults to INFRACOST_ORG env var)",
"type": "string"
},
"totalThreshold": {
"description": "Threshold for total cost (monthly dollar amount)",
"type": "number"
},
"webhookUrl": {
"description": "Webhook URL to notify when threshold is exceeded",
"type": "string"
}
},
"required": [
"guardrailId"
],
"type": "object"
}