@@ -41,6 +41,12 @@ func TestAccDataflowJob_basic(t *testing.T) {
4141 testAccDataflowJobExists (t , "google_dataflow_job.big_data" ),
4242 ),
4343 },
44+ {
45+ ResourceName : "google_dataflow_job.big_data" ,
46+ ImportState : true ,
47+ ImportStateVerify : true ,
48+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "zone" , "state" },
49+ },
4450 },
4551 })
4652}
@@ -67,6 +73,12 @@ func TestAccDataflowJobSkipWait_basic(t *testing.T) {
6773 testAccDataflowJobExists (t , "google_dataflow_job.big_data" ),
6874 ),
6975 },
76+ {
77+ ResourceName : "google_dataflow_job.big_data" ,
78+ ImportState : true ,
79+ ImportStateVerify : true ,
80+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "zone" , "state" },
81+ },
7082 },
7183 })
7284}
@@ -92,6 +104,12 @@ func TestAccDataflowJob_withRegion(t *testing.T) {
92104 testAccRegionalDataflowJobExists (t , "google_dataflow_job.big_data" , "us-central1" ),
93105 ),
94106 },
107+ {
108+ ResourceName : "google_dataflow_job.big_data" ,
109+ ImportState : true ,
110+ ImportStateVerify : true ,
111+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "region" , "state" },
112+ },
95113 },
96114 })
97115}
@@ -119,6 +137,12 @@ func TestAccDataflowJob_withServiceAccount(t *testing.T) {
119137 testAccDataflowJobHasServiceAccount (t , "google_dataflow_job.big_data" , accountId ),
120138 ),
121139 },
140+ {
141+ ResourceName : "google_dataflow_job.big_data" ,
142+ ImportState : true ,
143+ ImportStateVerify : true ,
144+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "state" },
145+ },
122146 },
123147 })
124148}
@@ -146,6 +170,12 @@ func TestAccDataflowJob_withNetwork(t *testing.T) {
146170 testAccDataflowJobHasNetwork (t , "google_dataflow_job.big_data" , network ),
147171 ),
148172 },
173+ {
174+ ResourceName : "google_dataflow_job.big_data" ,
175+ ImportState : true ,
176+ ImportStateVerify : true ,
177+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "state" },
178+ },
149179 },
150180 })
151181}
@@ -174,6 +204,12 @@ func TestAccDataflowJob_withSubnetwork(t *testing.T) {
174204 testAccDataflowJobHasSubnetwork (t , "google_dataflow_job.big_data" , subnetwork ),
175205 ),
176206 },
207+ {
208+ ResourceName : "google_dataflow_job.big_data" ,
209+ ImportState : true ,
210+ ImportStateVerify : true ,
211+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "subnetwork" , "state" },
212+ },
177213 },
178214 })
179215}
@@ -202,6 +238,12 @@ func TestAccDataflowJob_withLabels(t *testing.T) {
202238 testAccDataflowJobHasLabels (t , "google_dataflow_job.with_labels" , key ),
203239 ),
204240 },
241+ {
242+ ResourceName : "google_dataflow_job.with_labels" ,
243+ ImportState : true ,
244+ ImportStateVerify : true ,
245+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "state" },
246+ },
205247 },
206248 })
207249}
@@ -227,6 +269,12 @@ func TestAccDataflowJob_withIpConfig(t *testing.T) {
227269 testAccDataflowJobExists (t , "google_dataflow_job.big_data" ),
228270 ),
229271 },
272+ {
273+ ResourceName : "google_dataflow_job.big_data" ,
274+ ImportState : true ,
275+ ImportStateVerify : true ,
276+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "ip_configuration" , "state" },
277+ },
230278 },
231279 })
232280}
@@ -255,6 +303,12 @@ func TestAccDataflowJob_withKmsKey(t *testing.T) {
255303 testAccDataflowJobExists (t , "google_dataflow_job.big_data" ),
256304 ),
257305 },
306+ {
307+ ResourceName : "google_dataflow_job.big_data" ,
308+ ImportState : true ,
309+ ImportStateVerify : true ,
310+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "zone" , "state" },
311+ },
258312 },
259313 })
260314}
@@ -281,6 +335,12 @@ func TestAccDataflowJobWithAdditionalExperiments(t *testing.T) {
281335 testAccDataflowJobHasExperiments (t , "google_dataflow_job.with_additional_experiments" , additionalExperiments ),
282336 ),
283337 },
338+ {
339+ ResourceName : "google_dataflow_job.with_additional_experiments" ,
340+ ImportState : true ,
341+ ImportStateVerify : true ,
342+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "state" },
343+ },
284344 },
285345 })
286346}
@@ -309,6 +369,12 @@ func TestAccDataflowJob_streamUpdate(t *testing.T) {
309369 testAccDataflowJobHasTempLocation (t , "google_dataflow_job.pubsub_stream" , "gs://tf-test-bucket2-" + suffix ),
310370 ),
311371 },
372+ {
373+ ResourceName : "google_dataflow_job.pubsub_stream" ,
374+ ImportState : true ,
375+ ImportStateVerify : true ,
376+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "transform_name_mapping" , "state" },
377+ },
312378 },
313379 })
314380}
@@ -342,6 +408,12 @@ func TestAccDataflowJob_virtualUpdate(t *testing.T) {
342408 resource .TestCheckResourceAttr ("google_dataflow_job.pubsub_stream" , "on_delete" , "cancel" ),
343409 ),
344410 },
411+ {
412+ ResourceName : "google_dataflow_job.pubsub_stream" ,
413+ ImportState : true ,
414+ ImportStateVerify : true ,
415+ ImportStateVerifyIgnore : []string {"on_delete" , "parameters" , "skip_wait_on_job_termination" , "state" },
416+ },
345417 },
346418 })
347419}
0 commit comments