When calling a module over from a local source everything went alright, however I decided to refactor the Terraform code to use a git repository for modules.
I created a new repository in our BitBucket account with the name terraform-modules, and refactored the source attribute of the modules to have the following structure:
source = "git::ssh://git@bitbucket.org:carepaydev/terraform-modules.git//modules/iam/iam_roles/assumable_role"
When calling terraform init
I get the following error:
Error downloading modules: Error loading modules: error downloading 'ssh://git@bitbucket.org:<username>/terraform-modules.git': /usr/local/bin/git exited with 128: Cloning into '.terraform/modules/caf541f5e5ccbb1d204bce3b94091014'...
ssh: Could not resolve hostname bitbucket.org:<username>: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Cloning the repository using git clone does work. I tried setting the TF_LOG
env var to TRACE
to see if that would give me more insight, but that did not help.
Any clue why this fails?