hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.12k stars 3.33k forks source link

Packer setting iap_tunnel_launch_wait for GCP doesn't work #13164

Open ae07177 opened 2 months ago

ae07177 commented 2 months ago

Community Note

When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.

Overview of the Issue

I have defined iap_tunnel_launch_wait to 600 ( 10 mins ) However just in 5 mins it fails with error ( retry count exhausted ) below []string{"retry count exhausted. Last err: Tunnel start: ERROR: (gcloud.compute.start-iap-tunnel) While checking if a connection can be made: Error while connecting [4003: 'failed to connect to backend']. (Failed to connect to port 22)\n"}

A paragraph or two about the issue you're experiencing. I am trying to create WIndows 2022 Image in GCP. I am trying to connect using IAP tunnelling without public IP. IAP tunnelling works fine for me locally, but it takes 10 minutes to get started. I have defined iap_tunnel_launch_wait to 600 ( 10 mins ) However just in 5 mins it fails with error below []string{"retry count exhausted. Last err: Tunnel start: ERROR: (gcloud.compute.start-iap-tunnel) While checking if a connection can be made: Error while connecting [4003: 'failed to connect to backend']. (Failed to connect to port 22)\n"}

Reproduction Steps

Steps to reproduce this issue

Packer version

From packer version

Simplified Packer Template

If the file is longer than a few dozen lines, please include the URL to the gist of the log or use the Github detailed format instead of posting it directly in the issue.

Operating system and Environment details

OS, Architecture, and any other information you can provide about the environment.

Log Fragments and crash.log files

Include appropriate log fragments. If the log is longer than a few dozen lines, please include the URL to the gist of the log or use the Github detailed format instead of posting it directly in the issue.

Set the env var PACKER_LOG=1 for maximum log detail.

ae07177 commented 2 months ago

Attaching screenshot of issue

Screenshot 2024-09-13 at 1 06 43 AM