gitlab-tf-module-inspector

command module
v0.0.0-...-30be4de Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

GitLab TF Module inspector

This is a simple script that will analyze a certain GitLab path (group, or subgroups), and it'll identify all the existing Terraform modules that has or not using a certain module.

NOTE: It's required to clone "in memory" — so ensure that the paths analyzed doesn't include your whole GitLab organization if it's too big. It's recommended to use a group/subgroup path.


Pre-requisites

Usage

Export your GitLab token as an environment variable:

export GITLAB_PRIVATE_TOKEN=<your-gitlab-token>

Run it

go run main.go -path=/Users/my-user/@code/ -tf-module="gitlab.com/my-group/my-module"
# or if you want to exclude certain modules
go run main.go -path=/Users/my-user/@code/ -tf-module="gitlab.com/my-group/my-module" -exclude="group-that-it-should-be-excluded"

It's important to mention that the -exclude flag is optional, and it'll ignore those groups/projects/repos analyzed that matches the string provided in any part of the path.

Options allowed

Option Description
-group The gitlab path where your group/subgroup reside. It's not required to include https://gitlab.com, that's managed by the script.
-tf-module The gitlab path of the module that you want to analyze.
-exclude The gitlab path of the group/subgroup that you want to exclude from the analysis.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL