1 00:00:06,920 --> 00:00:09,930 - Okay once you've created some modules 2 00:00:09,930 --> 00:00:11,730 you may wanna start distributing them, 3 00:00:11,730 --> 00:00:14,030 and you can distribute them 4 00:00:14,030 --> 00:00:16,530 to the Terraform community at large 5 00:00:16,530 --> 00:00:19,410 using the Public Repository, 6 00:00:19,410 --> 00:00:23,530 you can create a Private Repository in Terraform Cloud, 7 00:00:23,530 --> 00:00:26,330 you can use Source Control Management links 8 00:00:26,330 --> 00:00:29,000 as we talked about before, 9 00:00:29,000 --> 00:00:31,570 but I just wanna run through the process 10 00:00:31,570 --> 00:00:35,090 for adding these to the Terraform Public Repo 11 00:00:35,090 --> 00:00:36,810 if you're interested in doing that. 12 00:00:36,810 --> 00:00:39,700 So, first of all as mentioned, 13 00:00:39,700 --> 00:00:41,290 they have to be named properly. 14 00:00:41,290 --> 00:00:46,290 So it will not allow you to upload a repository 15 00:00:46,320 --> 00:00:48,900 that's not named with this naming convention. 16 00:00:48,900 --> 00:00:50,750 And again, it's the word Terraform, 17 00:00:50,750 --> 00:00:55,750 dash the provider, dash the name of your module. 18 00:00:58,420 --> 00:00:59,770 And the name of the module itself 19 00:00:59,770 --> 00:01:01,580 can contain other dashes, it doesn't matter. 20 00:01:01,580 --> 00:01:03,020 Anything after the second dash 21 00:01:03,020 --> 00:01:05,300 is considered to be the name of the module. 22 00:01:05,300 --> 00:01:07,050 So it has to be a public repository 23 00:01:07,050 --> 00:01:10,290 to be in the public Terraform Registry, 24 00:01:10,290 --> 00:01:12,010 it has to be named this way, 25 00:01:12,010 --> 00:01:14,120 it has to have a README file, 26 00:01:14,120 --> 00:01:17,260 and it will give you warnings if you don't have, 27 00:01:17,260 --> 00:01:19,410 if you're not following some of these other conventions 28 00:01:19,410 --> 00:01:21,440 like having a LICENSE, 29 00:01:21,440 --> 00:01:24,310 and not having an examples directory. 30 00:01:24,310 --> 00:01:28,430 But the way that you connect this to Terraform 31 00:01:28,430 --> 00:01:32,050 is you go to the Terraform Registry, 32 00:01:32,050 --> 00:01:34,250 so registry.terriform.io. 33 00:01:34,250 --> 00:01:37,430 You have to sign in, and you sign in 34 00:01:37,430 --> 00:01:40,780 using your GitHub account. 35 00:01:40,780 --> 00:01:42,030 These ones have to be published, 36 00:01:42,030 --> 00:01:44,460 in order to use the Public Registry 37 00:01:45,410 --> 00:01:48,730 they can only be in GitHub and they have to be public. 38 00:01:48,730 --> 00:01:51,653 That can't be another source code provider. 39 00:01:53,070 --> 00:01:54,960 So once you have that done, 40 00:01:54,960 --> 00:01:56,540 then you can go to this Publish 41 00:01:58,020 --> 00:02:03,020 and it will ask you to select your Repository on GitHub. 42 00:02:03,480 --> 00:02:04,880 And then it will list all the ones 43 00:02:04,880 --> 00:02:06,180 that are named correctly. 44 00:02:06,180 --> 00:02:07,630 So this is just looking at the names, 45 00:02:07,630 --> 00:02:11,120 and these are all ones that I happen to have 46 00:02:11,120 --> 00:02:15,210 in my, that are public that are in the My GitHub account. 47 00:02:15,210 --> 00:02:16,690 Once we publish the module, 48 00:02:16,690 --> 00:02:19,110 in order to make it available 49 00:02:19,110 --> 00:02:21,483 we have to tag the releases. 50 00:02:26,300 --> 00:02:30,080 So you can see if we look at this module 51 00:02:30,080 --> 00:02:32,130 that we just published, 52 00:02:32,130 --> 00:02:36,133 we can see that it has a few versions. 53 00:02:37,560 --> 00:02:39,170 And so this is what gets referenced 54 00:02:39,170 --> 00:02:43,778 in the version specification when you're creating a module. 55 00:02:43,778 --> 00:02:45,550 And they way that you create these 56 00:02:45,550 --> 00:02:48,480 is that you go into GitHub 57 00:02:49,430 --> 00:02:51,903 and you create a Release. 58 00:02:53,530 --> 00:02:57,340 So you can see 0.14 is the last release, 59 00:02:57,340 --> 00:03:01,800 0.14, I'm not sure if it'll let me create one. 60 00:03:15,640 --> 00:03:17,160 So this is just an example 61 00:03:17,160 --> 00:03:18,773 of creating a release. 62 00:03:21,320 --> 00:03:25,610 And we'll publish that, and let's see if it shows up here, 63 00:03:33,230 --> 00:03:34,063 and so there we go. 64 00:03:34,063 --> 00:03:35,040 So now there's a new version. 65 00:03:35,040 --> 00:03:36,390 We didn't make any changes, 66 00:03:37,289 --> 00:03:39,140 but that's how that's managed. 67 00:03:39,140 --> 00:03:42,010 It's managed using GitHub Releases. 68 00:03:42,010 --> 00:03:43,110 It won't show up here at all 69 00:03:43,110 --> 00:03:45,323 until you create at least one release.