terra-farm / meta

Conversation about the terraform provider & modules maintainer community
3 stars 0 forks source link

Provide modules? #15

Open damacus opened 6 years ago

damacus commented 6 years ago

Do we also want to support/host modules in this organisation?

ringods commented 6 years ago

I would be in favor of this: joined maintenance of common modules, also published in the Hashicorp Terraform registry

rowleyaj commented 6 years ago

@damacus @ringods I agree. Modules on here as well as providers, and publish to the registry as well.

damacus commented 6 years ago

I have a good number of modules kicking around, and it'd be good to get some more eyes on them!

On Wed, 7 Mar 2018 at 23:51 Alex Rowley notifications@github.com wrote:

@damacus https://github.com/damacus @ringods https://github.com/ringods I agree. Modules on here as well as providers, and publish to the registry as well.

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/terra-farm/meta/issues/15#issuecomment-371327232, or mute the thread https://github.com/notifications/unsubscribe-auth/AACfUgrJ07I_iqiq1Dc32No0Khuzj61fks5tcHJpgaJpZM4Se1ir .

rowleyaj commented 6 years ago

Do either of you know how to use an organisation name to publish modules to the registry? It seems possible as some of the modules there do it, but I can't see any obvious way to set it up.

rowleyaj commented 6 years ago

@damacus I use some good modules originally created by @kwilczynski over in https://github.com/kwilczynski/terraform-templates

It might be worth discussing if it is possible to bring those to terra-farm?

ringods commented 6 years ago

@rowleyaj I read the Terraform Registry docs on how to publish a module. In there, I found this:

The upload page will list your available repositories, filtered to those that match the naming convention described above.

So if the access to the organization and teams is correctly in place, I suspect that a module maintainer or admin should be able to publish a module via his own Github user.

josephholsten commented 6 years ago

@ringods I approved the github access request from the registry. Please do let us know how things go and if you need anything from me.

Also, we should probably get at least one other person set up to respond to github access requests &c

rowleyaj commented 6 years ago

I wrote this last night but didn't hit "Comment" 🤦‍♂️: I can do it under my personal name, it even incorrectly detects my fork of the aws provider. I more meant how would be publish it under the terra-farm organisation name, so that it wasn't linked to a specific person.

It must be possible as it has been done for terraform-aws-modules: https://github.com/terraform-aws-modules/

--

Seems like the piece I was missing was the org access request, although I did have an email saying it had been automatically approved since I had given it access under my username, and was an owner on this org too. The fact I got those probably meets the requirements you mention for other people to respond to GitHub access requests @josephholsten.

I've confirmed that I can publish modules from the terra-farm org now, so we should be good to publish any we migrate over to this org.

rowleyaj commented 6 years ago

I've spoken with @kwilczynski about the modules over at https://github.com/kwilczynski/terraform-templates and he's happy to contribute those to terra-farm and he will be continuing to work on them too.

I propose we move the repo as is first, and then work to have them as registry published modules over time.

The publishing would pose another question as to if they would need splitting into their own repos or kept together and referenced directly. The docs seem to imply the current structure would work for publishing, but I'm not sure if that only gives one module on the registry rather than them all individually. I think both the puppet forge and chef supermarket require single module per repo, it wouldn't surprise me if the terraform registry was the same.

@damacus does this meet what you had in mind? @josephholsten @ringods any further thoughts?

ringods commented 6 years ago

@rowleyaj I suggest to split up the repositories into multiple ones, but not necessarily mapped to one module per repo. A quick look at the registry docs gives you an idea why I suggest that:

https://www.terraform.io/docs/registry/modules/publish.html#requirements

The registry scans your variables.tf and outputs.tf, as well as the README to show what a module offers. Nested modules are supported, but I would prefer only to have nested modules when they are related to the main module.

In the case of @kwilczynski modules, not all of the modules in the modules folder are related to one another. vpc as a main module, with vpc-peering and vpc-gateway could be a single repo, with it's own versioning, etc. But e.g. the s3-bucket module should not be part of that. :-)

rowleyaj commented 6 years ago

Do you agree its worth moving it as one repo to start with though, then working to split those out as we determine how best to publish them to the registry?

damacus commented 6 years ago

I've created a couple of modules in the last week.

Repos for each module works pretty well. I'll try and get auto publishing turned on too (possibly gated publish on CircleCI)

ringods commented 6 years ago

@damacus any info on such gated publishing would be very helpful to put on the to-come terra-farm website. Keep that info coming. 😃

ringods commented 6 years ago

@damacus is there anything blocking you to migrate this to this github org? If you are missing access of some sort, just let me know.