Skip to content

Commit

Permalink
Remove references to deleted compute images in multiple tests (#12062) (
Browse files Browse the repository at this point in the history
#8508)

[upstream:cdd858547166aefcd00e45d209f6b31d63d569dc]

Signed-off-by: Modular Magician <magic-modules@google.com>
  • Loading branch information
modular-magician authored Oct 24, 2024
1 parent d358981 commit e0d1488
Show file tree
Hide file tree
Showing 9 changed files with 372 additions and 143 deletions.
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

0 comments on commit e0d1488

Please sign in to comment.