@@ -38,33 +38,6 @@ func TestAccWorkstationsWorkstationConfig_update(t *testing.T) {
3838 ImportStateVerify: true,
3939 ImportStateVerifyIgnore: []string{"etag"},
4040 },
41- {
42- Config: testAccWorkstationsWorkstationConfig_container(context),
43- },
44- {
45- ResourceName: "google_workstations_workstation_cluster.default",
46- ImportState: true,
47- ImportStateVerify: true,
48- ImportStateVerifyIgnore: []string{"etag"},
49- },
50- {
51- Config: testAccWorkstationsWorkstationConfig_shieldedInstanceConfig(context),
52- },
53- {
54- ResourceName: "google_workstations_workstation_cluster.default",
55- ImportState: true,
56- ImportStateVerify: true,
57- ImportStateVerifyIgnore: []string{"etag"},
58- },
59- {
60- Config: testAccWorkstationsWorkstationConfig_persistentDirectories(context),
61- },
62- {
63- ResourceName: "google_workstations_workstation_cluster.default",
64- ImportState: true,
65- ImportStateVerify: true,
66- ImportStateVerifyIgnore: []string{"etag"},
67- },
6841 },
6942 })
7043}
@@ -122,176 +95,3 @@ resource "google_workstations_workstation_config" "default" {
12295`, context)
12396}
12497<% end -%>
125-
126- <% unless version == 'ga' -%>
127- func testAccWorkstationsWorkstationConfig_container(context map[string]interface{}) string {
128- return Nprintf(`
129- data "google_project" "project" {
130- provider = google-beta
131- }
132-
133- resource "google_compute_network" "default" {
134- provider = google-beta
135- name = "tf-test-workstation-cluster%{random_suffix}"
136- auto_create_subnetworks = false
137- }
138-
139- resource "google_compute_subnetwork" "default" {
140- provider = google-beta
141- name = "tf-test-workstation-cluster%{random_suffix}"
142- ip_cidr_range = "10.0.0.0/24"
143- region = "us-central1"
144- network = google_compute_network.default.name
145- }
146-
147- resource "google_workstations_workstation_cluster" "default" {
148- provider = google-beta
149- workstation_cluster_id = "tf-test-workstation-cluster%{random_suffix}"
150- network = google_compute_network.default.id
151- subnetwork = google_compute_subnetwork.default.id
152- location = "us-central1"
153-
154- labels = {
155- update = "true"
156- }
157- }
158-
159- resource "google_workstations_workstation_config" "default" {
160- provider = google-beta
161- workstation_config_id = "tf-test-workstation-config%{random_suffix}"
162- workstation_cluster_id = google_workstations_workstation_cluster.default.workstation_cluster_id
163- location = "us-central1"
164-
165- host {
166- gce_instance {
167- machine_type = "e2-standard-4"
168- boot_disk_size_gb = 35
169- disable_public_ip_addresses = true
170- }
171- }
172-
173- container {
174- image = "intellij"
175- env = {
176- NAME = "FOO"
177- BABE = "bar"
178- }
179- }
180- }
181- `, context)
182- }
183- <% end -%>
184-
185- <% unless version == 'ga' -%>
186- func testAccWorkstationsWorkstationConfig_shieldedInstanceConfig(context map[string]interface{}) string {
187- return Nprintf(`
188- data "google_project" "project" {
189- provider = google-beta
190- }
191-
192- resource "google_compute_network" "default" {
193- provider = google-beta
194- name = "tf-test-workstation-cluster%{random_suffix}"
195- auto_create_subnetworks = false
196- }
197-
198- resource "google_compute_subnetwork" "default" {
199- provider = google-beta
200- name = "tf-test-workstation-cluster%{random_suffix}"
201- ip_cidr_range = "10.0.0.0/24"
202- region = "us-central1"
203- network = google_compute_network.default.name
204- }
205-
206- resource "google_workstations_workstation_cluster" "default" {
207- provider = google-beta
208- workstation_cluster_id = "tf-test-workstation-cluster%{random_suffix}"
209- network = google_compute_network.default.id
210- subnetwork = google_compute_subnetwork.default.id
211- location = "us-central1"
212- }
213-
214- resource "google_workstations_workstation_config" "default" {
215- provider = google-beta
216- workstation_config_id = "tf-test-workstation-config%{random_suffix}"
217- workstation_cluster_id = google_workstations_workstation_cluster.default.workstation_cluster_id
218- location = "us-central1"
219-
220- host {
221- gce_instance {
222- machine_type = "e2-standard-4"
223- boot_disk_size_gb = 35
224- disable_public_ip_addresses = true
225- shielded_instance_config {
226- enable_secure_boot = true
227- enable_vtpm = true
228- }
229- }
230- }
231- }
232- `, context)
233- }
234- <% end -%>
235-
236- <% unless version == 'ga' -%>
237- func testAccWorkstationsWorkstationConfig_persistentDirectories(context map[string]interface{}) string {
238- return Nprintf(`
239- data "google_project" "project" {
240- provider = google-beta
241- }
242-
243- resource "google_compute_network" "default" {
244- provider = google-beta
245- name = "tf-test-workstation-cluster%{random_suffix}"
246- auto_create_subnetworks = false
247- }
248-
249- resource "google_compute_subnetwork" "default" {
250- provider = google-beta
251- name = "tf-test-workstation-cluster%{random_suffix}"
252- ip_cidr_range = "10.0.0.0/24"
253- region = "us-central1"
254- network = google_compute_network.default.name
255- }
256-
257- resource "google_workstations_workstation_cluster" "default" {
258- provider = google-beta
259- workstation_cluster_id = "tf-test-workstation-cluster%{random_suffix}"
260- network = google_compute_network.default.id
261- subnetwork = google_compute_subnetwork.default.id
262- location = "us-central1"
263-
264- labels = {
265- update = "true"
266- }
267- }
268-
269- resource "google_workstations_workstation_config" "default" {
270- provider = google-beta
271- workstation_config_id = "tf-test-workstation-config%{random_suffix}"
272- workstation_cluster_id = google_workstations_workstation_cluster.default.workstation_cluster_id
273- location = "us-central1"
274-
275- host {
276- gce_instance {
277- machine_type = "e2-standard-4"
278- boot_disk_size_gb = 35
279- disable_public_ip_addresses = true
280- shielded_instance_config {
281- enable_secure_boot = true
282- enable_vtpm = true
283- }
284- }
285- }
286-
287- persistent_directories {
288- mount_path = "/home"
289- gce_pd {
290- size_gb = 200
291- reclaim_policy = "DELETE"
292- }
293- }
294- }
295- `, context)
296- }
297- <% end -%>
0 commit comments