Skip to content

workflows: enforce list resource implementation for new resources#32173

Open
katbyte wants to merge 2 commits intomainfrom
kt/now-always-with-lists
Open

workflows: enforce list resource implementation for new resources#32173
katbyte wants to merge 2 commits intomainfrom
kt/now-always-with-lists

Conversation

@katbyte
Copy link
Copy Markdown
Collaborator

@katbyte katbyte commented Apr 15, 2026

Community Note

  • Please vote on this PR by adding a 👍 reaction to the original PR to help the community and maintainers prioritize for review
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for PR followers and do not help prioritize for review

Description

This PR adds a new CI workflow that enforces all new resources added to the provider include a corresponding list resource implementation (*_resource_list.go).

With the introduction of the list block in Terraform 1.14+, every resource in the provider should support listing. This check ensures new resources aren't merged without their list implementation, preventing us from accumulating more list-resource debt.

How it works:

  • A bash script (scripts/enforce-list-for-new-resources.sh) diffs the PR against origin/main to detect newly added *_resource.go files
  • For each new resource file, it checks that a corresponding *_resource_list.go file exists
  • If any are missing, the check fails with a clear message indicating what's expected

Skipping the check:

  • If a resource genuinely cannot support listing (e.g. it has no List API), the allow-without-list label can be applied to the PR to skip the check

PR Checklist

  • I have followed the guidelines in our Contributing Documentation.
  • I have checked to ensure there aren't other open Pull Requests for the same update/change.
  • I have checked if my changes close any open issues. If so please include appropriate closing keywords below.
  • I have updated/added Documentation as required written in a helpful and kind way to assist users that may be unfamiliar with the resource / data source.
  • I have used a meaningful PR title to help maintainers and other users understand this change and help prevent duplicate work.

Changes to existing Resource / Data Source

N/A - This PR only adds CI tooling.

Change Log

  • CI - add enforce-list-resources workflow to require list resource implementations for new resources

This is a (please select all that apply):

  • Bug Fix
  • New Feature (ie adding a service, resource, or data source)
  • Enhancement
  • Breaking Change

Related Issue(s)

N/A

AI Assistance Disclosure

  • AI Assisted - This contribution was made by, or with the assistance of, AI/LLMs

Script and workflow were generated with AI assistance, reviewed and tested locally.

Rollback Plan

If a change needs to be reverted, we will publish an updated version of the provider.

Changes to Security Controls

No changes to security controls.

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.

1 participant