Terraform Cloud Multiple AWS accounts

I am using only Terraform Cloud, nothing installed locally to setup some disaster recovery automation. I am using the AWS provider. My main account is called Pano and my Disaster Recovery account is called Pano-dr. I want to setup replication of my buckets from Pano to Pano-dr account

I am trying to setup a plan that will do the following:
Create a data source that will read a list of buckets from Pano that are tagged with RPL=yes. Then generate new buckets in Pano-DR with the same name but “_rpl” added to the end.

my tr files are hosted in github.

My main question is how to have one workspace that can “talk” to two different AWS accounts?

Remember, i am only using Terraform Cloud.

I know how to do this locally.

Once I figure that out, I want to set up a resource that will scroll through each bucket in the source and create the replication bucket.

Hi!

You should be able to configure two different AWS accounts in a single configuration/workspace by utilizing provider aliases. See the documentation on Multiple Provider Configurations for more information on how this works!

Thanks @chrisarcand , but how do I do this if I am using only the Terraform Cloud? Not running anything locally.

Do I create files in my github repo? Do they need to be named a particular way? right now I have main.tf, outputs.tf and variables.tf. Would I add a providers.tf or something like that?

I want to do it this way but because I want to use this for disaster recover and I am assuming that in a disaster scenario I may not have my computer available.

Did you ever figure this out? I am trying to do the same thing & the documentation provided is not clear enough for me.

I never did. I am not using terraform cloud anymore. I use terraform locally or I deploy it with Octopus Deploy (which handles authentication).