Skip to content

fix: remove yamldecode validation from product-demo configuration_yaml - #142

Merged
djwmarcx merged 1 commit into
mainfrom
fix/product-demo-yaml-validation
Aug 7, 2026
Merged

djwmarcx merged 1 commit into
mainfrom
fix/product-demo-yaml-validation

Conversation

@djwmarcx

@djwmarcx djwmarcx commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Problem

Terraform runs for product-demo fail with:

Error: Invalid value for variable
  on terraform.tfvars line 1:
  configuration_yaml = "default_config: null\n...\nautomation: !include automations.yaml\n..."

configuration_yaml must be valid YAML syntax

Cause

yamldecode() implements plain YAML 1.2 and rejects unknown tags. Home Assistant's configuration.yaml relies on custom tags that its own loader resolves — !include, !include_dir_merge_list, !secret, !env_var — so any realistic config fails the validation.

Fix

Remove the validation block. There's no way to whitelist tags in yamldecode(), so it can't be tightened to accept HA syntax — a comment in its place records why.

Terraform's yamldecode() implements plain YAML 1.2 and rejects unknown
tags. Home Assistant's configuration.yaml relies on custom tags such as
!include, !secret and !env_var, so any realistic config fails the check:

  configuration_yaml must be valid YAML syntax

There is no way to whitelist tags in yamldecode(), so the validation is
removed rather than tightened.
@djwmarcx
djwmarcx requested review from ludeeus and a lite review from Copilot August 4, 2026 10:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes failing Terraform runs for product-demo by removing a variable validation that attempted to parse Home Assistant’s configuration.yaml using Terraform’s yamldecode(), which rejects Home Assistant’s custom YAML tags.

Changes:

  • Removed yamldecode()-based validation from the configuration_yaml variable to avoid false failures on valid Home Assistant configs.
  • Added an explanatory comment documenting why validation is intentionally omitted.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@djwmarcx
djwmarcx merged commit ea119ef into main Aug 7, 2026
4 checks passed
@djwmarcx
djwmarcx deleted the fix/product-demo-yaml-validation branch August 7, 2026 06:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants