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

Cluster test fixes #2611

Merged
merged 2 commits into from
Nov 7, 2019
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
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ resource "google_container_cluster" "kubes" {

data "google_container_cluster" "kubes" {
name = "${google_container_cluster.kubes.name}"
location = "${google_container_cluster.kubes.zone}"
location = "${google_container_cluster.kubes.location}"
}
`, acctest.RandString(10))
}
Expand All @@ -90,7 +90,7 @@ resource "google_container_cluster" "kubes" {

data "google_container_cluster" "kubes" {
name = "${google_container_cluster.kubes.name}"
location = "${google_container_cluster.kubes.region}"
location = "${google_container_cluster.kubes.location}"
}
`, acctest.RandString(10))
}
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func checkComputeBackendServiceSignedUrlKeyExists(s *terraform.State) (bool, err
}

config := testAccProvider.Meta().(*Config)
keyName := rs.Primary.ID
keyName := rs.Primary.Attributes["name"]

url, err := replaceVarsForTest(config, rs, "{{ComputeBasePath}}projects/{{project}}/global/backendServices/{{backend_service}}")
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ func testAccComputeInstanceGroup_hasCorrectNetwork(nInstanceGroup string, nNetwo
return fmt.Errorf("No ID is set")
}
network, err := config.clientCompute.Networks.Get(
config.Project, rsNetwork.Primary.ID).Do()
config.Project, rsNetwork.Primary.Attributes["name"]).Do()
if err != nil {
return err
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func testAccCheckComputeTargetHttpProxyExists(n string) resource.TestCheckFunc {
}

config := testAccProvider.Meta().(*Config)
name := rs.Attributes["name"]
name := rs.Primary.Attributes["name"]

found, err := config.clientCompute.TargetHttpProxies.Get(
config.Project, name).Do()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2449,7 +2449,7 @@ func testAccContainerCluster_withNodeConfigShieldedInstanceConfig(clusterName st
return fmt.Sprintf(`
resource "google_container_cluster" "with_node_config" {
name = "%s"
zone = "us-central1-f"
location = "us-central1-f"
initial_node_count = 1

node_config {
Expand Down Expand Up @@ -2915,7 +2915,7 @@ func testAccContainerCluster_withRecurringMaintenanceWindow(clusterName string,
return fmt.Sprintf(`
resource "google_container_cluster" "with_recurring_maintenance_window" {
name = "cluster-test-%s"
zone = "us-central1-a"
location = "us-central1-a"
initial_node_count = 1

%s
Expand Down Expand Up @@ -3354,7 +3354,7 @@ func testAccContainerCluster_withBinaryAuthorization(clusterName string, enabled
return fmt.Sprintf(`
resource "google_container_cluster" "with_binary_authorization" {
name = "%s"
locatin = "us-central1-a"
location = "us-central1-a"
initial_node_count = 1

enable_binary_authorization = %v
Expand All @@ -3366,7 +3366,7 @@ func testAccContainerCluster_withShieldedNodes(clusterName string, enabled bool)
return fmt.Sprintf(`
resource "google_container_cluster" "with_shielded_nodes" {
name = "%s"
zone = "us-central1-a"
location = "us-central1-a"
initial_node_count = 1

enable_shielded_nodes = %v
Expand Down Expand Up @@ -3401,7 +3401,7 @@ resource "google_compute_subnetwork" "container_subnetwork" {

resource "google_container_cluster" "with_flexible_cidr" {
name = "%s"
locatin = "us-central1-a"
location = "us-central1-a"
initial_node_count = 3

network = "${google_compute_network.container_network.name}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,7 @@ resource "google_compute_subnetwork" "container_subnetwork" {
name = "${google_compute_network.container_network.name}"
network = "${google_compute_network.container_network.name}"
ip_cidr_range = "10.0.36.0/24"
location = "us-central1"
region = "us-central1"
private_ip_google_access = true

secondary_ip_range {
Expand Down