Skip to content

Commit

Permalink
fix: do not error and return on empty ssmprofile
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Lin <[email protected]>
  • Loading branch information
Ezzahhh committed Jan 6, 2025
1 parent 9967c68 commit 9f5dc16
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions internal/provider/ephemeral_ssm.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,6 @@ func (d *SSMEphemeral) Close(ctx context.Context, req ephemeral.CloseRequest, re
return
}
ssmProfile, _ := req.Private.GetKey(ctx, "ssm_profile")
if len(ssmProfile) < 1 {
resp.Diagnostics.AddWarning("No SSM profile provided", "SSM profile length received is 0")
return
}
awsCfg, err := config.LoadDefaultConfig(ctx, config.WithRegion(string(ssmRegion)), config.WithSharedConfigProfile(string(ssmProfile)))
if err != nil {
resp.Diagnostics.AddError("Failed to load AWS config", fmt.Sprintf("Error: %s", err))
Expand Down

0 comments on commit 9f5dc16

Please sign in to comment.