mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-10-01 16:21:06 +00:00
Be more specific on the regexp used to detect URI
This commit is contained in:
parent
b1e96506e0
commit
acc0e9590a
@ -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