mirror of
https://github.com/bpg/terraform-provider-proxmox.git
synced 2025-07-02 03:22:59 +00:00
allow using hyphen in storage names
This commit is contained in:
parent
3ccdb7a114
commit
a6a7df7a54
@ -15,6 +15,7 @@ BUG FIXES:
|
|||||||
* resource/virtual_environment_container: Fix VM ID collision when `vm_id` is not specified
|
* resource/virtual_environment_container: Fix VM ID collision when `vm_id` is not specified
|
||||||
* resource/virtual_environment_vm: Fix VM ID collision when `vm_id` is not specified
|
* resource/virtual_environment_vm: Fix VM ID collision when `vm_id` is not specified
|
||||||
* resource/virtual_environment_vm: Fix disk import issue when importing from directory-based datastores
|
* resource/virtual_environment_vm: Fix disk import issue when importing from directory-based datastores
|
||||||
|
* resource/virtual/environment/vm: Fix handling of storage name - correct handling of `-`
|
||||||
|
|
||||||
WORKAROUNDS:
|
WORKAROUNDS:
|
||||||
|
|
||||||
|
@ -1625,7 +1625,7 @@ func resourceVirtualEnvironmentVMCreateCustomDisks(d *schema.ResourceData, m int
|
|||||||
fmt.Sprintf(`file_path="%s"`, filePath),
|
fmt.Sprintf(`file_path="%s"`, filePath),
|
||||||
fmt.Sprintf(`file_path_tmp="%s"`, filePathTmp),
|
fmt.Sprintf(`file_path_tmp="%s"`, filePathTmp),
|
||||||
fmt.Sprintf(`vm_id="%d"`, vmID),
|
fmt.Sprintf(`vm_id="%d"`, vmID),
|
||||||
`getdsi() { local nr='^([A-Za-z0-9_]+): ([A-Za-z0-9_]+)$'; local pr='^[[:space:]]+path[[:space:]]+([^[:space:]]+)$'; local dn=""; local dt=""; while IFS='' read -r l || [[ -n "$l" ]]; do if [[ "$l" =~ $nr ]]; then dt="${BASH_REMATCH[1]}"; dn="${BASH_REMATCH[2]}"; elif [[ "$l" =~ $pr ]] && [[ "$dn" == "$1" ]]; then echo "${BASH_REMATCH[1]};${dt}"; break; fi; done < /etc/pve/storage.cfg; }`,
|
`getdsi() { local nr='^([A-Za-z0-9_-]+): ([A-Za-z0-9_-]+)$'; local pr='^[[:space:]]+path[[:space:]]+([^[:space:]]+)$'; local dn=""; local dt=""; while IFS='' read -r l || [[ -n "$l" ]]; do if [[ "$l" =~ $nr ]]; then dt="${BASH_REMATCH[1]}"; dn="${BASH_REMATCH[2]}"; elif [[ "$l" =~ $pr ]] && [[ "$dn" == "$1" ]]; then echo "${BASH_REMATCH[1]};${dt}"; break; fi; done < /etc/pve/storage.cfg; }`,
|
||||||
`dsi_image="$(getdsi "$datastore_id_image")"`,
|
`dsi_image="$(getdsi "$datastore_id_image")"`,
|
||||||
`dsp_image="$(echo "$dsi_image" | cut -d ";" -f 1)"`,
|
`dsp_image="$(echo "$dsi_image" | cut -d ";" -f 1)"`,
|
||||||
`dst_image="$(echo "$dsi_image" | cut -d ";" -f 2)"`,
|
`dst_image="$(echo "$dsi_image" | cut -d ";" -f 2)"`,
|
||||||
|
Loading…
Reference in New Issue
Block a user