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

Feature | Implement Pre-flight Terraform Version Checks in Leverage CLI #259

Closed
exequielrafaela opened this issue Apr 10, 2024 · 3 comments
Assignees

Comments

@exequielrafaela
Copy link
Member

Describe the Feature

Implement a pre-flight check feature within the Leverage CLI that validates the versions of Terraform modules, Terraform core, and Terraform providers before deployment to ensure they meet predefined version criteria.

Expected Behavior

The Leverage CLI should perform automated checks against the versions of Terraform modules, core, and providers utilized in the Reference Architecture project layer. If versions are outdated or do not meet the criteria set for stability and security, the CLI should issue a warning.

Use Case

The motivation for this feature arises from the necessity to standardize version management across multiple deployments, ensuring all Terraform configurations are consistently updated. This helps prevent the "configuration drift" and incompatibility issues that can arise from using multiple versions of Terraform tools in different parts of the architecture, such as the Landing Zone, SSO, and Security Baseline.

Describe Ideal Solution

A desirable solution includes:

  • Integration of a version validation system within the CLI that checks the current versions of the Terraform environment against the latest stable versions.
  • Generate a warning message in the CLI output if deployed versions are out of date.

Additional Context

Adding this feature will significantly streamline the process of maintaining up-to-date and secure infrastructure deployments. It aligns with best practices for infrastructure as code (IaC) management by enforcing version consistency and reducing the administrative burden on individual developers. This feature is particularly critical as we scale up operations and increase the frequency of deployments and updates across various projects.

@borland667
Copy link
Contributor

@exequielrafaela @diego-ojeda-binbash do we have a list of components and versions we want to check for ?

@borland667
Copy link
Contributor

@exequielrafaela @diego-ojeda-binbash

As agreed in planning.

We'll start with a simple check of the module by inspecting the git source and comparing current vs latest by the time we run leverage tf init in that layer.

@exequielrafaela
Copy link
Member Author

We'll favor https://developer.mend.io/github/binbashar/le-tf-infra-aws for this issue.

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

No branches or pull requests

3 participants