You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I changed in my terraform code the "type" from a RW volume to a DP volume. I expected that the terraform should destroy the volume and recreate it. Instead it said it would "update in-place"
Actual Behavior
When trying to update in-place, it failed as you cannot modify a RW volume to DP directly. It gave ONTAP API 400 errors.
`Terraform will perform the following actions:
netapp-ontap_storage_volume_resource.volloop["cifs_share"] will be updated in-place
~ resource "netapp-ontap_storage_volume_resource" "volloop" {
~ analytics = {
~ state = "off" -> (known after apply)
} -> (known after apply)
~ comment = null -> (known after apply)
~ efficiency = {
~ compression = "inline" -> (known after apply)
~ policy_name = "auto" -> (known after apply)
} -> (known after apply)
~ encryption = false -> (known after apply)
id = "ced2bde9-8cab-11ef-8100-fd3c3ad661ce"
~ language = "c.utf_8" -> (known after apply)
name = "cifs_share"
~ nas = {
~ group_id = 0 -> (known after apply)
~ unix_permissions = 755 -> (known after apply)
~ user_id = 0 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ qos_policy_group = null -> (known after apply)
~ snaplock = {
~ type = "non_snaplock" -> (known after apply)
} -> (known after apply)
~ space = {
~ percent_snapshot_space = 5 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ state = "online" -> (known after apply)
~ tiering = {
~ minimum_cooling_days = 31 -> (known after apply)
# (1 unchanged attribute hidden)
}
~ type = "rw" -> "DP"
# (5 unchanged attributes hidden)
}
netapp-ontap_storage_volume_resource.volloop["rvwn_from_bxp"] will be updated in-place
~ resource "netapp-ontap_storage_volume_resource" "volloop" {
~ analytics = {
~ state = "off" -> (known after apply)
} -> (known after apply)
~ comment = null -> (known after apply)
~ efficiency = {
~ compression = "inline" -> (known after apply)
~ policy_name = "auto" -> (known after apply)
} -> (known after apply)
~ encryption = false -> (known after apply)
id = "ced2b872-8cab-11ef-8100-fd3c3ad661ce"
~ language = "c.utf_8" -> (known after apply)
name = "rvwn_from_bxp"
~ nas = {
~ group_id = 0 -> (known after apply)
~ unix_permissions = 755 -> (known after apply)
~ user_id = 0 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ qos_policy_group = null -> (known after apply)
~ snaplock = {
~ type = "non_snaplock" -> (known after apply)
} -> (known after apply)
~ space = {
~ percent_snapshot_space = 5 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ state = "online" -> (known after apply)
~ tiering = {
~ minimum_cooling_days = 31 -> (known after apply)
# (1 unchanged attribute hidden)
}
~ type = "rw" -> "DP"
# (5 unchanged attributes hidden)
}
netapp-ontap_storage_volume_resource.volloop["unix"] will be updated in-place
~ resource "netapp-ontap_storage_volume_resource" "volloop" {
~ analytics = {
~ state = "off" -> (known after apply)
} -> (known after apply)
~ comment = null -> (known after apply)
~ efficiency = {
~ compression = "inline" -> (known after apply)
~ policy_name = "auto" -> (known after apply)
} -> (known after apply)
~ encryption = false -> (known after apply)
id = "ced3dc1c-8cab-11ef-8850-2b70aca4968a"
~ language = "c.utf_8" -> (known after apply)
name = "unix"
~ nas = {
~ group_id = 0 -> (known after apply)
~ unix_permissions = 755 -> (known after apply)
~ user_id = 0 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ qos_policy_group = null -> (known after apply)
~ snaplock = {
~ type = "non_snaplock" -> (known after apply)
} -> (known after apply)
~ space = {
~ percent_snapshot_space = 5 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ state = "online" -> (known after apply)
~ tiering = {
~ minimum_cooling_days = 31 -> (known after apply)
# (1 unchanged attribute hidden)
}
~ type = "rw" -> "DP"
# (5 unchanged attributes hidden)
}
Plan: 0 to add, 3 to change, 0 to destroy.
`
Relevant Error/Panic Output Snippet
netapp-ontap_storage_volume_resource.volloop["cifs_share"]: Modifying... [id=ced2bde9-8cab-11ef-8100-fd3c3ad661ce]
netapp-ontap_storage_volume_resource.volloop["rvwn_from_bxp"]: Modifying... [id=ced2b872-8cab-11ef-8100-fd3c3ad661ce]
netapp-ontap_storage_volume_resource.volloop["unix"]: Modifying... [id=ced3dc1c-8cab-11ef-8850-2b70aca4968a]
╷
│ Error: error updating volume
│
│ with netapp-ontap_storage_volume_resource.volloop["rvwn_from_bxp"],
│ on main.tf line 98, in resource "netapp-ontap_storage_volume_resource""volloop":
│ 98: resource "netapp-ontap_storage_volume_resource""volloop" {
│
│ error on POST storage/volumes: REST reported error restclient.RestError{Code:"262196", Message:"Field \"type\" cannot│ be set in this operation", Target:"type"}, statusCode: 400, statusCode 400
╵
╷
│ Error: error updating volume
│
│ with netapp-ontap_storage_volume_resource.volloop["cifs_share"],
│ on main.tf line 98, in resource "netapp-ontap_storage_volume_resource""volloop":
│ 98: resource "netapp-ontap_storage_volume_resource""volloop" {
│
│ error on POST storage/volumes: REST reported error restclient.RestError{Code:"262196", Message:"Field \"type\" cannot│ be set in this operation", Target:"type"}, statusCode: 400, statusCode 400
╵
╷
│ Error: error updating volume
│
│ with netapp-ontap_storage_volume_resource.volloop["unix"],
│ on main.tf line 98, in resource "netapp-ontap_storage_volume_resource""volloop":
│ 98: resource "netapp-ontap_storage_volume_resource""volloop" {
│
│ error on POST storage/volumes: REST reported error restclient.RestError{Code:"262196", Message:"Field \"type\" cannot│ be set in this operation", Target:"type"}, statusCode: 400, statusCode 400
Terraform Core Version
1.9.6
ONTAP Provider Version
1.1.4
Affected Resource(s)
netapp-ontap_storage_volume_resource
Expected Behavior
I changed in my terraform code the "type" from a RW volume to a DP volume. I expected that the terraform should destroy the volume and recreate it. Instead it said it would "update in-place"
Actual Behavior
When trying to update in-place, it failed as you cannot modify a RW volume to DP directly. It gave ONTAP API 400 errors.
`Terraform will perform the following actions:
netapp-ontap_storage_volume_resource.volloop["cifs_share"] will be updated in-place
~ resource "netapp-ontap_storage_volume_resource" "volloop" {
~ analytics = {
~ state = "off" -> (known after apply)
} -> (known after apply)
~ comment = null -> (known after apply)
~ efficiency = {
~ compression = "inline" -> (known after apply)
~ policy_name = "auto" -> (known after apply)
} -> (known after apply)
~ encryption = false -> (known after apply)
id = "ced2bde9-8cab-11ef-8100-fd3c3ad661ce"
~ language = "c.utf_8" -> (known after apply)
name = "cifs_share"
~ nas = {
~ group_id = 0 -> (known after apply)
~ unix_permissions = 755 -> (known after apply)
~ user_id = 0 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ qos_policy_group = null -> (known after apply)
~ snaplock = {
~ type = "non_snaplock" -> (known after apply)
} -> (known after apply)
~ space = {
~ percent_snapshot_space = 5 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ state = "online" -> (known after apply)
~ tiering = {
~ minimum_cooling_days = 31 -> (known after apply)
# (1 unchanged attribute hidden)
}
~ type = "rw" -> "DP"
# (5 unchanged attributes hidden)
}
netapp-ontap_storage_volume_resource.volloop["rvwn_from_bxp"] will be updated in-place
~ resource "netapp-ontap_storage_volume_resource" "volloop" {
~ analytics = {
~ state = "off" -> (known after apply)
} -> (known after apply)
~ comment = null -> (known after apply)
~ efficiency = {
~ compression = "inline" -> (known after apply)
~ policy_name = "auto" -> (known after apply)
} -> (known after apply)
~ encryption = false -> (known after apply)
id = "ced2b872-8cab-11ef-8100-fd3c3ad661ce"
~ language = "c.utf_8" -> (known after apply)
name = "rvwn_from_bxp"
~ nas = {
~ group_id = 0 -> (known after apply)
~ unix_permissions = 755 -> (known after apply)
~ user_id = 0 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ qos_policy_group = null -> (known after apply)
~ snaplock = {
~ type = "non_snaplock" -> (known after apply)
} -> (known after apply)
~ space = {
~ percent_snapshot_space = 5 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ state = "online" -> (known after apply)
~ tiering = {
~ minimum_cooling_days = 31 -> (known after apply)
# (1 unchanged attribute hidden)
}
~ type = "rw" -> "DP"
# (5 unchanged attributes hidden)
}
netapp-ontap_storage_volume_resource.volloop["unix"] will be updated in-place
~ resource "netapp-ontap_storage_volume_resource" "volloop" {
~ analytics = {
~ state = "off" -> (known after apply)
} -> (known after apply)
~ comment = null -> (known after apply)
~ efficiency = {
~ compression = "inline" -> (known after apply)
~ policy_name = "auto" -> (known after apply)
} -> (known after apply)
~ encryption = false -> (known after apply)
id = "ced3dc1c-8cab-11ef-8850-2b70aca4968a"
~ language = "c.utf_8" -> (known after apply)
name = "unix"
~ nas = {
~ group_id = 0 -> (known after apply)
~ unix_permissions = 755 -> (known after apply)
~ user_id = 0 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ qos_policy_group = null -> (known after apply)
~ snaplock = {
~ type = "non_snaplock" -> (known after apply)
} -> (known after apply)
~ space = {
~ percent_snapshot_space = 5 -> (known after apply)
# (3 unchanged attributes hidden)
}
~ state = "online" -> (known after apply)
~ tiering = {
~ minimum_cooling_days = 31 -> (known after apply)
# (1 unchanged attribute hidden)
}
~ type = "rw" -> "DP"
# (5 unchanged attributes hidden)
}
Plan: 0 to add, 3 to change, 0 to destroy.
`
Relevant Error/Panic Output Snippet
Terraform Configuration Files
resource "netapp-ontap_storage_volume_resource" "volloop" {
for_each = data.netapp-ontap_storage_volume_data_source.my_vol
cx_profile_name = "dr_clus"
name = "${each.value.name}_dp"
type = "RW"
svm_name = aws_fsx_ontap_storage_virtual_machine.mysvm.name
aggregates = [
{
name = "aggr1"
},
]
space_guarantee = "none"
space = {
size = each.value.space.size
size_unit = each.value.space.size_unit
logical_space = {
enforcement = true
reporting = true
}
}
tiering = {
policy_name = "all"
}
nas = {
export_policy_name = "default"
security_style = "unix"
# junction_path = join("", ["/",each.value.name])
}
}
Steps to Reproduce
deploy with 'RW' volume type and then switch to "DP" and apply again.
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None
The text was updated successfully, but these errors were encountered: