What is the ssh password of hashicorp packer?

829 Views Asked by At

Once you created an image using packer. How do you get the root/ packer/ (any user with sudo privilege)'s password?

packer.json

{
  "builders": [
    {
      "type": "googlecompute",
      "project_id": "project-id",
      "source_image": "ubuntu-2004-focal-v20220615",
      "ssh_username": "packer",
      "zone": "us-west1-a"
    }
  ],
}

After running:

packer build packer.json #a Ubuntu image is created.

Next step, how do I create a sudo user's account?

0

There are 0 best solutions below