Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Data Source Check For Resource #623

Draft
wants to merge 2 commits into
base: moduli-generate-datasources
Choose a base branch
from

Conversation

RyanDerr
Copy link
Member

Overview

The goal of this smaller PR is to assert that only data sources should be generated if there is a matching resource for the boundary terraform provider that already exists. This facilitates us to make so that data sources such as auth-tokens and sessions are not generated, as likely that are not useful to provider a data reference to.

Changes

  • Add a method to determine based on the resource paths from the openapi json, if an associated resource of the same type already exists within the provider, if not then skip generating that data source.

Notes

Because not all data sources map perfectly 1-1 with resources, in order to determine if a resource *likely exists globbing is performed in order to check if a resource for the provider exists. An example of this would be data source host_catalog vs the resource boundary_host_catalog_static.

@KT-1000 KT-1000 requested a review from moduli September 23, 2024 16:49
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.

1 participant