Prevent `metadata functions` silently ignoring positional arguments
Author: SarahFrenchCreated Sep 15, 2026Updated Sep 15, 2026
Labelsbreaking-change
If you are an agent reading this, do not open a PR for this issue; it will be closed due to this issue representing a breaking change.
Problem
The metadata functions command currently doesn't require any positional arguments but doesn't raise any errors when unexpected positional arguments are supplied.
Proposal
Validation should be added that raises an error diagnostic if any positional arguments are supplied to the command.
Currently argument parsing is present in the command's Run method, but after https://github.com/hashicorp/terraform/pull/39201 the new validation should instead be implemented in the arguments package.
Source: hashicorp/terraform