Closed juan-acevedo-ntt closed 1 year ago
The format of the module source you provided is not valid. In fact, terraform init
fails.
$ terraform init
Initializing the backend...
Initializing modules...
╷
│ Error: Invalid module source address
│
│ Module "foo" (declared at main.tf line 1) has invalid source address
│ "git::ssh://git@xxx.yyy.com:terraform/azure/terraform-azurerm-storage.git?ref=zzz/1.3.0": Terraform cannot detect a
│ supported external module source type for
│ ssh://git@xxx.yyy.com:terraform/azure/terraform-azurerm-storage.git?ref=zzz/1.3.0.
So the TFLint warning "module source is not a valid URL" seems correct.
Probably the correct format is:
- git::ssh://git@xxx.yyy.com:terraform/azure/terraform-azurerm-storage.git?ref=zzz/1.3.0
+ git::ssh://git@xxx.yyy.com/terraform/azure/terraform-azurerm-storage.git?ref=zzz/1.3.0
The url format should be valid according to https://developer.hashicorp.com/terraform/language/modules/sources#generic-git-repository and it has a version pinned. But the linter shows a warning:
The linter works fine when using this other format (that is not the correct one):