Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove references to deleted compute images in multiple tests #8508

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/12062.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
170 changes: 140 additions & 30 deletions google-beta/services/compute/iam_compute_image_generated_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,23 @@ func TestAccComputeImageIamPolicyGenerated_withCondition(t *testing.T) {

func testAccComputeImageIamMember_basicGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

resource "google_compute_image_iam_member" "foo" {
Expand All @@ -349,12 +360,23 @@ resource "google_compute_image_iam_member" "foo" {

func testAccComputeImageIamPolicy_basicGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

data "google_iam_policy" "foo" {
Expand Down Expand Up @@ -382,12 +404,23 @@ data "google_compute_image_iam_policy" "foo" {

func testAccComputeImageIamPolicy_emptyBinding(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

data "google_iam_policy" "foo" {
Expand All @@ -403,12 +436,23 @@ resource "google_compute_image_iam_policy" "foo" {

func testAccComputeImageIamBinding_basicGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

resource "google_compute_image_iam_binding" "foo" {
Expand All @@ -422,12 +466,23 @@ resource "google_compute_image_iam_binding" "foo" {

func testAccComputeImageIamBinding_updateGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

resource "google_compute_image_iam_binding" "foo" {
Expand All @@ -441,12 +496,23 @@ resource "google_compute_image_iam_binding" "foo" {

func testAccComputeImageIamBinding_withConditionGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

resource "google_compute_image_iam_binding" "foo" {
Expand All @@ -465,12 +531,23 @@ resource "google_compute_image_iam_binding" "foo" {

func testAccComputeImageIamBinding_withAndWithoutConditionGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

resource "google_compute_image_iam_binding" "foo" {
Expand Down Expand Up @@ -509,12 +586,23 @@ resource "google_compute_image_iam_binding" "foo3" {

func testAccComputeImageIamMember_withConditionGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

resource "google_compute_image_iam_member" "foo" {
Expand All @@ -533,12 +621,23 @@ resource "google_compute_image_iam_member" "foo" {

func testAccComputeImageIamMember_withAndWithoutConditionGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

resource "google_compute_image_iam_member" "foo" {
Expand Down Expand Up @@ -577,12 +676,23 @@ resource "google_compute_image_iam_member" "foo3" {

func testAccComputeImageIamPolicy_withConditionGenerated(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}

data "google_iam_policy" "foo" {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,23 @@ func TestAccComputeImage_imageBasicExample(t *testing.T) {

func testAccComputeImage_imageBasicExample(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
}
`, context)
}
Expand Down Expand Up @@ -94,19 +105,42 @@ func TestAccComputeImage_imageGuestOsExample(t *testing.T) {

func testAccComputeImage_imageGuestOsExample(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
source_disk = google_compute_disk.persistent.id

guest_os_features {
type = "UEFI_COMPATIBLE"
}

guest_os_features {
type = "VIRTIO_SCSI_MULTIQUEUE"
}

guest_os_features {
type = "GVNIC"
}

guest_os_features {
type = "SECURE_BOOT"
type = "SEV_CAPABLE"
}

guest_os_features {
type = "MULTI_IP_SUBNET"
type = "SEV_LIVE_MIGRATABLE_V2"
}
}
`, context)
Expand Down Expand Up @@ -139,12 +173,23 @@ func TestAccComputeImage_imageBasicStorageLocationExample(t *testing.T) {

func testAccComputeImage_imageBasicStorageLocationExample(context map[string]interface{}) string {
return acctest.Nprintf(`
data "google_compute_image" "debian" {
family = "debian-12"
project = "debian-cloud"
}

resource "google_compute_disk" "persistent" {
name = "tf-test-example-disk%{random_suffix}"
image = data.google_compute_image.debian.self_link
size = 10
type = "pd-ssd"
zone = "us-central1-a"
}

resource "google_compute_image" "example" {
name = "tf-test-example-sl-image%{random_suffix}"

raw_disk {
source = "https://storage.googleapis.com/bosh-gce-raw-stemcells/bosh-stemcell-97.98-google-kvm-ubuntu-xenial-go_agent-raw-1557960142.tar.gz"
}
source_disk = google_compute_disk.persistent.id
storage_locations = ["us-central1"]
}
`, context)
Expand Down
Loading