GCP Compute Waiting for SSH Available, Invalid ssh key entry

Hi Iam trying to build image

getting error as below:
==> googlecompute.rhel8: Checking image does not exist…
==> googlecompute.rhel8: Creating temporary RSA SSH key for instance…
==> googlecompute.rhel8: Using image: rhel-8-v20220822
==> googlecompute.rhel8: Creating instance…
googlecompute.rhel8: Loading zone: us-east4-a
googlecompute.rhel8: Loading machine type: e2-medium
googlecompute.rhel8: Requesting instance creation…
googlecompute.rhel8: Waiting for creation operation to complete…
googlecompute.rhel8: Instance has been created!
googlecompute.rhel8: Waiting 20s before adding SSH keys…
==> googlecompute.rhel8: Waiting for the instance to become running…
googlecompute.rhel8: IP:
==> googlecompute.rhel8: Using SSH communicator to connect:
==> googlecompute.rhel8: Waiting for SSH to become available…
==> googlecompute.rhel8: Timeout waiting for SSH.
==> googlecompute.rhel8: Deleting instance…
googlecompute.rhel8: Instance has been deleted!
==> googlecompute.rhel8: Deleting disk…
googlecompute.rhel8: Disk has been deleted!
Build ‘googlecompute.rhel8’ errored after 6 minutes 3 seconds: Timeout waiting for SSH.

==> Wait completed after 6 minutes 3 seconds

==> Some builds didn’t complete successfully and had errors:
→ googlecompute.rhel8: Timeout waiting for SSH.

==> Builds finished but no artifacts were created.

Code is here:
source “googlecompute” “rhel8” {
image_name = “test-packer-example”
machine_type = “e2-medium”
communicator = “ssh”
source_image = “rhel-8-v20220822”
source_image_family = “rhel-8”
ssh_username = “root”
zone = var.zone
metadata = {
“enable-oslogin” = “false”
project_id = var.project_id
network = “projects/test-project-23/global/networks/test-vpc”
subnetwork = “projects/test-project-23/regions/us-east4/subnetworks/test-subnet-us-east4”
wait_to_add_ssh_keys = “20s”

build {
sources = [“source.googlecompute.rhel8”]

serial logs
google_guest_agent[1113]: ERROR non_windows_accounts.go:199 Invalid ssh key entry - unrecognized format: ssh-rsa AAAA…