Best practices for git repository containing multiple modules
I've got a single repository containing multiple modules at different distances down the tree (structure below). I'm trying to work out the best values to supply to GIT_PROVIDER_CONFIG to make it as easy as possible to set up these modules. So far I have something like what's below, but terrareg won't accept it because it wants both {namespace}
and {module}
in the clone_url
.
Have I got the right idea here, or am I missing something obvious?
{"name": "multiple modules", "base_url": "https://github.com/example/{namespace}/tree/main/dir1/{module}/terraform", "clone_url": "ssh://git@github.com/vivacitylabs/{namespace}.git", "browse_url": "https://github.com/vivacitylabs/{namespace}/tree/{tag}/cloud/{module}/{path}", "tag_format": "v{major}.{minor}"}
Repo layout:
/
==> /dir1
=======> /dir1/nest1/module1
=======> /dir1/nest1/module2
==> /dir2
=======> /dir2/module3
Github reference: https://github.com/MatthewJohn/terrareg/issues/40