How to add multiple providers for acceptance tests?

I’m 95% complete of building a terraform provider for Cloudability.
The repo is here:

I built the provider using some terraform modules to test and my own test methods. The modules are here:

Everything works fine. I’m now trying to implement the documented acceptance testing framework and I need to add the AWS provider to my test provider list. But when i do this i start to get errors that I’m not seeing deploying the modules directly. I’ve pushed my current attempt to a branch here:

I need to include the AWS provider in the test as these resources require it.
I managed to get this to compile by adding the AWS provider to the test provider list here:

But I’m getting errors executing the module. The errors are around access denied issues trying to access s3 bucket to add a policy or delete the bucket.

Is this the right way to approach this?

thanks for any help


OK I’ve figured out a few issues causing my pain.

The AWS provider resource “aws_cur_report_definition” must run against the us-east-1 region. This can be achieved by using a second aws provider with an alias. However I currently cannot get this to work in an acceptance test.

Futhermore, this resource can fail with a “ValidationException: Failed to verify customer bucket permission…”. This looks like an eventual consistency issue and this error should be retryable. I’ll raise an issue in the AWS provider channel.

Just to add more feedback for anyone else that finds this. I found some additional documentation on acceptance testing cross regions here. I think it would make sense to include this in the current acceptance testing documentation because this is important info.