write_config_files
Writes facets.yaml configuration for a Terraform module with a dry-run option to preview changes before applying.
Instructions
Writes facets.yaml configuration file for a Terraform module. Make Sure you have Called FIRST_STEP_get_instructions first before this tool.
Steps for safe variable update:
Always run with
dry_run=Truefirst. This is an irreversible action.Parse and display a diff:
Added Modified (old -> new) Removed
Ask the user if they want to edit or add variables and wait for his input.
Only if the user explicitly confirms, run again with
dry_run=False.
Args: module_path (str): Path to the module directory. facets_yaml (str): Content for facets.yaml file. dry_run (bool): If True, returns a preview of changes without making them. Default is True.
Returns: str: Success message, diff preview (if dry_run=True), or error message.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"module_path": "<module_path>",
"facets_yaml": "<facets_yaml>"
},
"name": "write_config_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_path | Yes | ||
| facets_yaml | Yes | ||
| dry_run | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |