From 4a687f618b71eac84d103260f0a5426f8bc6e02c Mon Sep 17 00:00:00 2001 From: David Harrison Date: Fri, 31 Jan 2020 10:59:17 +0000 Subject: [PATCH 1/5] remove beta provider vpc access connector is now GA https://cloud.google.com/functions/docs/release-notes#December_11_2019 --- products/vpcaccess/terraform.yaml | 1 - templates/terraform/examples/vpc_access_connector.tf.erb | 1 - .../tests/resource_cloudfunctions_function_test.go.erb | 2 -- 3 files changed, 4 deletions(-) diff --git a/products/vpcaccess/terraform.yaml b/products/vpcaccess/terraform.yaml index ca9fcd9e8a81..dbf047330b33 100644 --- a/products/vpcaccess/terraform.yaml +++ b/products/vpcaccess/terraform.yaml @@ -22,7 +22,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides examples: - !ruby/object:Provider::Terraform::Examples name: "vpc_access_connector" - min_version: beta primary_resource_id: "connector" vars: name: "my-connector" diff --git a/templates/terraform/examples/vpc_access_connector.tf.erb b/templates/terraform/examples/vpc_access_connector.tf.erb index 7b380abfe3d0..21a4d3a0d165 100644 --- a/templates/terraform/examples/vpc_access_connector.tf.erb +++ b/templates/terraform/examples/vpc_access_connector.tf.erb @@ -3,7 +3,6 @@ provider "google-beta" { resource "google_vpc_access_connector" "connector" { name = "<%= ctx[:vars]['name'] %>" - provider = google-beta region = "us-central1" ip_cidr_range = "10.8.0.0/28" network = "default" diff --git a/third_party/terraform/tests/resource_cloudfunctions_function_test.go.erb b/third_party/terraform/tests/resource_cloudfunctions_function_test.go.erb index 676ff5c85982..a8a2d141a3c2 100644 --- a/third_party/terraform/tests/resource_cloudfunctions_function_test.go.erb +++ b/third_party/terraform/tests/resource_cloudfunctions_function_test.go.erb @@ -778,8 +778,6 @@ resource "google_compute_network" "vpc" { } resource "google_vpc_access_connector" "connector" { - provider = "google-beta" - name = "%s" region = "us-central1" ip_cidr_range = "10.10.0.0/28" From 58f0f6c32cd27c7cfbd2381a7faad521185e86ad Mon Sep 17 00:00:00 2001 From: David Harrison Date: Mon, 24 Feb 2020 14:53:50 +0000 Subject: [PATCH 2/5] updated versions for VPC serverless acess --- products/vpcaccess/api.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/products/vpcaccess/api.yaml b/products/vpcaccess/api.yaml index 920b90a32b8d..1407b7f1e7e8 100644 --- a/products/vpcaccess/api.yaml +++ b/products/vpcaccess/api.yaml @@ -16,8 +16,8 @@ name: VPCAccess display_name: Serverless VPC Access versions: - !ruby/object:Api::Product::Version - name: beta - base_url: https://vpcaccess.googleapis.com/v1beta1/ + name: ga + base_url: https://vpcaccess.googleapis.com/v1/ scopes: - https://www.googleapis.com/auth/cloud-platform apis_required: From 9e4e2d559cdd5f378ba9f58b85c36a60d355084e Mon Sep 17 00:00:00 2001 From: David Harrison Date: Mon, 24 Feb 2020 14:58:01 +0000 Subject: [PATCH 3/5] add back beta version --- products/vpcaccess/api.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/products/vpcaccess/api.yaml b/products/vpcaccess/api.yaml index 1407b7f1e7e8..daaf8f105097 100644 --- a/products/vpcaccess/api.yaml +++ b/products/vpcaccess/api.yaml @@ -15,6 +15,9 @@ name: VPCAccess display_name: Serverless VPC Access versions: + - !ruby/object:Api::Product::Version + name: beta + base_url: https://vpcaccess.googleapis.com/v1beta1/ - !ruby/object:Api::Product::Version name: ga base_url: https://vpcaccess.googleapis.com/v1/ From 011570dc090740963b95100a06576c6fdf5d9839 Mon Sep 17 00:00:00 2001 From: David Harrison Date: Mon, 24 Feb 2020 21:44:42 +0000 Subject: [PATCH 4/5] remove beta references in resource --- products/vpcaccess/api.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/products/vpcaccess/api.yaml b/products/vpcaccess/api.yaml index daaf8f105097..87b7caf91e35 100644 --- a/products/vpcaccess/api.yaml +++ b/products/vpcaccess/api.yaml @@ -15,9 +15,6 @@ name: VPCAccess display_name: Serverless VPC Access versions: - - !ruby/object:Api::Product::Version - name: beta - base_url: https://vpcaccess.googleapis.com/v1beta1/ - !ruby/object:Api::Product::Version name: ga base_url: https://vpcaccess.googleapis.com/v1/ @@ -32,14 +29,13 @@ objects: name: 'Connector' kind: 'vpcaccess#Connector' description: 'Serverless VPC Access connector resource.' - min_version: beta input: true base_url: projects/{{project}}/locations/{{region}}/connectors create_url: projects/{{project}}/locations/{{region}}/connectors?connectorId={{name}} references: !ruby/object:Api::Resource::ReferenceLinks guides: 'Configuring Serverless VPC Access': 'https://cloud.google.com/vpc/docs/configure-serverless-vpc-access' - api: 'https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/v1beta1/projects.locations.connectors' + api: 'https://cloud.google.com/vpc/docs/reference/vpcaccess/rest/v1/projects.locations.connectors' async: !ruby/object:Api::OpAsync operation: !ruby/object:Api::OpAsync::Operation path: 'name' From b4b841c3390b043f1d8b69807b16b5a540891757 Mon Sep 17 00:00:00 2001 From: David Harrison Date: Mon, 24 Feb 2020 22:21:53 +0000 Subject: [PATCH 5/5] remove google-beta provider from example --- templates/terraform/examples/vpc_access_connector.tf.erb | 3 --- 1 file changed, 3 deletions(-) diff --git a/templates/terraform/examples/vpc_access_connector.tf.erb b/templates/terraform/examples/vpc_access_connector.tf.erb index 21a4d3a0d165..28118a7bb2a2 100644 --- a/templates/terraform/examples/vpc_access_connector.tf.erb +++ b/templates/terraform/examples/vpc_access_connector.tf.erb @@ -1,6 +1,3 @@ -provider "google-beta" { -} - resource "google_vpc_access_connector" "connector" { name = "<%= ctx[:vars]['name'] %>" region = "us-central1"