Skip to content

Conversation

@kirillmakhonin
Copy link

This closes #502 and adds ability to provide ID of volumes at the time of server creation.

@kirillmakhonin
Copy link
Author

@jooola please review

Copy link
Member

@apricote apricote left a comment

Choose a reason for hiding this comment

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

Please also add the new field to our documentation and add an end-to-end test for this field.

Elem: &schema.Schema{
Type: schema.TypeString,
},
ForceNew: true,
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why this forces a new resource? It is possible to attach or detach volumes when the server already exists.

If this is because some of the usecases would benefit from this, ie. provisioning with cloud-init that needs to re-run if the volumes change, then this should be in the hands of the user, and not forced by the provider. There is an open TF issue for this: hashicorp/terraform#27456 Not sure if its possible to reference the resources own fields in the existing lifecycle.replace_triggered_by field.

@kirillmakhonin
Copy link
Author

@apricote thank you for feedback
Yes, main goal of this PR is to allow creation of servers with volumes mounted at the first boot time so cloud-init has access to volumes.
I've updated this PR to address your comments, but only I'm not sure how to address comment with testing - was not able to find any documentation regarding creation of tests. Is it something you can help with? I believe it is only one blocker to add this feature which people (including me) are waiting to be able to use Hetzner Cloud for more advanced use cases with IaaC

@github-actions
Copy link

This PR has been marked as stale because it has not had recent activity. The bot will close the PR if no further action occurs.

@github-actions github-actions bot added the stale label Jul 14, 2025
@github-actions github-actions bot closed this Aug 14, 2025
@jooola jooola removed the stale label Aug 14, 2025
@jooola jooola reopened this Aug 14, 2025
@jooola
Copy link
Member

jooola commented Aug 14, 2025

Sorry, we haven't had time to give a proper review. Reopening the PR to make sure we come back to it.

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.

[Feature]: Allow creation of server with volume(s)

3 participants