ionos-cloud / terraform-provider-ionoscloud

The IonosCloud Terraform provider gives the ability to deploy and configure resources using the IonosCloud APIs.
Mozilla Public License 2.0
35 stars 24 forks source link

"boot_cdrom": this field cannot be set #22

Closed larsen0815 closed 3 years ago

larsen0815 commented 3 years ago

Description

It seems impossible to add a CD-ROM drive.

I couldn't find anything in the documentation about how to add a CD-ROM drive containing a Clonezilla image. Therefore, I manually changed this via DCD and ran "terraform plan" afterwards:

  # ionoscloud_server.Texas has been changed
  ~ resource "ionoscloud_server" "Texas" {
      + boot_cdrom        = "83f21679-3321-11eb-a681-1e659523cb7b"

I then added this line to my main.tf:

resource "ionoscloud_server" "Texas" {
  boot_cdrom        = "83f21679-3321-11eb-a681-1e659523cb7b"
...

But couldn't apply it:

╷
│ Error: "boot_cdrom": this field cannot be set
│
│   with ionoscloud_server.Texas,
│   on main.tf line 32, in resource "ionoscloud_server" "Texas":
│   32: resource "ionoscloud_server" "Texas" {
│
╵

Expected behavior

It should be possible to add a CD-ROM.

Environment

Terraform version:

Terraform v1.0.0
on linux_amd64

Provider version:

+ provider registry.terraform.io/ionos-cloud/ionoscloud v5.1.6

OS:

Debian GNU/Linux 10 (buster)
mflorin commented 3 years ago

Hello @larsen0815 ,

I've just released v5.1.7 which should fix your issue. However, please beware a limitation of the current implementation which prevents you from removing the boot_cdrom attribute once set (see issue #23). We're still figuring out a fix for this.

Let me know if v5.1.7 works for you.

larsen0815 commented 3 years ago

Thx, works as expected now!