provider "aws" {
  region = var.aws_region
}

# Terraform backends cannot contain interpolations
terraform {
  backend "s3" {
    bucket  = "orcd-terraform-state"
    key     = "prod/awal/mobile-push-notifications/terraform.tfstate"
    region  = "us-east-1"
    encrypt = "true"
  }
}

module "awal_sns_mobile_push_notifications" {
  source = "git@github.com:theorchard/terraform-sns.git//mobile-push-notifications?ref=1.1.2"
  service_name  = var.service_name
  environment   = var.environment
  platform_type = "APNS"
}

module "awal_gcm_sns_mobile_push_notifications" {
  source = "git@github.com:theorchard/terraform-sns.git//mobile-push-notifications?ref=1.1.2"
  service_name  = var.service_name
  environment   = var.environment
  platform_type = "GCM"
}
