From 02be488638ab02f5574d113fdedfb34772f2b104 Mon Sep 17 00:00:00 2001 From: The Magician Date: Wed, 21 Aug 2024 15:12:33 -0700 Subject: [PATCH] Merge pull request #11521 from c2thorn/main (#8014) Merge 6.0 branch into main [upstream:33e0634155d56642a6c64174a611267eaaedf084] Signed-off-by: Modular Magician --- .changelog/11521.txt | 3 ++ .../compute/resource_compute_instance_test.go | 46 ------------------- .../resource_google_project.go | 1 + .../r/sql_database_instance.html.markdown | 2 - 4 files changed, 4 insertions(+), 48 deletions(-) create mode 100644 .changelog/11521.txt diff --git a/.changelog/11521.txt b/.changelog/11521.txt new file mode 100644 index 0000000000..42b910df15 --- /dev/null +++ b/.changelog/11521.txt @@ -0,0 +1,3 @@ +```release-note:none + +``` \ No newline at end of file diff --git a/google-beta/services/compute/resource_compute_instance_test.go b/google-beta/services/compute/resource_compute_instance_test.go index c9ff1568ac..2d32a138a7 100644 --- a/google-beta/services/compute/resource_compute_instance_test.go +++ b/google-beta/services/compute/resource_compute_instance_test.go @@ -1733,20 +1733,6 @@ func TestAccComputeInstance_guestAcceleratorSkip(t *testing.T) { testAccCheckComputeInstanceLacksGuestAccelerator(&instance), ), }, - // Recreate with guest_accelerator = [] - { - Config: testAccComputeInstance_guestAcceleratorEmptyBlock(instanceName), - Check: resource.ComposeTestCheckFunc( - testAccCheckComputeInstanceExists(t, "google_compute_instance.foobar", &instance), - testAccCheckComputeInstanceLacksGuestAccelerator(&instance), - ), - }, - // Check that count = 0 is the same as empty block [] - { - Config: testAccComputeInstance_guestAccelerator(instanceName, 0), - ExpectNonEmptyPlan: false, - PlanOnly: true, - }, }, }) @@ -7117,38 +7103,6 @@ resource "google_compute_instance" "foobar" { `, instance, count) } -func testAccComputeInstance_guestAcceleratorEmptyBlock(instance string) string { - return fmt.Sprintf(` -data "google_compute_image" "my_image" { - family = "debian-11" - project = "debian-cloud" -} - -resource "google_compute_instance" "foobar" { - name = "%s" - machine_type = "n1-standard-1" // can't be e2 because of guest_accelerator - zone = "us-east1-d" - - boot_disk { - initialize_params { - image = data.google_compute_image.my_image.self_link - } - } - - network_interface { - network = "default" - } - - scheduling { - # Instances with guest accelerators do not support live migration. - on_host_maintenance = "TERMINATE" - } - - guest_accelerator = [] -} -`, instance) -} - func testAccComputeInstance_minCpuPlatform(instance string) string { return fmt.Sprintf(` data "google_compute_image" "my_image" { diff --git a/google-beta/services/resourcemanager/resource_google_project.go b/google-beta/services/resourcemanager/resource_google_project.go index ee3a92b8f3..ed7bbbbc57 100644 --- a/google-beta/services/resourcemanager/resource_google_project.go +++ b/google-beta/services/resourcemanager/resource_google_project.go @@ -509,6 +509,7 @@ func resourceGoogleProjectDelete(d *schema.ResourceData, meta interface{}) error return err } deletionPolicy := d.Get("deletion_policy").(string) + if deletionPolicy == "PREVENT" { return fmt.Errorf("Cannot destroy project as deletion_policy is set to PREVENT.") } else if deletionPolicy == "ABANDON" { diff --git a/website/docs/r/sql_database_instance.html.markdown b/website/docs/r/sql_database_instance.html.markdown index e1248314c4..dfc63b30ec 100644 --- a/website/docs/r/sql_database_instance.html.markdown +++ b/website/docs/r/sql_database_instance.html.markdown @@ -381,8 +381,6 @@ This setting can be updated, but it cannot be removed after it is set. * `server_ca_mode` - (Optional) Specify how the server certificate's Certificate Authority is hosted. Supported value is `GOOGLE_MANAGED_INTERNAL_CA`. -* `server_ca_mode` - (Optional) Specify how the server certificate's Certificate Authority is hosted. Supported value is `GOOGLE_MANAGED_INTERNAL_CA`. - * `allocated_ip_range` - (Optional) The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. * `enable_private_path_for_google_cloud_services` - (Optional) Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported.