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

google_vpc_access_connector missing GA args #6718

Merged
merged 2 commits into from
Oct 19, 2022
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
6 changes: 0 additions & 6 deletions mmv1/products/vpcaccess/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ objects:
description: |
Machine type of VM Instance underlying connector. Default is e2-micro
default_value: e2-micro
min_version: beta
- !ruby/object:Api::Type::Integer
name: minThroughput
description: |
Expand All @@ -109,12 +108,10 @@ objects:
name: minInstances
description: |
Minimum value of instances in autoscaling group underlying the connector.
min_version: beta
- !ruby/object:Api::Type::Integer
name: maxInstances
description: |
Maximum value of instances in autoscaling group underlying the connector.
min_version: beta
- !ruby/object:Api::Type::Integer
name: maxThroughput
# The API documentation says this will default to 200, but when I tried that I got an error that the minimum
Expand All @@ -131,7 +128,6 @@ objects:
- !ruby/object:Api::Type::NestedObject
name: 'subnet'
input: true
min_version: beta
description: |
The subnet in which to house the connector
properties:
Expand All @@ -144,10 +140,8 @@ objects:
- network
- subnet.0.name
input: true
min_version: beta
- !ruby/object:Api::Type::String
name: 'projectId'
description: |
Project in which the subnet exists. If not set, this project is assumed to be the project for which the connector create request was issued.
input: true
min_version: beta
1 change: 0 additions & 1 deletion mmv1/products/vpcaccess/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ overrides: !ruby/object:Overrides::ResourceOverrides
- !ruby/object:Provider::Terraform::Examples
name: "vpc_access_connector_shared_vpc"
primary_resource_id: "connector"
min_version: beta
vars:
name: "vpc-con"
custom_code: !ruby/object:Provider::Terraform::CustomCode
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
resource "google_vpc_access_connector" "connector" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
subnet {
name = google_compute_subnetwork.custom_test.name
Expand All @@ -8,15 +7,13 @@ resource "google_vpc_access_connector" "connector" {
}

resource "google_compute_subnetwork" "custom_test" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
ip_cidr_range = "10.2.0.0/28"
region = "us-central1"
network = google_compute_network.custom_test.id
}

resource "google_compute_network" "custom_test" {
provider = google-beta
name = "<%= ctx[:vars]['name'] %>"
auto_create_subnetworks = false
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<% autogen_exception -%>
package google
<% unless version == 'ga' -%>

import (
"testing"
Expand All @@ -17,16 +15,16 @@ func TestAccVPCAccessConnector_vpcAccessConnectorThroughput(t *testing.T) {

vcrTest(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProvidersOiCS,
Providers: testAccProviders,
CheckDestroy: testAccCheckVPCAccessConnectorDestroyProducer(t),
Steps: []resource.TestStep{
{
Config: testAccVPCAccessConnector_vpcAccessConnectorThroughput(context),
},
{
ResourceName: "google_vpc_access_connector.connector",
ImportState: true,
ImportStateVerify: true,
ResourceName: "google_vpc_access_connector.connector",
ImportState: true,
ImportStateVerify: true,
},
},
})
Expand All @@ -35,7 +33,6 @@ func TestAccVPCAccessConnector_vpcAccessConnectorThroughput(t *testing.T) {
func testAccVPCAccessConnector_vpcAccessConnectorThroughput(context map[string]interface{}) string {
return Nprintf(`
resource "google_vpc_access_connector" "connector" {
provider = google-beta
name = "tf-test-vpc-con%{random_suffix}"
subnet {
name = google_compute_subnetwork.custom_test.name
Expand All @@ -47,19 +44,15 @@ resource "google_vpc_access_connector" "connector" {
}

resource "google_compute_subnetwork" "custom_test" {
provider = google-beta
name = "tf-test-vpc-con%{random_suffix}"
ip_cidr_range = "10.2.0.0/28"
region = "us-central1"
network = google_compute_network.custom_test.id
}

resource "google_compute_network" "custom_test" {
provider = google-beta
name = "tf-test-vpc-con%{random_suffix}"
auto_create_subnetworks = false
}
`, context)
}

<% end -%>