Skip to content

Commit e130f83

Browse files
committed
review changes 4
Signed-off-by: Mauritz Uphoff <mauritz.uphoff@stackit.cloud>
1 parent bddddb0 commit e130f83

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

stackit/internal/core/core.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,13 @@ const (
2828
)
2929

3030
type EphemeralProviderData struct {
31+
ProviderData
32+
3133
PrivateKey string
3234
PrivateKeyPath string
3335
ServiceAccountKey string
3436
ServiceAccountKeyPath string
3537
TokenCustomEndpoint string
36-
EnableBetaResources bool
3738
}
3839

3940
type ProviderData struct {

stackit/internal/services/access_token/ephemeral_resource.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@ func (e *accessTokenEphemeralResource) Open(ctx context.Context, req ephemeral.O
100100
func getAccessToken(keyAuthConfig *config.Configuration) (string, error) {
101101
roundTripper, err := auth.KeyAuth(keyAuthConfig)
102102
if err != nil {
103-
return "", fmt.Errorf("failed to initialize authentication: %w", err)
103+
return "", fmt.Errorf(
104+
"failed to initialize authentication: %w. "+
105+
"Make sure service account credentials are configured either in the provider configuration or via environment variables",
106+
err,
107+
)
104108
}
105109

106110
// Type assert to access token functionality

0 commit comments

Comments
 (0)