resource aws_iam_role "mdr_terraformer" {
  name                  = "mdr_terraformer"
  path                  = "/user/"
  assume_role_policy    = data.aws_iam_policy_document.non_saml_assume_role_policy.json
  max_session_duration  = 28800
}

resource aws_iam_role_policy_attachment "mdr_terraformer-mdr_terraformer" {
  role       = aws_iam_role.mdr_terraformer.name 
  policy_arn = module.standard_iam_policies.arns["mdr_terraformer"]
}

resource aws_iam_role_policy_attachment "mdr_terraformer-AWSSupportAccess" {
  role       = aws_iam_role.mdr_terraformer.name
  policy_arn = "arn:${data.aws_partition.current.partition}:iam::aws:policy/AWSSupportAccess"
}
