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

IONOS_API_URL not working since v6.6.4 #349

Closed
maxbischoff opened this issue Aug 28, 2023 · 1 comment · Fixed by #350
Closed

IONOS_API_URL not working since v6.6.4 #349

maxbischoff opened this issue Aug 28, 2023 · 1 comment · Fixed by #350
Assignees
Labels
bug Something isn't working

Comments

@maxbischoff
Copy link

Description

When using ionosctl v6.6.4 or newer (tested up until 6.6.8), the IONOS_API_URL environment variable does not seem to be used anymore.
Instead of accessing the api endpoint configured this way, the variable is ignored and the default value used.

Expected behavior

I expect the environment variable IONOS_API_URL to define the API endpoint accessed by ionosctl, similar to the --api-url / -u flag.

Environment

Ionosctl version:

6.6.4 (and newer)

OS:

darwin/arm64

Shell:

zsh

How to Reproduce

  1. Set up ionosctl for normal API access, e.g. by exporting the IONOS_USERNAME and IONOS_PASSWORD env variables
  2. Verify that API access works using ionosctl dc list
  3. Set export IONOS_API_URL=doesnt.exist or a similar url that should not work
  4. Run ionosctl dc list. Observe that the same result as in step 2 is obtained.
  5. (optional) run ionosctl -u $IONOS_API_URL dc list and observe an error
@maxbischoff maxbischoff added the bug Something isn't working label Aug 28, 2023
@avirtopeanu-ionos
Copy link
Contributor

Hey, thanks for opening this issue, PR #350 should fix this

avirtopeanu-ionos added a commit that referenced this issue Sep 1, 2023
* fix: api url

* test: write some tests

* revert: debug print

* refactor: pr comm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants