We are experiencing consistent Terraform AWS provider startup timeouts when running our Docker image via `pipe: docker://...` in Bitbucket Pipelines.
The same Docker image and entrypoint script work correctly when used directly as the step image (using `image: <custom-image>` and executing `./entrypoint.sh`). However, when executed through `pipe: docker://<custom-image>`, Terraform fails during provider initialization with the following error:
provider: configuring client automatic mTLS
vertex "provider[\"registry.terraform.io/hashicorp/aws\"].<alias>" error: timeout while waiting for plugin to start
Environment details:
- Bitbucket Pipelines (cloud)
- Execution via `pipe: docker://<custom-image>`
- Terraform 1.7.5
- AWS provider 5.x
- OIDC authentication enabled (`oidc: true`)
- Multiple AWS provider aliases
- Running: terraform plan -refresh-only -detailed-exitcode
Important observation:
When the exact same container and script are executed as the step image (not using `pipe:`), Terraform runs successfully without any provider timeouts.
This suggests the issue may be related to the Docker-in-Docker execution model used by Bitbucket Pipes, potentially affecting Terraform provider subprocess startup (gRPC + mTLS handshake) inside the nested container runtime.
We would appreciate clarification whether this is a known limitation of the Bitbucket Pipe runtime environment and whether there are recommended best practices for running Terraform workloads with multiple provider aliases via `pipe: docker://`.
Hi @Emre Polat
So that we may troubleshoot this for you - we'll need you to raise a support ticket as this will allow us to gain access to your build environment and observe your YAML and build logs/history:
If you're not able to raise a ticket - please let me know your timezone so I may raise one on your behalf with the team who operates during your working hours.
Cheers!
- Ben (Bitbucket Cloud Support)
Hi @Ben can you please create one from me, i am sitting in Germany. Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.