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 {
|
if v, ok := d.GetOk("snapshot"); ok {
|
||||||
snapshotName := v.(string)
|
snapshotName := v.(string)
|
||||||
match, _ := regexp.MatchString("^http", snapshotName)
|
match, _ := regexp.MatchString("^https://www.googleapis.com/compute", snapshotName)
|
||||||
if match {
|
if match {
|
||||||
disk.SourceSnapshot = snapshotName
|
disk.SourceSnapshot = snapshotName
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue