Be more specific on the regexp used to detect URI

This commit is contained in:
Thomas Poindessous 2017-02-27 14:26:00 +01:00
parent b1e96506e0
commit acc0e9590a

View File

@ -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 {