mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Be more specific on the regexp used to detect URI
This commit is contained in:
parent
e510289d2b
commit
deb9dae35c
@ -130,7 +130,7 @@ func resourceComputeDiskCreate(d *schema.ResourceData, meta interface{}) error {
|
||||
|
||||
if v, ok := d.GetOk("snapshot"); ok {
|
||||
snapshotName := v.(string)
|
||||
match, _ := regexp.MatchString("^http", snapshotName)
|
||||
match, _ := regexp.MatchString("^https://www.googleapis.com/compute", snapshotName)
|
||||
if match {
|
||||
disk.SourceSnapshot = snapshotName
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user