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

Fetch Project ID from environment var or command flag #2564

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jbleijenberg-ehvg
Copy link

Description 📣

I made the export command fetch the Project ID from the environment variable INFISICAL_PROJECT_ID.
If that doesn't exist, it will fall back to --projectId, or it will error if neither exists.
This improves the uses of the export command in a CI / CD or development setting

Type ✨

  • Bug fix
  • New feature
  • Improvement
  • Breaking change
  • Documentation

Tests 🛠️

These tests assume you are already logged into your Infisical instance
To use the environment variable, export it first:

export INFISICAL_PROJECT_ID=<your project ID>

And then run the export command:

infisical export 

This should return all the secrets from your selected project and environment

To test the export command as it behaved before, unset the env var and run the export command again. The output should be identical.

unset INFISICAL_PROJECT_ID
infisical export 

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