From 547fc6f9d9131a38ed283efb088ec63a260a5158 Mon Sep 17 00:00:00 2001 From: Edward Sun <42220489+edwardmedia@users.noreply.github.com> Date: Thu, 20 Feb 2020 10:47:37 -0800 Subject: [PATCH] fixing beta example for google_compute_region_autoscaler (#3152) * fixing https://github.com/terraform-providers/terraform-provider-google/issues/5657 * remove a deprecated file related to #5657 --- products/compute/terraform.yaml | 9 --- .../examples/region_autoscaler_beta.tf.erb | 76 ------------------- 2 files changed, 85 deletions(-) delete mode 100644 templates/terraform/examples/region_autoscaler_beta.tf.erb diff --git a/products/compute/terraform.yaml b/products/compute/terraform.yaml index 2619874a0bb0..3c411adb819c 100644 --- a/products/compute/terraform.yaml +++ b/products/compute/terraform.yaml @@ -1131,15 +1131,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides exclude: true RegionAutoscaler: !ruby/object:Overrides::Terraform::ResourceOverride examples: - - !ruby/object:Provider::Terraform::Examples - name: "region_autoscaler_beta" - primary_resource_id: "foobar" - min_version: 'beta' - vars: - region_autoscaler_name: "my-region-autoscaler" - instance_template_name: "my-instance-template" - target_pool_name: "my-target-pool" - rigm_name: "my-region-igm" - !ruby/object:Provider::Terraform::Examples name: "region_autoscaler_basic" primary_resource_id: "foobar" diff --git a/templates/terraform/examples/region_autoscaler_beta.tf.erb b/templates/terraform/examples/region_autoscaler_beta.tf.erb deleted file mode 100644 index 1049f226965e..000000000000 --- a/templates/terraform/examples/region_autoscaler_beta.tf.erb +++ /dev/null @@ -1,76 +0,0 @@ -resource "google_compute_region_autoscaler" "foobar" { - provider = google-beta - - name = "<%= ctx[:vars]['region_autoscaler_name'] %>" - region = "us-central1" - target = google_compute_region_instance_group_manager.foobar.self_link - - autoscaling_policy { - max_replicas = 5 - min_replicas = 1 - cooldown_period = 60 - - cpu_utilization { - target = 0.5 - } - } -} - -resource "google_compute_instance_template" "foobar" { - provider = google-beta - - name = "<%= ctx[:vars]['instance_template_name'] %>" - machine_type = "n1-standard-1" - can_ip_forward = false - - tags = ["foo", "bar"] - - disk { - source_image = data.google_compute_image.debian_9.self_link - } - - network_interface { - network = "default" - } - - metadata = { - foo = "bar" - } - - service_account { - scopes = ["userinfo-email", "compute-ro", "storage-ro"] - } -} - -resource "google_compute_target_pool" "foobar" { - provider = google-beta - - name = "<%= ctx[:vars]['target_pool_name'] %>" -} - -resource "google_compute_region_instance_group_manager" "foobar" { - provider = google-beta - - name = "<%= ctx[:vars]['rigm_name'] %>" - region = "us-central1" - - version { - instance_template = google_compute_instance_template.foobar.self_link - name = "primary" - } - - target_pools = [google_compute_target_pool.foobar.self_link] - base_instance_name = "foobar" -} - -data "google_compute_image" "debian_9" { - provider = google-beta - - family = "debian-9" - project = "debian-cloud" -} - -provider "google-beta" { - region = "us-central1" - zone = "us-central1-a" -}