Skip to content

fix: allow image based deployment without user-data#39

Merged
m-bucher merged 2 commits into
mainfrom
fix_image_based_deployment
May 26, 2026
Merged

fix: allow image based deployment without user-data#39
m-bucher merged 2 commits into
mainfrom
fix_image_based_deployment

Conversation

@m-bucher
Copy link
Copy Markdown
Member

Not perfect but should be sufficient to use image based deployment without user-data images.

@m-bucher m-bucher force-pushed the fix_image_based_deployment branch 2 times, most recently from d026a31 to d4f87f4 Compare April 15, 2026 14:39
@m-bucher m-bucher force-pushed the fix_image_based_deployment branch 2 times, most recently from 516c0be to 8059f84 Compare May 12, 2026 10:02
Comment thread app/lib/foreman_opentofu/concerns/base_template_scope_extensions.rb
@m-bucher m-bucher force-pushed the fix_image_based_deployment branch 2 times, most recently from 417274c to 537912f Compare May 12, 2026 18:35
@m-bucher m-bucher requested a review from Manisha15 May 12, 2026 18:40
@sbernhard
Copy link
Copy Markdown
Member

we should fix the FIXME and TODOs first

Comment thread app/services/foreman_opentofu/tofu_key_pair.rb Outdated
@m-bucher m-bucher force-pushed the fix_image_based_deployment branch 2 times, most recently from 763fa1f to 537f9b0 Compare May 15, 2026 09:19
@m-bucher
Copy link
Copy Markdown
Member Author

Adding Key during host-creations apparently does not work, because it breaks with on the 2nd created host:

09:32:28 rails.1   |  07bf2b05 | Error: API request failed
09:32:28 rails.1   |  07bf2b05 | 
09:32:28 rails.1   |  07bf2b05 |   with hcloud_ssh_key.deploy_key,
09:32:28 rails.1   |  07bf2b05 |   on main.tf line 24, in resource "hcloud_ssh_key" "deploy_key":
09:32:28 rails.1   |  07bf2b05 |   24: resource "hcloud_ssh_key" "deploy_key" {
09:32:28 rails.1   |  07bf2b05 | 
09:32:28 rails.1   |  07bf2b05 | An unexpected error was encountered during an API request.
09:32:28 rails.1   |  07bf2b05 | 
09:32:28 rails.1   |  07bf2b05 | SSH key not unique (uniqueness_error, 26c9f22aa91213688512d1c4f2f64f28)
09:32:28 rails.1   |  07bf2b05 | 
09:32:28 rails.1   |  07bf2b05 | Error code: uniqueness_error
09:32:28 rails.1   |  07bf2b05 | Status code: 409
09:32:28 rails.1   |  07bf2b05 | 
09:32:28 rails.1   |  07bf2b05 | )

m-bucher added 2 commits May 22, 2026 10:35
This is required to allow SSH-Provisioning for image-deployment.
@m-bucher m-bucher force-pushed the fix_image_based_deployment branch from c576b35 to abbf573 Compare May 22, 2026 08:38
@m-bucher m-bucher merged commit 88aa78f into main May 26, 2026
7 checks passed
@m-bucher m-bucher deleted the fix_image_based_deployment branch May 26, 2026 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants