Skip to content

allow for provider declaration with index to be parsed.#3

Open
crash-bandi wants to merge 1 commit into
terraform-docs:masterfrom
crash-bandi:master
Open

allow for provider declaration with index to be parsed.#3
crash-bandi wants to merge 1 commit into
terraform-docs:masterfrom
crash-bandi:master

Conversation

@crash-bandi

Copy link
Copy Markdown

I am aware of the statement that this repository does not accept external pull requests, but this addresses an issue with terraform-docs that cannot otherwise be resolved (as far as I can tell), so I am going to try just incase.

With the recent added support to .tofu files, it appears there is at least a limited desire to support OpenTofu. This update allows for a provider declaration on a resource or data source with an index to be specified, as was introduced with OpenTofu v1.9.0. This fixes issue 839 opened on terraform-docs, and is the only way to do so as far as I can tell.

Please let me know if any additional activities are required on my part to make this acceptable.

Signed-off-by: Jason Lines <31143074+crash-bandi@users.noreply.github.com>
@clarity-jason

Copy link
Copy Markdown

Is it worth opening a PR against the upstream project instead of, or in addition to, this fork? They do say "We would be happy to review PRs to fix bugs in existing functionality," which IMO this is.

@crash-bandi

Copy link
Copy Markdown
Author

Is it worth opening a PR against the upstream project instead of, or in addition to, this fork? They do say "We would be happy to review PRs to fix bugs in existing functionality," which IMO this is.

Since the upstream project owner is Hashicorp, and this suggested change is to add support for OpenTofu (a direct open source competitor to their Terraform product), I do not believe it is worth attempting to submit this change there as I am quite certain it will never get approved.

@SizZiKe

SizZiKe commented Aug 6, 2025

Copy link
Copy Markdown

@khos2ow @brittandeyoung @metmajer this issue and terraform-docs/terraform-docs#839 are preventing for_each from being resolved and documented in opentofu.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error when using dynamic keys in for_each statements

3 participants