diff --git a/pkg/workflows/workload/writeclusterconfig.go b/pkg/workflows/workload/writeclusterconfig.go index 4f36fbf63999..5cc563b3d180 100644 --- a/pkg/workflows/workload/writeclusterconfig.go +++ b/pkg/workflows/workload/writeclusterconfig.go @@ -20,7 +20,8 @@ func (s *writeClusterConfig) Run(ctx context.Context, commandContext *task.Comma } - if commandContext.ClusterSpec.AWSIamConfig != nil { + // Generate AWS IAM kubeconfig only for cluster creation step + if commandContext.CurrentClusterSpec == nil && commandContext.ClusterSpec.AWSIamConfig != nil { logger.Info("Generating the aws iam kubeconfig file") err = commandContext.ClusterManager.GenerateAWSIAMKubeconfig(ctx, commandContext.ManagementCluster) if err != nil {