Skip to content

Commit 87f2454

Browse files
Fix TestAccDataSourceComputeInstance_networkAttachmentUsageExample (#12661) (#8984)
[upstream:384ea49a96e2858b817c635ce9bd7064e160308c] Signed-off-by: Modular Magician <[email protected]>
1 parent 6418005 commit 87f2454

File tree

2 files changed

+23
-20
lines changed

2 files changed

+23
-20
lines changed

.changelog/12661.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
3+
```

google-beta/services/compute/data_source_google_compute_instance_test.go

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func TestAccDataSourceComputeInstance_networkAttachmentUsageExample(t *testing.T
159159
func testAccDataSourceComputeInstance_networkAttachmentUsageConfig(instanceName string) string {
160160
return fmt.Sprintf(`
161161
resource "google_compute_instance" "foo" {
162-
provider = google-beta
162+
provider = google-beta
163163
name = "%s"
164164
machine_type = "n1-standard-1" // can't be e2 because of local-ssd
165165
zone = "us-central1-a"
@@ -173,19 +173,19 @@ resource "google_compute_instance" "foo" {
173173
}
174174
175175
scratch_disk {
176-
interface = "SCSI"
176+
interface = "SCSI"
177177
}
178178
179179
network_interface {
180180
network = "default"
181-
181+
182182
access_config {
183183
// Ephemeral IP
184184
}
185185
}
186186
187187
network_interface {
188-
network_attachment = google_compute_network_attachment.net_attar_default.self_link
188+
network_attachment = google_compute_network_attachment.net_attar_default.self_link
189189
}
190190
191191
@@ -199,35 +199,35 @@ resource "google_compute_instance" "foo" {
199199
}
200200
201201
data "google_compute_instance" "bar" {
202-
provider = google-beta
202+
provider = google-beta
203203
name = google_compute_instance.foo.name
204204
zone = "us-central1-a"
205205
}
206206
207207
data "google_compute_instance" "baz" {
208-
provider = google-beta
208+
provider = google-beta
209209
self_link = google_compute_instance.foo.self_link
210210
}
211211
resource "google_compute_network" "net_att_default" {
212-
provider = google-beta
213-
name = "basic-network-att"
214-
auto_create_subnetworks = false
212+
provider = google-beta
213+
name = "%s"
214+
auto_create_subnetworks = false
215215
}
216216
217217
resource "google_compute_subnetwork" "subnet_att_default" {
218-
provider = google-beta
219-
name = "basic-subnetwork-att"
220-
region = "us-central1"
221-
network = google_compute_network.net_att_default.id
222-
ip_cidr_range = "10.0.0.0/16"
218+
provider = google-beta
219+
name = "%s"
220+
region = "us-central1"
221+
network = google_compute_network.net_att_default.id
222+
ip_cidr_range = "10.0.0.0/16"
223223
}
224224
225225
resource "google_compute_network_attachment" "net_attar_default" {
226-
provider = google-beta
227-
name = "basic-attachment"
228-
region = "us-central1"
229-
subnetworks = [google_compute_subnetwork.subnet_att_default.id]
230-
connection_preference = "ACCEPT_AUTOMATIC"
226+
provider = google-beta
227+
name = "%s"
228+
region = "us-central1"
229+
subnetworks = [google_compute_subnetwork.subnet_att_default.id]
230+
connection_preference = "ACCEPT_AUTOMATIC"
231231
}
232-
`, instanceName)
232+
`, instanceName, instanceName, instanceName, instanceName)
233233
}

0 commit comments

Comments
 (0)