Restoring the SSH keys and PCT from backed up Terraform state file

Complete the steps provided in this section to restore the SSH keys and PCT from a backed up Terraform state file of a deleted v1.1.0 jump box.

This section describes the procedure to rebuild a usable PPC v1.1.0 deployment workspace on a jump box from an existing cluster and a backed up Terraform state file.

Before you Begin

Ensure the following requirements are met.

  • The state file from all the following modules must be available on the AWS S3 backup bucket.

    • 00_backup_bucket
    • 01_iam_roles
    • 02_eks_cluster
    • 03_node_group
    • 04_eks_addons
    • 05_helm_releases
  • Access to the same AWS account and target EKS cluster.

  • AWS CLI credentials with required permissions.

Perform the following steps to recover PPC

  1. Create a workspace.

    To create a working directory for PCT, run the following command.

    mkdir -p deployment
    cd deployment
    
  2. Download and extract the PCT

    Download the PCT package into the deployment directory and extract it.
    For more information about downloading and extracting the PCT, refer to Preparing for PPC deployment.

    After successfully extracting the template, this directory behaves as recovered installation workspace.

  3. Install required dev tools

    Run the following script.

    cd bootstrap-scripts/
    ./setup-devtools-aws.sh
    
  4. Set kubectl to the target EKS cluster

    To set kubectl to the target EKS cluster, run the following command.

    aws eks update-kubeconfig --region <aws-region> --name <cluster-name>
    

    Example:

    aws eks update-kubeconfig --region us-east-1 --name <cluster-name>
    

    Verify the current cluster

    Before proceeding, verify the context and cluster connectivity. Run the following command.

    kubectl config current-context
    
  5. Initialize OpenTofu

    To initialize OpenTofu for the cluster module, run the following command,

    cd deployment/iac/aws/cluster/modules/05_helm_releases
    tofu init
    
  6. Generate the SSH key for CLI access

    To generate the SSH key for CLI access

    tofu output -raw user_svc_private_key > ~/.ssh/user_svc.pem
    chmod 600 ~/.ssh/user_svc.pem
    

Last modified : July 30, 2026