From 018ee27df55761816e2bb2a9b0d7fba8c9d576d7 Mon Sep 17 00:00:00 2001 From: mrrishi Date: Tue, 29 Oct 2024 01:00:22 +0530 Subject: [PATCH] fix:aws eks creation --- internal/controller/controller.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/controller/controller.go b/internal/controller/controller.go index 986d7b70..772445e7 100644 --- a/internal/controller/controller.go +++ b/internal/controller/controller.go @@ -11,6 +11,7 @@ import ( "errors" "fmt" "net/http" + "os" "time" runtime "github.com/konstructio/kubefirst-api/internal" @@ -332,6 +333,10 @@ func (clctrl *ClusterController) InitController(def *types.ClusterDefinition) er // Instantiate provider clients and copy cluster controller to cluster type switch clctrl.CloudProvider { case "aws": + os.Setenv("AWS_ACCESS_KEY_ID", clctrl.AWSAuth.AccessKeyID) + os.Setenv("AWS_SECRET_ACCESS_KEY", clctrl.AWSAuth.SecretAccessKey) + os.Setenv("AWS_SESSION_TOKEN", clctrl.AWSAuth.SessionToken) + os.Setenv("AWS_REGION", clctrl.CloudRegion) conf, err := awsinternal.NewAwsV3( clctrl.CloudRegion, clctrl.AWSAuth.AccessKeyID,