write_outputs
Write Terraform outputs.tf file for a module by defining output attributes and interfaces with values and sensitive flags.
Instructions
Write the outputs.tf file for a module with properly formatted Terraform locals block.
Each field must have 'value' (any type: string, bool, number, list, dict) and 'sensitive' (bool) keys.
Args: module_path (str): Path to the module directory (must contain facets.yaml). output_attributes (dict): Map where each field is: {"value": , "sensitive": bool} output_interfaces (dict): Map where each field is: {"value": , "sensitive": bool}
Example: write_outputs( module_path="/path/to/module", output_attributes={ "instance_id": {"value": "aws_instance.example.id", "sensitive": False}, "config": {"value": {"region": "us-east-1", "zone": "a"}, "sensitive": False}, "api_keys": {"value": ["key1", "key2"], "sensitive": True}, "enabled": {"value": True, "sensitive": False} } )
Returns: str: JSON formatted success or error message.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| module_path | Yes | ||
| output_attributes | No | ||
| output_interfaces | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |