Skip to content

Commit acb7c70

Browse files
authored
openstack_images_image_v2: Update image settings (terraform-provider-openstack#1341)
1 parent af085fe commit acb7c70

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

‎openstack/resource_openstack_images_image_v2.go‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,12 +411,30 @@ func resourceImagesImageV2Update(ctx context.Context, d *schema.ResourceData, me
411411
updateOpts = append(updateOpts, v)
412412
}
413413

414+
if d.HasChange("protected") {
415+
protected := d.Get("protected").(bool)
416+
v := images.ReplaceImageProtected{NewProtected: protected}
417+
updateOpts = append(updateOpts, v)
418+
}
419+
414420
if d.HasChange("hidden") {
415421
hidden := d.Get("hidden").(bool)
416422
v := images.ReplaceImageHidden{NewHidden: hidden}
417423
updateOpts = append(updateOpts, v)
418424
}
419425

426+
if d.HasChange("min_disk_gb") {
427+
minDiskGb := d.Get("min_disk_gb").(int)
428+
v := images.ReplaceImageMinDisk{NewMinDisk: minDiskGb}
429+
updateOpts = append(updateOpts, v)
430+
}
431+
432+
if d.HasChange("min_ram_mb") {
433+
minRAMMb := d.Get("min_ram_mb").(int)
434+
v := images.ReplaceImageMinRam{NewMinRam: minRAMMb}
435+
updateOpts = append(updateOpts, v)
436+
}
437+
420438
if d.HasChange("name") {
421439
v := images.ReplaceImageName{NewName: d.Get("name").(string)}
422440
updateOpts = append(updateOpts, v)

0 commit comments

Comments
 (0)