-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fixed default for max_throughput * updated a test Signed-off-by: Modular Magician <[email protected]>
- Loading branch information
1 parent
fbb7844
commit 492da84
Showing
5 changed files
with
68 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
vpcaccess: fixed permadiff when `max_throughput` is not set on `google_vpc_access_connector` | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package google | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" | ||
) | ||
|
||
func TestAccVPCAccessConnector_vpcAccessConnectorThroughput(t *testing.T) { | ||
t.Parallel() | ||
|
||
context := map[string]interface{}{ | ||
"random_suffix": randString(t, 10), | ||
} | ||
|
||
vcrTest(t, resource.TestCase{ | ||
PreCheck: func() { testAccPreCheck(t) }, | ||
Providers: testAccProvidersOiCS, | ||
CheckDestroy: testAccCheckVPCAccessConnectorDestroyProducer(t), | ||
Steps: []resource.TestStep{ | ||
{ | ||
Config: testAccVPCAccessConnector_vpcAccessConnectorThroughput(context), | ||
}, | ||
{ | ||
ResourceName: "google_vpc_access_connector.connector", | ||
ImportState: true, | ||
ImportStateVerify: true, | ||
}, | ||
}, | ||
}) | ||
} | ||
|
||
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 | ||
} | ||
machine_type = "e2-standard-4" | ||
min_instances = 2 | ||
max_instances = 3 | ||
region = "us-central1" | ||
} | ||
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters