Hi,
We are working on creating a private registry which will be hosted on our servers.
We have created the required APIs and now trying to use the private registry modules to create resources.
While terraform init, we are getting error:
│ Error: Module not found
│
│ The module address “app.example.com/namespace/aws/s3_bucket” could not be resolved.
│
│ If you intended this as a path relative to the current module, use “./app.example.com/namespace/aws/s3_bucket” instead. The “./” prefix indicates that the address is a
│ relative filesystem path.
Here are the implementation details:
Download API:
https://xxxxxxxx.execute-api.eu-west-1.amazonaws.com/prod/modules.v1/namespace/aws/s3_bucket/0.0.2/download
This url returns the “X-Terraform-Get” header as well.
Module source download url: s3::https://examplebucket.s3.eu-west-1.amazonaws.com/aws-s3-bucket.zip
OS: Windows
terraform.rc path: %APP_DATA%
terraform.rc content:
host "app.example.com" {
services = {
"modules.v1" = "https://xxxxxxxx.execute-api.eu-west-1.amazonaws.com/prod/"
}
}
credentials "app.example.com" {
token = "token"
}
main.tf content:
terraform {
required_version = ">= 0.12.0"
}
module "s3bucket" {
source = "app.example.com/namespace/aws/s3_bucket"
bucket = "sometestbucketname"
acl = "private"
}
We have token based authentication in place.
Can someone help with this??