Skip to content

Conversation

ilia-medvedev-codefresh
Copy link
Contributor

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-codefresh
Copy link
Contributor Author

/test

@ilia-medvedev-codefresh
Copy link
Contributor Author

/test

@ilia-medvedev-codefresh ilia-medvedev-codefresh 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