diff --git a/.github/workflows/eks-setup.yaml b/.github/workflows/eks-setup.yaml index 96dd62d..17e84bf 100644 --- a/.github/workflows/eks-setup.yaml +++ b/.github/workflows/eks-setup.yaml @@ -60,7 +60,7 @@ jobs: - name: Get EC2 Public IP id: get_public_ip - run: echo "EC2_PUBLIC_IP=$(terraform output -raw ec2_public_ip)" + run: echo "EC2_PUBLIC_IP=$(terraform output -raw ec2_public_ip)" >> $GITHUB_ENV InstallTools: runs-on: ubuntu-latest @@ -71,7 +71,7 @@ jobs: - name: SSH and Install AWS CLI and kubectl run: | - sshpass -p "${{ secrets.EC2_SSH_PASSWORD }}" ssh -o StrictHostKeyChecking=no ec2-user@${{ env.EC2_PUBLIC_IP }} << EOF + ssh -o StrictHostKeyChecking=no -i ${{ secrets.EC2_SSH_PRIVATE_KEY }} ec2-user@${{ env.EC2_PUBLIC_IP }} << EOF sudo yum install -y unzip curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" unzip awscliv2.zip diff --git a/main.tf b/main.tf index c867979..276bbca 100644 --- a/main.tf +++ b/main.tf @@ -4,7 +4,6 @@ terraform { key = "terraform.tfstate" region = "us-east-1" encrypt = true - #profile = "tobi" } }