feat: Added support for adding providers through mach config directly without needing plugins#519
Open
demeyerthom wants to merge 3 commits intomainfrom
Open
feat: Added support for adding providers through mach config directly without needing plugins#519demeyerthom wants to merge 3 commits intomainfrom
demeyerthom wants to merge 3 commits intomainfrom
Conversation
0c0ac60 to
96c03e7
Compare
96c03e7 to
3598f76
Compare
<!-- Describe in detail the changes you are proposing, and the rationale. --> <!-- Link all GitHub issues fixed by this PR, and add references to prior related PRs. --> Fixes # ### NEW FEATURES | UPGRADE NOTES | ENHANCEMENTS | BUG FIXES | EXPERIMENTS <!-- Write a short description of your changes. Examples: - Fixed a bug - Added a new feature - Updated documentation --> -
…, without needing plugins
3598f76 to
5f428d0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements to the Terraform configuration generation process, focusing on enabling direct provider configurations, improving modularity, and adding support for provider requirements. The changes include adding new features, refactoring existing functionality, and updating templates to accommodate the new capabilities.
Enhancements to Terraform Provider Configuration:
.changes/unreleased/Added-20250627-152055.yaml: Added support for defining providers directly in the Mach configuration without requiring plugins.internal/config/provider.go: IntroducedProviderConfigsandProviderConfigtypes to manage provider configurations, including methods to retrieve provider names.internal/config/global.go: AddedProviderConfigstoTerraformConfigand implemented logic to warn about duplicate provider names between plugins and provider configurations. [1] [2]internal/config/schemas/schema-1.yaml: Updated the schema to includeprovider_configsand defined the structure forProviderConfig. [1] [2]Support for Provider Requirements:
internal/generator/requirements.go: Added functionality to render provider requirements using a new template.internal/generator/templates/requirement.tmpl: Created a template for rendering provider requirements.internal/generator/site.go: Integrated provider requirements rendering into site-level Terraform configurations and resources. [1] [2]Updates to Terraform Component Tags and Variables:
internal/generator/component.go: AddedComponentTagstocomponentContextand updated rendering logic to include tags and additional variables in Terraform configurations. [1] [2]internal/generator/templates/site_component.tmpl: Updated templates to support rendering tags directly in the module configuration.Provider Rendering Enhancements:
internal/generator/providers.go: Added functionality to render provider configurations using a new template.internal/generator/templates/provider.tmpl: Created a template for rendering provider configurations.Dependency Updates:
go.mod: Added thegithub.com/flosch/pongo2/v5dependency to support template rendering.