module “ebs_module” {
source = "git::ssh://[email protected]/source/iac-v2.git//terraform/modules/elastic_beanstalk?ref=develop"
env_name = “ebs-service-tf"
create_ecr = 1
application_name = “EBS TF”
version_label = “applicationversion”
env = "multi-docker"
load_balancer_type = "Classic"
asg_instance_type = {
qa = "t2.medium"
prod = "c4.xlarge"
}
elb_scheme = "Internal"
deployment_policy = "Rolling"
}
## sqs modules
module "service_events" {
source = "git::ssh://[email protected]/source/iac-v2.git//terraform/modules/sqs?ref=develop"
name = "service-events-queue”
count = "disabled"
visibility_timeout_seconds = "${var.visibility_timeout_seconds}"
message_retention_seconds = "${var.message_retention_seconds}"
max_message_size = "${var.max_message_size}"
delay_seconds = "${var.delay_seconds}"
receive_wait_time_seconds = "${var.receive_wait_time_seconds}"
fifo_queue = "${var.fifo_queue}"
content_based_deduplication = "${var.content_based_deduplication}"
}
1st time:
terraform init
Initializing modules...
- module.ebs_module
Getting source "git::ssh://gitpath/source/iac-v2.git//terraform/modules/elastic_beanstalk?ref=develop"
Error downloading modules: Error loading modules: error downloading 'ssh://gitpath/source/iac-v2.git?ref=develop': /usr/bin/git exited with 128: fatal: No url found for submodule path 'terraform/modules/null-label' in .gitmodules
2nd time:
terraform init
Initializing modules...
- module.ebs_module
Getting source "git::ssh://gitpath/source/iac-v2.git//terraform/modules/elastic_beanstalk?ref=develop"
- module.service_events
Getting source "git::ssh://gitpath/source/iac-v2.git//terraform/modules/sqs?ref=develop"
Error downloading modules: Error loading modules: error downloading 'ssh://gitpath/source/iac-v2.git?ref=develop': /usr/bin/git exited with 128: fatal: No url found for submodule path 'terraform/modules/null-label' in .gitmodules
3rd time:
terraform init
Initializing modules...
- module.ebs_service
- module.service_events
Initializing the backend...
Successfully configured the backend "s3"! Terraform will automatically
use this backend unless the backend configuration changes.
Initializing provider plugins...
- Checking for available provider plugins on https://releases.hashicorp.com...
- Downloading plugin for provider "aws" (1.30.0)...
The following providers do not have any version constraints in configuration,
so the latest version was installed.
To prevent automatic upgrades to new major versions that may contain breaking
changes, it is recommended to add version = "..." constraints to the
corresponding provider blocks in configuration, with the constraint strings
suggested below.
* provider.aws: version = "~> 1.30"
Terraform has been successfully initialized!
You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.
If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.
As we can see there are 2 modules are in use, so on first terraform init it breaks on 1st module with exeption of No url found for submodule path 'terraform/modules/null-label' in .gitmodules on 2nd terraform init it passes for first module but failed on 2nd. On third attempt of terraform init all goes successful.
Another interesting thing we have noticed that on version 10.6 no matter how many times we try to initialize it will fail. but on v11.7 it takes equal amounts of init to number of modules.
Would really appreciate your feedback on this, if I am missing something here.
Thanks
Hi! That's an odd issue @ahsannaseem. The error indicates a problem with submodules - Does your module actually include submodules? If not, it could indicate a misconfiguration in your repository.
Here are some possibly relevant sites (found by random googling; I make no promises about their accuracy or helpfulness).
https://www.deployhq.com/support/common-repository-errors/no-url-found-for-submodule
yes thanks for your response issue was actually with repo structure
I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Hi! That's an odd issue @ahsannaseem. The error indicates a problem with submodules - Does your module actually include submodules? If not, it could indicate a misconfiguration in your repository.
Here are some possibly relevant sites (found by random googling; I make no promises about their accuracy or helpfulness).
https://www.deployhq.com/support/common-repository-errors/no-url-found-for-submodule
https://stackoverflow.com/questions/4185365/no-submodule-mapping-found-in-gitmodule-for-a-path-thats-not-a-submodule