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

fix: change makefile terraform docs version variable #13

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

Monska85
Copy link
Contributor

@Monska85 Monska85 commented Nov 26, 2024

PR Type

Enhancement


Description

  • Introduced a configurable variable TERRAFORM_DOCS_IMAGE_TAG to manage terraform-docs version
  • Default version set to '0.18.0' (upgraded from '0.16.0')
  • Replaced hardcoded version with the new variable in docker run command
  • Improves maintainability by centralizing version control

Changes walkthrough 📝

Relevant files
Configuration changes
Makefile
Parameterize terraform-docs version in Makefile                   

Makefile

  • Added TERRAFORM_DOCS_IMAGE_TAG variable with default value of '0.18.0'
  • Updated terraform-docs docker command to use the new variable instead
    of hardcoded version
  • +3/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @Monska85 Monska85 merged commit a292b0c into main Nov 26, 2024
    1 check passed
    @Monska85 Monska85 deleted the fix/renovate_configuration branch November 26, 2024 12:48
    @sparkfabrik-ai-bot
    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Version Validation
    Verify that version 0.18.0 of terraform-docs is compatible with the project's requirements and doesn't introduce breaking changes from 0.16.0

    @sparkfabrik-ai-bot
    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Validate configuration variables to prevent runtime errors from invalid inputs

    Add version validation to ensure TERRAFORM_DOCS_IMAGE_TAG is not empty and follows
    semantic versioning format.

    Makefile [1-3]

     TERRAFORM_DOCS_IMAGE_TAG ?= 0.18.0
    +
    +# Validate terraform-docs version
    +ifeq ($(shell echo $(TERRAFORM_DOCS_IMAGE_TAG) | grep -E '^[0-9]+\.[0-9]+\.[0-9]+$$'),)
    +$(error TERRAFORM_DOCS_IMAGE_TAG must be a valid semantic version)
    +endif
     
     .PHONY: lint tfscan generate-docs
    Suggestion importance[1-10]: 7

    Why: Adding version validation is a valuable safeguard that can prevent runtime errors and ensure the Makefile operates with compatible terraform-docs versions. This is particularly relevant given the version upgrade from 0.16.0 to 0.18.0 in the PR.

    7

    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