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 e510289d2b
commit deb9dae35c
1 changed files with 1 additions and 1 deletions

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 {