@@ -29,7 +29,6 @@ func TestAccEC2StopInstanceAction_basic(t *testing.T) {
2929 },
3030 ErrorCheck : acctest .ErrorCheck (t , names .EC2ServiceID ),
3131 ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories ,
32- CheckDestroy : testAccCheckInstanceDestroy (ctx ),
3332 Steps : []resource.TestStep {
3433 {
3534 Config : testAccStopInstanceActionConfig_basic (),
@@ -61,7 +60,6 @@ func TestAccEC2StopInstanceAction_force(t *testing.T) {
6160 },
6261 ErrorCheck : acctest .ErrorCheck (t , names .EC2ServiceID ),
6362 ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories ,
64- CheckDestroy : testAccCheckInstanceDestroy (ctx ),
6563 Steps : []resource.TestStep {
6664 {
6765 Config : testAccStopInstanceActionConfig_basic (),
@@ -93,7 +91,6 @@ func TestAccEC2StopInstanceAction_customTimeout(t *testing.T) {
9391 },
9492 ErrorCheck : acctest .ErrorCheck (t , names .EC2ServiceID ),
9593 ProtoV5ProviderFactories : acctest .ProtoV5ProviderFactories ,
96- CheckDestroy : testAccCheckInstanceDestroy (ctx ),
9794 Steps : []resource.TestStep {
9895 {
9996 Config : testAccStopInstanceActionConfig_basic (),
@@ -162,7 +159,9 @@ func testAccStopInstanceActionConfig_withAction() string {
162159 testAccStopInstanceActionConfig_basic (),
163160 `
164161action "aws_ec2_stop_instance" "test" {
165- instance_id = aws_instance.test.id
162+ config {
163+ instance_id = aws_instance.test.id
164+ }
166165}
167166` )
168167}
@@ -172,8 +171,10 @@ func testAccStopInstanceActionConfig_withForce() string {
172171 testAccStopInstanceActionConfig_basic (),
173172 `
174173action "aws_ec2_stop_instance" "test" {
175- instance_id = aws_instance.test.id
176- force = true
174+ config {
175+ instance_id = aws_instance.test.id
176+ force = true
177+ }
177178}
178179` )
179180}
@@ -183,8 +184,10 @@ func testAccStopInstanceActionConfig_withTimeout() string {
183184 testAccStopInstanceActionConfig_basic (),
184185 `
185186action "aws_ec2_stop_instance" "test" {
186- instance_id = aws_instance.test.id
187- timeout = 300
187+ config {
188+ instance_id = aws_instance.test.id
189+ timeout = 300
190+ }
188191}
189192` )
190193}
0 commit comments