locals {
  environment_vars = read_terragrunt_config(find_in_parent_folders("env.hcl"))
  partition_vars = read_terragrunt_config(find_in_parent_folders("partition.hcl"))
  region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
  account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
  global_vars = read_terragrunt_config(find_in_parent_folders("globals.hcl"))
}

terraform {
  # Double slash is intentional and required to show root of modules
  source = "git@github.xdr.accenturefederalcyber.com:mdr-engineering/xdr-terraform-modules.git//base/shared_ami_key?ref=v1.10.17"
}

include {
  path = find_in_parent_folders()
}

inputs = {
  tags = {
    Purpose = "Sharing the AMI amongst accounts"
    Terraform = "aws/${basename(get_parent_terragrunt_dir())}/${path_relative_to_include()}/"
  }
}
