module "default_tags" {
  source             = "git@github.com:theorchard/terraform-default-tags.git//?ref=2.0.0"
  environment        = var.environment
  application_family = var.application_family
  service_name       = var.service_name
  team_name          = var.team_name
}

provider "aws" {
  region = var.region

  default_tags {
    tags = module.default_tags.tags
  }
}

provider "snowflake" {
  account_name      = "dataplatform"
  organization_name = "sme"
  role              = "PROD_ATLANTIS"
  preview_features_enabled = [
    "snowflake_stage_resource",
    "snowflake_storage_integration_resource",
  ]
}

terraform {
  backend "s3" {
    bucket  = "prod-business-solutions-terraform-state"
    key     = "prod/business-solutions-automations/terraform.tfstate"
    region  = "us-east-1"
    encrypt = "true"
  }
}

data "aws_caller_identity" "current" {}

module "vpc_info" {
  source = "git@github.com:theorchard/terraform-vpc-info.git//?ref=3.1.0"

  environment = var.environment
}

module "accounts" {
  source = "git@github.com:theorchard/terraform-aws-accounts-map.git//modules/read_accounts_map?ref=3.1.0"
}
