Skip to content

Commit

Permalink
fix image to be empty
Browse files Browse the repository at this point in the history
  • Loading branch information
karolgorc committed Feb 4, 2025
1 parent 72cd8e4 commit 9dc099c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,7 @@ func TestAccComputeDisk_sourceStorageObject(t *testing.T) {

context := map[string]interface{}{
"random_suffix": acctest.RandString(t, 10),
"source_storage_object": "",
"source_storage_object": "test-fixtures/empty-image.tar.gz",
}

var disk compute.Disk
Expand Down Expand Up @@ -2061,12 +2061,20 @@ resource "google_storage_bucket" "bucket" {
location = "US"
}

resource "google_storage_bucket_object" "object" {
name = "tf-test-object-%{random_suffix}.tar.gz"
bucket = google_storage_bucket.bucket.name
source = "%{source_storage_object}"
}

resource "google_compute_disk" "foobar" {
name = "tf-test-disk-%{random_suffix}"
type = "pd-ssd"
size = 10
zone = "us-central1-a"
source_storage_object = "%{source_storage_object}"
source_storage_object = "gs://${google_storage_bucket.bucket.name}/${google_storage_bucket_object.object.name}"

depends_on = [google_storage_bucket_object.object]
}
`, context)
}
Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 9dc099c

Please sign in to comment.