terraform-google-modules / terraform-google-vm

Provisions VMs in Google Cloud
https://registry.terraform.io/modules/terraform-google-modules/vm/google
Apache License 2.0
220 stars 368 forks source link

feat: Update instance template var.additional_disks to include all fields being passed to API #399

Closed tpdownes closed 4 months ago

tpdownes commented 4 months ago

This PR resolves #391 as I ran into a similar issue. This PR improves upon #392 by supporting all fields being set in the local.all_disks object. I have chosen to default to null for nearly every field to maintain backwards compatibility. I have added a couple exceptions where I think we can reasonably express an opinion, although I think a review/discussion is warranted.

Underlying issue: I read the main.tf code, and supplied source as a parameter to additional_disks and spent a couple hours debugging until I realized that Terraform was silently ingoring the extra field.

bharathkkb commented 4 months ago

not marking as breaking as this already needed 1.3 due to https://github.com/terraform-google-modules/terraform-google-vm/blob/39a44e55f32102439720971a3b5db1e6559ea722/modules/instance_template/variables.tf#L189