Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow customizing the source string generated in the wiki #136

Closed
LiamBull opened this issue Jan 23, 2025 · 5 comments · Fixed by #146
Closed

Allow customizing the source string generated in the wiki #136

LiamBull opened this issue Jan 23, 2025 · 5 comments · Fixed by #146
Assignees

Comments

@LiamBull
Copy link

LiamBull commented Jan 23, 2025

It would be great to be able to change the format of the source generated in the wiki to use the typical SSH format.

eg: git@github.com:techpivot/terraform-module-releaser.git rather than git::https://github.com/techpivot/terraform-module-releaser.git

I am about to submit a PR that adds a quick and dirty implementation, just to give an idea. I am not a TypeScript guy or overly familiar with the codebase so this isn't meant to be an all encompassing thing, but hopefully a good place to start if you agree with this issue.

PR: #137

@virgofx
Copy link
Member

virgofx commented Jan 23, 2025

Hi @LiamBull Great suggestion and I think it makes perfect sense. I just quickly browsed the PR and it's pretty close to what I'd do. I believe the only other thing I would do is add some testing for it to test both sides as I was able to get 100% test coverage. I'm happy to merge yours (unreleased) and then add the tests on top if that works? Alternatively, if you wanted to try and get some tests working I'm happy to let you drive this effort?

Edit: Appears I may have a token issue in the latest CI somewhere so I'll need to work on a few things somewhere first!

@LiamBull
Copy link
Author

I'm happy to merge yours (unreleased) and then add the tests on top if that works?

By all means, go for it. If you haven't gotten to it by next week, I should have some time to tackle it.

Appears I may have a token issue in the latest CI somewhere so I'll need to work on a few things somewhere first!

I'll wait until you reply here that you've fixed the CI before I do anything.

Greatly appreciate the quick response @virgofx!

@virgofx virgofx self-assigned this Feb 7, 2025
@virgofx
Copy link
Member

virgofx commented Feb 7, 2025

Hi @LiamBull - I'm putting together a PR for this now. My only question is I believe the correct SSH format would be:

git::ssh://git@github.com/techpivot/terraform-module-releaser.git

According to my research and docs we always want to specify that the git:: prefix as this is a specific protocol indicator that Terraform uses to identify that it should fetch the module using Git, regardless of whether you're using HTTPS or SSH authentication.

Then the correct format next is ssh://

Just want to make sure that works for you?

Reference: https://developer.hashicorp.com/terraform/language/modules/sources#generic-git-repository

Pull Request: #146

@virgofx
Copy link
Member

virgofx commented Feb 9, 2025

Hi @LiamBull - An updated version contains the flag to enable this.

See release notes for 1.4.0. If you have the action pinned at v1 you're also getting the latest so just add the new parameter. Let me know how that works for you.

https://github.com/techpivot/terraform-module-releaser/releases/tag/v1.4.0

Bugfix so best to use > 1.4.1 also (or simply the latest v1)

@LiamBull
Copy link
Author

Hey, awesome! Thank you very much. I didn't know about Terraform's custom syntax, but yep if that's the pattern they want that works for me.

Thanks again for getting this in!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants