Skip to content

fix: api key read errors out when getting keys for users#171

Merged
ilia-medvedev merged 2 commits intomasterfrom
fix/api-key-failing-and-impersonate
Sep 9, 2025
Merged

fix: api key read errors out when getting keys for users#171
ilia-medvedev merged 2 commits intomasterfrom
fix/api-key-failing-and-impersonate

Conversation

@ilia-medvedev
Copy link
Copy Markdown

What

Fix codefresh_api_key resource - failing with error because of an API behaviour change

Why

When refreshing state that includes an API key the following error appeared
image

This is due to the fact the the token request was run without impersonation. Previously this used to return the proper token, but this is not the correct behavior. Because tokens are user and account scoped a switched must be made to the correct user before reading the token. This PR fixes this on the provider and does the switch the correct user before reading the token.

Notes

Checklist

@ilia-medvedev
Copy link
Copy Markdown
Author

/test

@ilia-medvedev
Copy link
Copy Markdown
Author

/test

@ilia-medvedev ilia-medvedev merged commit f217344 into master Sep 9, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant