@@ -182,16 +182,6 @@ func TestExamplesForV4(t *testing.T) {
182182 if managedIdentityId != "" {
183183 t .Setenv ("TF_VAR_managed_identity_principal_id" , managedIdentityId )
184184 }
185- tmp , err := os .MkdirTemp ("" , "" )
186- require .NoError (t , err )
187- defer func () {
188- _ = os .RemoveAll (tmp )
189- }()
190- tfvars := filepath .Join (tmp , "terraform.tfvars" )
191- require .NoError (t , os .WriteFile (tfvars , []byte (`
192- client_id = ""
193- client_secret = ""
194- ` ), 0o600 ))
195185 t .Setenv ("TF_VAR_client_id" , "" )
196186 t .Setenv ("TF_VAR_client_secret" , "" )
197187 examples , err := os .ReadDir ("../../examples" )
@@ -204,6 +194,16 @@ func TestExamplesForV4(t *testing.T) {
204194 continue
205195 }
206196 t .Run (example .Name (), func (t * testing.T ) {
197+ tmp , err := os .MkdirTemp ("" , "" )
198+ require .NoError (t , err )
199+ defer func () {
200+ _ = os .RemoveAll (tmp )
201+ }()
202+ tfvars := filepath .Join (tmp , "terraform.tfvars" )
203+ require .NoError (t , os .WriteFile (tfvars , []byte (`
204+ client_id = ""
205+ client_secret = ""
206+ ` ), 0o600 ))
207207 test_helper .RunE2ETest (t , "../../" , fmt .Sprintf ("examples/%s" , example .Name ()), terraform.Options {
208208 Upgrade : true ,
209209 VarFiles : []string {tfvars },
0 commit comments