- Okay once you've created some modules
you may wanna start distributing them,
and you can distribute them
to the Terraform community at large
using the Public Repository,
you can create a Private Repository in Terraform Cloud,
you can use Source Control Management links
as we talked about before,
but I just wanna run through the process
for adding these to the Terraform Public Repo
if you're interested in doing that.
So, first of all as mentioned,
they have to be named properly.
So it will not allow you to upload a repository
that's not named with this naming convention.
And again, it's the word Terraform,
dash the provider, dash the name of your module.
And the name of the module itself
can contain other dashes, it doesn't matter.
Anything after the second dash
is considered to be the name of the module.
So it has to be a public repository
to be in the public Terraform Registry,
it has to be named this way,
it has to have a README file,
and it will give you warnings if you don't have,
if you're not following some of these other conventions
like having a LICENSE,
and not having an examples directory.
But the way that you connect this to Terraform
is you go to the Terraform Registry,
so registry.terriform.io.
You have to sign in, and you sign in
using your GitHub account.
These ones have to be published,
in order to use the Public Registry
they can only be in GitHub and they have to be public.
That can't be another source code provider.
So once you have that done,
then you can go to this Publish
and it will ask you to select your Repository on GitHub.
And then it will list all the ones
that are named correctly.
So this is just looking at the names,
and these are all ones that I happen to have
in my, that are public that are in the My GitHub account.
Once we publish the module,
in order to make it available
we have to tag the releases.
So you can see if we look at this module
that we just published,
we can see that it has a few versions.
And so this is what gets referenced
in the version specification when you're creating a module.
And they way that you create these
is that you go into GitHub
and you create a Release.
So you can see 0.14 is the last release,
0.14, I'm not sure if it'll let me create one.
So this is just an example
of creating a release.
And we'll publish that, and let's see if it shows up here,
and so there we go.
So now there's a new version.
We didn't make any changes,
but that's how that's managed.
It's managed using GitHub Releases.
It won't show up here at all
until you create at least one release.