title: How do I use AWS Backup in Terraform to create a vault in a different region?
body: <p>I'm implementing a solution to backup my Oracle RDS database using AWS Backup. I'd like to have one vault in my current region and a backup vault in a different region. Being somewhat new to Terraform, I'm not quite sure how to accomplish this. Would I add another AWS provider in a different region? some of my code is below for reference:</p>
  <pre><code>providers.tf:
  
  # Configure the AWS Provider
  
  provider &quot;aws&quot; {
    profile = &quot;sandbox&quot;
    region  = var.primary_region # resolves to us-east-1
    alias   = &quot;primary&quot;
    allowed_account_ids = [
      var.account_id
    ]
  }
  
  ------------------------------------------------------
  
  backups.tf:
  
  resource &quot;aws_backup_region_settings&quot; &quot;test&quot; {
    resource_type_opt_in_preference = {
      &quot;RDS&quot; = true
    }
  }
  
  resource &quot;aws_backup_vault&quot; &quot;test&quot; {
    name        = &quot;backup_vault&quot;
    kms_key_arn = aws_kms_key.sensitive.arn
  }
  
  # Would like this to be created in us-west-2:
  
  resource &quot;aws_backup_vault&quot; &quot;test_destination&quot; {
    name        = backup_destination_vault&quot;
    kms_key_arn = aws_kms_key.sensitive.arn
  }
  
  resource &quot;aws_backup_plan&quot; &quot;backup&quot; {
    name = &quot;oasis-backup-plan&quot;
  
    rule {
      rule_name         = &quot;backup&quot;
      target_vault_name = aws_backup_vault.backup.name
      schedule          = &quot;cron(0 12-20 * * ? *)&quot;
  
      copy_action {
        destination_vault_arn = aws_backup_vault.backup_destination.arn
      }
    }
  }
  
  resource &quot;aws_iam_role&quot; &quot;backup&quot; {
    name               = &quot;backup_role&quot;
    assume_role_policy = &lt;&lt;POLICY
  {
    &quot;Version&quot;: &quot;2012-10-17&quot;,
    &quot;Statement&quot;: [
      {
        &quot;Action&quot;: [&quot;sts:AssumeRole&quot;],
        &quot;Effect&quot;: &quot;allow&quot;,
        &quot;Principal&quot;: {
          &quot;Service&quot;: [&quot;backup.amazonaws.com&quot;]
        }
      }
    ]
  }
  POLICY
  }
  
  resource &quot;aws_iam_role_policy_attachment&quot; &quot;backup&quot; {
    policy_arn = &quot;arn:aws:iam::aws:policy/service-role/AWSBackupServiceRolePolicyForBackup&quot;
    role       = aws_iam_role.backup.name
  }
  
  resource &quot;aws_backup_selection&quot; &quot;backup&quot; {
    iam_role_arn = aws_iam_role.backup.arn
    name         = &quot;backup_selection&quot;
    plan_id      = aws_backup_plan.backup.id
  
    resources = [
      aws_db_instance.oasis.arn
      data.aws_db_instance.backup.db_instance_arn  # My Oracle DB, already existing
    ]
  }
  </code></pre>
  <p>I am aware that AWS Backup is heavily leveraged within AWS Organizations; Despite the fact we are using that pattern for our numerous accounts, I'm trying to avoid getting that level of control involved at this point; I'm just doing a POC to try to get a reasonable backup plan to a DR region going.</p>