-
-
Notifications
You must be signed in to change notification settings - Fork 153
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
feat(vm): add full support for custom cloud-init disks #1167
base: main
Are you sure you want to change the base?
feat(vm): add full support for custom cloud-init disks #1167
Conversation
5486b49
to
c6e694c
Compare
Signed-off-by: hrmny <[email protected]>
c6e694c
to
a45915d
Compare
Hi @ForsakenHarmony 👋🏼 Thank you for the PR! It's nice to simplify and cleanup the cloud-init handling.
Also, this trivial acceptance test fails (with a different error tho) func TestAccResourceVMCloudInit(t *testing.T) {
t.Parallel()
providerConfig := getProviderConfig(t)
tests := []struct {
name string
steps []resource.TestStep
}{
{"clone template", []resource.TestStep{
{
Config: providerConfig + `
resource "proxmox_virtual_environment_vm" "test_cloudinit1_template" {
node_name = "pve"
started = false
name = "test-cloudinit1-template"
template = "true"
initialization {
datastore_id = "local-lvm"
interface = "scsi4"
ip_config {
ipv4 {
address = "dhcp"
}
}
}
}
resource "proxmox_virtual_environment_vm" "test_cloudinit1" {
node_name = "pve"
started = false
name = "test-cloudinit1"
clone {
vm_id = proxmox_virtual_environment_vm.test_cloudinit1_template.id
}
initialization {
datastore_id = "local-lvm"
interface = "scsi4"
dns {
servers = ["1.1.1.1"]
}
ip_config {
ipv4 {
address = "dhcp"
}
}
}
}
`,
Check: resource.ComposeTestCheckFunc(
//TODO: check if the dns servers are set
),
},
{
RefreshState: true,
Destroy: false,
},
}},
}
accProviders := testAccMuxProviders(context.Background(), t)
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
ProtoV6ProviderFactories: accProviders,
Steps: tt.steps,
})
})
}
} Would you please take a look? |
Marking this pull request as stale due to inactivity in the past 180 days. This helps us focus on the active pull requests. If this pull request receives no comments in the next 30 days it will automatically be closed. If this pull request was automatically closed and you feel this pull request should be reopened, we encourage creating a new pull request linking back to this one for added context. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
Sorry, I can't find the time right now to go over this PR again, I might at some point in the future |
Contributor's Note
/docs
for any user-facing features or additions./example
for any new or updated resources / data sources.make example
to verify that the change works as expected.Proof of Work
Have already used this in production, but I need to test the additional changes I made for this PR.
Community Note