Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add Hetzner Cloud server template#426

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
melmathari wants to merge21 commits intocoder:main
base:main
Choose a base branch
Loading
frommelmathari:209

Conversation

melmathari
Copy link

@melmatharimelmathari commentedSep 18, 2025
edited
Loading

Closes#209

Description

Create Terraform template for Hetzner Cloud servers with networking and volumes

Type of Change

  • New module
  • Bug fix
  • Feature/enhancement
  • Documentation
  • Other

Testing & Validation

  • Tests pass (bun test)
  • Code formatted (bun run fmt)
  • Changes tested locally

/claim#209

# Directorycd registry/melmathari/templates/hetzner-cloud/# Initializeterraform init# Validateterraform validate# Plan (see what will be created)terraform plan# Apply - This will create real resources and cost moneyterraform apply# Destroy everythingterraform destroy
# Hetzner Cloud API Token - REPLACE WITH YOUR ACTUAL TOKEN# Get your token from: https://console.hetzner.cloud/ -> Projects -> Security -> API Tokens# IMPORTANT: Keep this token secure and never commit it to version controlhcloud_token = "TOKEN_GOES_HERE"# Optional: Override default parameter values for local testing# server_type     = "cx22"# server_image    = "ubuntu-22.04"# server_location = "fsn1"# volume_size     = 20# Optional: SSH key ID if you want SSH access# ssh_key_id = "YOUR_SSH_KEY"

Files & Resources

plan.debug
.terraform.lock.zip

Video

Please note in the video the memory size of certain servers was not set properly. I have updated this in the last version.

chrome_bL0ejpcoui.mp4
image

Copy link
Contributor

@CopilotCopilotAI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Pull Request Overview

This PR adds a comprehensive Hetzner Cloud server template for Coder workspaces that supports dynamic server configuration, persistent storage, and networking.

  • Implements dynamic server configuration through JSON metadata for server types, locations, and images
  • Provides server type/location validation to prevent invalid resource combinations
  • Creates persistent volumes for home directories that survive workspace restarts with proper lifecycle management

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
FileDescription
registry/melmathari/templates/hetzner-cloud/main.tfMain Terraform configuration implementing the Hetzner Cloud template with dynamic parameters, validation, and resource provisioning
registry/melmathari/templates/hetzner-cloud/hetzner-config.jsonJSON configuration defining available server types, locations, images, and availability constraints
registry/melmathari/templates/hetzner-cloud/cloud-config.yaml.tftplCloud-init template for server initialization and Coder agent setup
registry/melmathari/templates/hetzner-cloud/README.mdComprehensive documentation covering setup, configuration, troubleshooting, and usage
registry/melmathari/README.mdAuthor profile and bio information
.github/typos.tomlUpdated spell checker configuration to allow Hetzner-specific terms

melmathariand others added8 commitsSeptember 19, 2025 08:49
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@matifali
Copy link
Member

@melmathari, you should be able to runbun fmt to fix all formatting issues.

melmathari reacted with heart emoji

@melmathari
Copy link
Author

melmathari commentedSep 19, 2025
edited
Loading

@matifali I just did, just checked my logs from yesterday I didn't use write, so was under the assumption that it already did so before I committed. Happy to take another look if anything else pops up.

Appreciate your time and feedback.

@melmathari
Copy link
Author

melmathari commentedSep 19, 2025
edited
Loading

@matifali Apologies as i'm new to the project, i accidentally named the folder images instead of .images. Also saw that the other checks now all passed, which is great.

Appreciate your time.

@melmathari
Copy link
Author

@matifali I've addressed the CI issue related to folder name. Thank you for looking at this PR.

@melmathari
Copy link
Author

@matifali should i update my branch or leave it for now?

This branch is out-of-date with the base branchChanges can be cleanly merged.

@matifali
Copy link
Member

@melmathari, please wait for a review and approval.

melmathari reacted with thumbs up emoji

@melmathari
Copy link
Author

@DevelopmentCats Appreciate your time on reviewing this PR. Looking forward to getting this ready.

@DevelopmentCats
Copy link
Contributor

DevelopmentCats commentedOct 1, 2025
edited
Loading

@DevelopmentCats Appreciate your time on reviewing this PR. Looking forward to getting this ready.

Hey I'm going to review this and test it out , but on first pass can you use dynamic parameters, and make it so the available server types shown, are dependent on the location. Since this will fail if you choose a server location that is not available in the location you have chosen. The way you validate it is probably fine but I just wanted to point it out since this makes it feel much smoother.

You can look at this old PR to see how this might be done for hetzner.https://github.com/coder/registry/pull/254/files#diff-2767e2231b494f3744f3ed2d08e2ba3631a62c31937fdb736084779533cacae5

melmathari reacted with eyes emoji

@melmathari
Copy link
Author

melmathari commentedOct 2, 2025
edited
Loading

@DevelopmentCats Done, i also removed some of the deprecated servers and added Singapore to the list.@matifali can you re-run the tests. Thank you guys.

https://www.loom.com/share/03aa572c52b547d6971daf67b439f048?sid=c02c748d-27e0-4f57-88c9-24cb0925ff60

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@matifalimatifalimatifali left review comments

Copilot code reviewCopilotCopilot left review comments

@DevelopmentCatsDevelopmentCatsAwaiting requested review from DevelopmentCats

At least 1 approving review is required to merge this pull request.

Assignees

@melmatharimelmathari

Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Hetzner Cloud server template example
3 participants
@melmathari@matifali@DevelopmentCats

[8]ページ先頭

©2009-2025 Movatter.jp